CLAUDE.md is loaded into every Claude Code session in your repository. Everything in it costs context on every task, so the best CLAUDE.md files are short, specific, and full of things Claude couldn't figure out alone.
./CLAUDE.md in the repo root, shared with your team through git.CLAUDE.md files in subdirectories, used when Claude works in that part of the tree. They're great for monorepos.~/.claude/CLAUDE.md holds your personal preferences for every project.CLAUDE.local.md holds private notes for one project. Add it to .gitignore.Pull in longer docs with an import line, for example @docs/architecture.md, instead of pasting them.
@import or in a skill.# <Project name>
<One sentence: what this does and who uses it.>
## Stack
<Language/framework/versions> · <DB> · <hosting>
## Commands
- Dev: `<cmd>`
- Test one file: `<cmd path/to/test>`
- All tests: `<cmd>`
- Lint / types: `<cmd>` / `<cmd>`
Before saying a task is done: types, lint and relevant tests must pass.
## Layout
- `src/...`: <what>
- `<generated dir>`: generated, never edit by hand
## Conventions
- <Error handling pattern>
- <Validation at boundaries with X>
- <Test style: real DB via fixtures, no ORM mocks>
## Don't
- Don't add dependencies without asking.
- Don't silence type errors with any / @ts-ignore.
## Landmines
- <The thing that bit someone last month>
When Claude makes the same mistake twice, add one line to CLAUDE.md that prevents it. Delete lines that no longer apply. A 60-line file that's all signal beats a 400-line one that's mostly noise.
Keelwork bundles 10 workflow skills, 5 tested safety hooks (including a full guard-bash and a secret scanner), 3 subagents and 5 CLAUDE.md templates, with a one-command installer that safely merges into your settings.
Get Keelwork — $24 →