codebase-conventions
Installation
SKILL.md
Codebase Conventions
Generally-applicable conventions for how code is written and arranged. Read every convention below. If any matches what you're about to do, apply it. These are defaults for the user's projects; where a project clearly already follows a different convention, match the project and say so.
When to consult this skill
Any time you are:
- Creating a new file, or deciding where a new module (component, hook, util, server action, type, etc.) should live
- Naming a file, component, or export
- Writing an import
- Running a project command (install, build, test, scripts)
- Adding a comment
Conventions
File placement & colocation
Treat each feature/route folder as a self-contained unit — almost as if it were its own small repo. The closer a feature's code lives to where it's consumed, the easier it is to experiment with, reason about, and eventually move or delete. Default to colocating; promote to a global folder only when usage is genuinely broad.