code-design-best-practices
Installation
SKILL.md
Code Design Best Practices
Stack-agnostic conventions for code structure and tests. Apply these rules on every edit — independent of language, framework, ORM, UI library, or package manager. Load tool-specific skills alongside this one whenever the touched area is covered by one.
When to load this skill
- Adding or modifying a route, service, schema, DTO, or aggregate.
- Creating or editing a component, hook, page, or form.
- Writing or updating tests (unit, integration, end-to-end).
- Authoring a database schema or migration.
- Reviewing a diff for project consistency.
Skip when the task is environment setup, deployment, or infra wiring.
Before creating a new aggregate — ASK
When the work involves creating a new aggregate (backend, frontend, or both), the agent MUST ask the user for the aggregate name first — a single kebab-case English noun (e.g. freight, invoice, subscription).
The confirmed name is reused verbatim across three layers: