Anatomy of the .claude folder

if you cant beat them, join them...

Disclaimer

Copied here so i dont lose track of bookmarks.

Structure

  • your-project
    • CLAUDE.md # team instructions, commitd
    • CLAUDE.local.md # personal overrides, gitignored
    • .claude/ # control center
      • settings.json # permissions + config, commited
      • settings.local.json # personal permissions, gitignored
      • commands/ # custom slash commands
        • review.md # /project:review
        • fix-issue.md # /project:fix-issue
        • deploy.md # /project:deploy
      • rules/ # modular instruction files
        • code-style.md
        • testing.md
        • api-conventions.md
      • skills/ # auto-invoked workflows
        • security-review/
        • deploy/
      • agents/ # subagent personas
        • code-reviewer.md
        • security-auditor.md

Or in the image format:

image

Minimal example

# Project: Acme API

## Commands
npm run dev          # Start dev server
npm run test         # Run tests (Jest)
npm run lint         # ESLint + Prettier check
npm run build        # Production build

## Architecture
- Express REST API, Node 20
- PostgreSQL via Prisma ORM
- All handlers live in src/handlers/
- Shared types in src/types/

## Conventions
- Use zod for request validation in every handler
- Return shape is always { data, error }
- Never expose stack traces to the client
- Use the logger module, not console.log

## Watch out for
- Tests use a real local DB, not mocks. Run `npm run db:test:reset` first
- Strict TypeScript: no unused imports, ever

Source

https://blog.dailydoseofds.com/p/anatomy-of-the-claude-folder