Prompt & Done · CLAUDENOTE

The CLAUDE.md starter note

Claude Code reads CLAUDE.md at the start of every session. Save this as ./CLAUDE.md in your project root (or ~/.claude/CLAUDE.md for rules that apply to every project), then edit it to your project.

Tested 7 Nov 2026 with Claude Code 2.1.319.

1 The starter note

# CLAUDE.md

## Commands
- Run tests: `make check`   <- replace with yours
- Lint/format: `npm run lint`

## Rules Claude can't guess
- Every function gets a one-line docstring.
- Every new function gets a test.
- Never edit `legacy/` or `vendor/`.

## Project layout
- src/ app code, tests/ tests, scripts/ one-off tools

2 Three tips

Start from /init: run /init in Claude Code to get a first draft from your codebase, then add the rules it can't discover.

Keep it short: the docs suggest under 200 lines. It's loaded every session and costs context.

It's context, not enforcement: to hard-block an action, use a hook.

3 Our test

The same claude -p request twice. Without CLAUDE.md: no docstring, no test. With a 3-line CLAUDE.md (run tests with make check; every function gets a one-line docstring in Spanish; every new function gets a test): Spanish docstring and a new test, make check OK. One run each, not a benchmark.

code.claude.com/docs/en/memory