Skip to content
You commented “MEMORY”: here it is

3-Layer Claude Memory: CLAUDE.md Template

Copy this CLAUDE.md template to wire up persistent, project, and session-level memory so Claude never starts from scratch.

Free template · copy-paste ready · built by the BrainVaultAI team

Most people treat Claude like a stateless chatbot. That's why it forgets everything and you repeat yourself every session. The fix is a structured CLAUDE.md that gives Claude three layers to pull from: permanent facts about you and your business, project-level rules and current status, and session-level context that resets cleanly. This template is the exact format used in production. Drop it in your project root, fill in the brackets, and Claude will open every conversation already oriented. Use this whenever you start a new project or you notice Claude drifting, repeating questions, ignoring conventions, or losing track of where you left off. The three-layer split is the key: don't put everything in one blob. Paste the blocks below into a file called CLAUDE.md at the root of your repo. Customize the bracketed sections. The session layer gets wiped and rewritten by Claude itself at the start of each conversation.

CLAUDE.md: Layer 1: Permanent Owner Context
# Owner
[Your name]. [City/timezone]. Founder-operator running [N] projects. ## Voice
- Terse. No filler. Action-first.
- One directive at a time. Never present multiple options simultaneously.
- Short answers. I'll ask follow-ups. ## Non-negotiables
- Never pad responses.
- Never use em dashes.
- Never give generic advice. Account for my specific stack and situation. ## Stack defaults
- Backend: [e.g., Next.js + Supabase + TypeScript]
- Deployment: [e.g., Vercel]
- Payments: [e.g., Stripe]
- Auth: [e.g., Clerk] ## Key paths
| Area | Path |
|---|---|
| Main app | [/path/to/app] |
| Config | [/path/to/config] |
CLAUDE.md: Layer 2: Project Rules
# Project: [Project Name] ## What this is
[One paragraph. What the product does, who it's for, what problem it solves.] ## Current phase
[e.g., MVP. Shipping to first 10 paying customers.] ## Architecture decisions (locked)
- [Decision 1 and why, e.g., No ORM. Raw SQL only. Reason: performance.]
- [Decision 2 and why]
- [Decision 3 and why] ## Conventions
- File names: kebab-case
- Components: PascalCase
- API routes: /api/[resource]/[action]
- Error handling: always return { success, data, error } envelope ## Do not
- Add dependencies without asking
- Refactor working code unless it's blocking the task
- Skip error handling
CLAUDE.md: Layer 3: Session State (Claude rewrites this)
# Session State
<!-- Claude: rewrite this block at the start of each conversation based on what I tell you. --> ## Last worked on
[Claude fills this in based on what I tell it at session start] ## Current task
[Claude fills this in] ## Open questions
[Claude fills this in] ## Files in play
[Claude fills this in] ---
<!-- End session state -->

Want the editable version?

We'll send the editable version of this asset, plus a short series of our highest-leverage AI plays for operators. No spam. Unsubscribe in one click.

Free. No spam. Unsubscribe in one click. By submitting you agree to receive emails from BrainVaultAI.

More free AI guides in the full library · follow @brainVaultAI