Write a useful CLAUDE.md

Record recurring project commands, locations, and working limits in Claude Code’s project guidance.

Include guidance the next session needs

Use project instructions for stable conventions, test commands, and directories worth knowing. Keep current issue details with the assignment. For actions that must be blocked regardless of model behavior, use the client’s actual controls or project permissions.

How Claude remembers your project

Write a small service brief

Routes are under src/http, an approved local test command is npm run test:api, and changes to a shared database need owner review. Put those details in CLAUDE.md alongside one sentence about the service’s purpose.

Check the expected onboarding result

Open a new project session and ask Claude to plan a small route change. It should locate src/http, name the local API check, and say which shared database action needs review. Confirm the project instruction file is loaded in the session’s context view.

Verify after a project move

Rename the route directory in a fixture and update the guidance. Replay the plan. If it still names the old path, check which project instructions loaded and remove stale guidance. Confirm the recorded test command remains valid.

Related reading

Claude is not a search engine

Plan, implement, verify

Check yourself: Claude Code