writing-config-files
Use this skill when you need to write configuration files in `src/config` for the Next.js app
When & Why to Use This Skill
This Claude skill automates the creation of modular and maintainable configuration files for Next.js applications within the `src/config` directory. By enforcing strict architectural rules—such as a 50-line limit per file and the single-responsibility principle—it ensures that project settings remain organized, readable, and easy to scale, preventing the common pitfall of bloated configuration files.
Use Cases
- Scenario 1: Initializing a new Next.js project with a standardized, modular configuration structure to ensure long-term maintainability.
- Scenario 2: Refactoring large, monolithic configuration files into smaller, discrete files to improve code readability and simplify debugging.
- Scenario 3: Adding new environment variables or third-party service integrations (like Stripe or Firebase) while maintaining a strict 'one variable per file' architectural pattern.
| name | writing-config-files |
|---|---|
| description | Use this skill when you need to write configuration files in `src/config` for the Next.js app |
Instructions
- Follow the rules below to write config files for the Next.js app in
src/config:
Rules
- Make it modular
- Maximum of 50 lines of code per file
- Seperate the config files into multiple files if possible
- 1 config function or variable per file