CLAUDE.md project memory template
A free CLAUDE.md template for Claude Code: project summary, exact commands, layout, workflow, guardrails and code style, with bracketed sections to fill in.
- Install
CLAUDE.md (project root)- Last tested
- Claude Code · 2026-10-15
Claude Code reads CLAUDE.md from your project root as project memory, so whatever you put here applies to every session in the repo. This template gives Claude the things it otherwise has to guess: what the app is, the exact commands to install, test, lint and build, and where code lives.
Replace every [bracketed] section with your own details. The Commands section matters most. When Claude knows the real test and build commands, it can check its own work before telling you it's done.
The Rules section sets guardrails: no secrets or .env edits, ask before destructive commands, explain new dependencies, and never delete failing tests to get green. It also points to the code-reviewer and test-writer subagents. The code-reviewer is free in this library. The paid Claude Code pack has the full set of subagents.
CLAUDE.md# CLAUDE.md
## Project
[One paragraph: what this app does, who uses it, and what "done" looks like for most tasks.]
## Stack
- [Framework, language, package manager, database, hosting]
## Commands
- Install: `[pnpm install]`
- Dev server: `[pnpm dev]`
- Tests: `[pnpm test]` (single file: `[pnpm test path/to/file]`)
- Lint/typecheck: `[pnpm lint && pnpm typecheck]`
- Build: `[pnpm build]` (must pass before you say a task is finished)
## Layout
- `[src/app]` routes/pages
- `[src/lib]` shared logic, no UI
- `[tests/]` tests mirror source paths
## Workflow
1. Read the relevant files before editing. For anything non-trivial, write a short plan and wait if the plan changes public APIs or data models.
2. Make small, focused changes. Run the relevant tests after each meaningful step.
3. Prefer editing existing patterns over inventing new ones. Match naming and file structure.
4. If a task is ambiguous, state your assumption explicitly and proceed.
5. When finished: summarize what changed, what you tested, and anything left undone.
## Rules
- Never commit secrets or edit `.env*` files. Never run destructive commands (drop tables, force-push, `rm -rf` outside the repo) without asking.
- Don't add dependencies without saying why and what the alternative was.
- Don't silence errors or delete failing tests to make things pass; fix the cause or report it.
- Use the `code-reviewer` agent after significant changes and the `test-writer` agent for new logic.
## Code style
- [TypeScript strict, no `any`] · [functional components] · [early returns over nesting]
- Comments explain *why*, not *what*.
Installable Claude Code plugin: 12 subagents, 8 skills and 3 tested safety hooks. This free entry is one file; the pack is the full multi-file set.