monorepo-backend-layout
Installation
SKILL.md
Monorepo / Backend Layout
For repositories with a backend/ (or similar) directory, that directory is the backend app root.
Checklist Before Creating Any API or Lib File
- Identify the backend app root (e.g.
backend/). - Create files only under that root:
- API routes:
backend/src/app/api/... - Library code:
backend/src/lib/... - (Or the project's actual layout—e.g.
backend/src/app/...for Next.js App Router.)
- API routes:
Rules
- Never create
src/at the repository root for backend routes or libs. - Never put routes under
backend/lib/if the project usesbackend/src/lib/. - Confirm the path convention (e.g.
backend/src/lib/notbackend/lib/) before creating files.