writing-lib-functions
Use this skill when you need to write lib functions in `srs/lib` for the Next.js app
When & Why to Use This Skill
This Claude skill streamlines the development of Next.js applications by automating the creation of modular library functions within the `srs/lib` directory. It enforces high-quality coding standards by ensuring functions are concise (under 50 lines) and logically separated, which significantly improves codebase maintainability and scalability.
Use Cases
- Scenario 1: Rapidly generating reusable utility functions for data formatting, validation, or API handling within a Next.js project structure.
- Scenario 2: Refactoring large, monolithic helper files into smaller, modular components to enhance code readability and simplify unit testing.
- Scenario 3: Standardizing the development workflow for teams by enforcing consistent file organization and size constraints within the project's library directory.
| name | writing-lib-functions |
|---|---|
| description | Use this skill when you need to write lib functions in `srs/lib` for the Next.js app |
Instructions
- Follow the rules below to write lib functions in
srs/libfor the Next.js app:
Rules
- Make it modular
- Maximum of 50 lines of code per file
- Seperate the lib functions into multiple files if possible