CLAUDE.md generator
Build a CLAUDE.md that tells Claude Code how your project works: the commands to run, where things live and what to leave alone. Start from a preset and edit; preset commands are common defaults, not read from your code.
CLAUDE.md
Where CLAUDE.md goes
According to the Claude Code memory docs, a project CLAUDE.md lives
at ./CLAUDE.md or ./.claude/CLAUDE.md and is shared through version control. Personal preferences go in
CLAUDE.local.md (add it to .gitignore) or ~/.claude/CLAUDE.md for all projects. CLAUDE.md files in parent
directories load at launch; files in subdirectories load when Claude works in them.
Scoped rules and imports
- .claude/rules/: split long instructions into topic files. Add a
pathsfrontmatter field to load a rule only for matching files, for examplepaths: ["src/api/**/*.ts"]. - @imports: a line like
@docs/testing.mdpulls another file into context. Paths resolve relative to the importing file. - AGENTS.md: if your repo has one, Claude Code ignores it once a CLAUDE.md exists. Tick the AGENTS.md option above to start
CLAUDE.md with
@AGENTS.mdso both load.
Example output
With the Python preset and a project name, the generator produces:
# billing-service
FastAPI service that issues invoices.
## Commands
- Install: `uv sync`
- Test: `uv run pytest`
- Lint / type-check: `uv run ruff check .`
## Code style
- Type hints on all public functions.
- Format with `uv run ruff format .`.
- Prefer the standard library before adding a dependency.
## Testing
- Tests live in tests/ and mirror the package layout.
- Use pytest fixtures instead of global state. Keep it effective
- Specific beats general: “Run
uv run pytest tests/unitbefore finishing” is followed; “test your code” is not. - Remove contradictions. When two instructions conflict, Claude may follow either one.
- Check what loaded by running
/contextin a session and looking at the memory files list.
Moving from Cursor? Convert your Cursor rules to CLAUDE.md and keep file-scoped rules scoped. Need the same instructions in other tools? Use Convert to other formats above.