THE VAULT / SHIP IT / MARKDOWN
CLAUDE.md starter for non-developers
Most CLAUDE.md files I see from readers are 500+ lines of rules the model quietly ignores. Mine is under 80 lines and it's done more for output quality than any model upgrade this year. This is that file: a complete anti-bloat starter you can paste in today, plus the reasoning for every line, the list of things to cut, and three variants for the most common project shapes.
LAST VERIFIED 2026-07-08
NOTE
Use this page as a prompt reference. Every file below is built to be handed straight to an AI. Download it, drop it into Claude, ChatGPT, Cursor, or Lovable, and say "use this as my playbook." The prompts on this page are copy-paste ready.
CLAUDE.md is 80 lines of leverage, not an 800-line rulebook
CLAUDE.md is a plain markdown file at the root of your project. Claude Code reads it at the start of every session and treats it as standing instructions. That's the whole mechanic: whatever is in there is context the agent carries into every task, without you retyping it.
That makes it the highest-leverage file in your repo. It's also the easiest one to ruin, because the failure mode isn't an error message. It's silence.
WATCH OUT
The bloat trap: every line of CLAUDE.md competes for the model's attention with your actual task. Stuff it with 600 lines of rules and the model starts treating all of it as background noise, including the 5 rules you actually care about. Giant copy-pasted "rule packs" from the internet are a known failure mode: people install them, notice the agent ignoring rules, and conclude CLAUDE.md doesn't work. It works. Theirs is just too long to matter.
The strongest signal I know: the most-loved public CLAUDE.md files people actually share and copy tend to be tiny. The one I see cited most (as of July 2026) is 65 lines. Not 65 rules. 65 lines, total, including headers and blank lines. Meanwhile the 1,000-line "ultimate CLAUDE.md" repos get stars and then get ignored by the model that has to read them.
| Bloated CLAUDE.md | Working CLAUDE.md |
|---|---|
| 400-1,000+ lines | 50-100 lines |
| Rules copied from someone else's stack | Rules earned from your agent's actual mistakes |
| "Write clean, maintainable code" | "No any, ask before adding dependencies" |
| Explains what the code already shows | Explains only what the code can't show (intent, danger zones) |
| Written once, never touched | Pruned every time a line stops being true |
One more framing before the file: CLAUDE.md is not documentation for humans and it's not a personality transplant for the model. It's an operating agreement. What the project is, how to run it, what's off-limits, when to ask, and what "done" means. That's 6 sections. Everything else is optional.
The starter file: complete, annotated, under 80 lines
Here's the whole thing. Comments (the <!-- --> blocks) explain each section inline; you delete them after filling in the brackets. Filled in and stripped, this lands around 45-60 lines.
- 1
Drop it in
Save the file as
CLAUDE.mdin your project root (same folder as package.json or your main script). Claude Code picks it up automatically on the next session. No config, no restart flag. - 2
Fill every bracket, delete every comment
Replace each
[BRACKET]with your real values. Then delete all the<!-- -->comment blocks. The comments are for you, not the model; leaving them in is exactly the kind of dead weight this file exists to avoid. - 3
Delete what doesn't apply
No test suite yet? Cut the test line from Commands and adjust Definition of done. No legacy folder? Cut it from Never touch. An empty section beats an invented rule. Fake rules teach the model your file can't be trusted literally.
- 4
Test it in one session
Start a fresh session and give it a small real task. Watch whether it runs your check command before claiming done, and whether it asks before the things you flagged. If yes, you're set. If no, the fix is usually making the line more specific, not longer.
NOTE
Don't want to fill brackets by hand? Run /init in Claude Code and it drafts a CLAUDE.md from your codebase. It's a decent first pass but it tends to over-describe what the code already shows. My move: run /init, then cut it down to this starter's 6 sections and delete everything else. Or use the interview prompt below.
Line by line: why each section earns its place
Six sections, and each one exists because leaving it out costs you something specific. Here's the case for every line, so you know what you're deleting when you delete it.
- 1
What this is (2 lines)
The agent can infer your stack from the code in seconds. What it can't infer is intent and stakes: who this is for, what part is money-critical, what phase the project is in. Two lines of intent change hundreds of small decisions downstream (how defensive to be, what to optimize for). Two lines. If you're writing a third, you're describing the code, and the code already does that.
- 2
Commands (4-6 lines)
Without this, the agent guesses commands from package.json and sometimes guesses wrong, or runs
npm testwhen your suite needs a flag. Worse, it doesn't know your deploy rule. The parentheticals are the real payload: "run before saying anything is done" and "never deploy another way" are behavioral rules smuggled into a reference list. Cheapest 5 lines in the file. - 3
Code style (3-5 lines, all checkable)
One filter decides what belongs here: could a reviewer look at a diff and say pass or fail? "No
any" passes the filter. "Prefer readable code" doesn't, so it goes. And if your linter already enforces a rule, the linter is the better home for it; putnpm run checkin Commands instead of restating 30 lint rules in prose. The closing line, "match surrounding code," is the one style meta-rule worth stating because it resolves every case you didn't cover. - 4
Never touch (the highest-ROI section)
This is the section that prevents the expensive day. Env files with secrets, applied migrations, generated folders, the payment webhook. Each entry should name a real path in your repo and, in one parenthetical, why. The why matters: "secrets" and "immutable once applied" let the model generalize correctly to files you forgot to list. Three to five entries is normal. Fifteen means you're listing things that were never in danger.
- 5
When unsure (the ask-vs-proceed contract)
Agents fail in two opposite directions: stopping to ask about everything (you become a human OK-button) or barreling through ambiguity (you get 400 confident lines solving the wrong problem). This section draws the line explicitly: ambiguous requirements means ask, ambiguous implementation means pick one and say why, and payments/auth/user-data/destructive ops always mean ask. Four lines, and it's the difference between an agent you supervise and an agent you babysit.
- 6
Definition of done (the section that pays rent)
Every vibe coder learns this one the hard way: the agent says "done, the feature is implemented" and the build doesn't even compile. Not lying exactly, just a looser definition of done than yours. This section replaces its definition with yours: checks pass, tests pass, the flow was actually exercised, no new console errors. The last line ("say so plainly instead of describing the work as complete") is doing real work: it gives the model explicit permission to report failure, which is what cuts down the fake-victory writeups.
PAYOFF
The pattern across all six: the file contains only what the agent cannot get from the repo and cannot be trusted to assume. Intent, danger zones, your risk tolerance, your bar for done. Everything else is either in the code or in the linter, and duplicating it just dilutes these six sections.
What NOT to put in (this list is why the file stays short)
The starter is easy. The discipline is what you keep out. Run your current CLAUDE.md against this list; every hit is a line to delete. When I did this to my own main project file it went from 340 lines to 72, and rule-following got visibly better within a week, because the 6 rules I cared about stopped competing with 300 lines of filler.
- [ ]Personality instructions. "You are a world-class senior engineer with 20 years of experience." Costs a line, changes nothing about the diff. The model doesn't code better when flattered.
- [ ]Framework tutorials. 40 lines explaining how Next.js routing or React hooks work. The model's training covers your framework in more depth than your summary; you're paying context for a worse version of what it already knows.
- [ ]Anything the repo already shows. Folder structure diagrams, dependency lists, "we use TypeScript and Tailwind." The agent reads the repo every session. Restating it is pure duplication, and it goes stale the first time you refactor.
- [ ]Aspirational fluff. "Write clean, elegant, maintainable, well-documented code." Not checkable, so not followable. Every wish-rule dilutes the real rules around it.
- [ ]Rules your linter already enforces. If ESLint or ruff catches it, one Commands line (
npm run checkmust pass) covers all of them. Restating 30 lint rules in prose is 30 lines of redundancy. - [ ]Generic best-practice packs from the internet. Rules written for someone else's stack and someone else's failure modes. If you didn't earn the rule from your own agent's mistake, you probably don't need it (see the growth rule below).
- [ ]Changelogs and session notes. "On June 12 we refactored auth." That's git history. CLAUDE.md is standing instructions, not a diary.
- [ ]Full API or schema documentation. If the agent needs your DB schema, it can read schema.prisma. If a doc is genuinely needed sometimes, add one line pointing to it ("DB schema: prisma/schema.prisma") instead of pasting it.
- [ ]Motivational threats and bribes. "This is EXTREMELY IMPORTANT, my job depends on it, I will tip $200." Popular in 2023 prompt lore, dead weight in a standing instructions file.
- [ ]Rules for tools you don't use. Docker rules with no Dockerfile, testing rules with no tests. The model notices when your file describes a project that doesn't exist, and your credibility (yes, files have credibility) drops.
WATCH OUT
The meta-mistake behind most of these: treating CLAUDE.md as a place to feel thorough instead of a budget to spend. Every line you add taxes every line already there. The question is never "could this help?" It's "does this earn its slot over the 6 sections that definitely do?"
Growing it: one rule, and it's "twice"
The starter is a floor, not a ceiling. It will grow. The only question is whether it grows from evidence or from anxiety, and there's a one-word test that decides it: twice.
You only add a line after the agent gets the same thing wrong twice. Not "might get wrong." Not "a blog post said agents often get this wrong." Got it wrong, in your repo, two separate times.
- 1
First mistake: fix it, note it, add nothing
Correct the agent in the session and move on. One occurrence might be a fluke of that session's context. If you want, keep a scratch note (I keep a
## Candidatessection at the bottom of a personal notes file, never in CLAUDE.md itself). - 2
Second mistake: now it's a pattern, add ONE line
Same mistake again means it's systematic, and it's earned its slot. Write the line the way you'd correct a contractor: specific, checkable, one sentence. "Use the
formatDatehelper in src/lib/dates.ts, nevernew Date().toLocaleDateString()." Slot it into whichever of the 6 sections it belongs to. A quick way in the moment: press#in Claude Code and type the rule; it gets added to memory for you, then move it to the right section next time you're in the file. - 3
Write it against the mistake, not against the topic
Bad: "Be careful with dates and timezones." Good: "All timestamps are stored UTC; convert to user timezone only in components." The first is a topic. The second is the actual correction, and it's checkable.
- 4
Prune on the same standard
Once a month (or whenever you're in the file), read every line and ask: is this still true, and has it fired recently? Rules for code you deleted, workflows you changed, or mistakes the models simply stopped making: cut them. A stale rule is worse than a missing one, because the model can tell when your file doesn't match your repo.
PAYOFF
Run the twice-rule honestly and the math works out to roughly 1-3 new lines a month on an active project. After 6 months you have maybe 90 lines, every single one backed by two real incidents. That file outperforms any 1,000-line pack you can download, including, frankly, a longer version of this one.
One escape hatch worth knowing as your project grows: CLAUDE.md files nest. A CLAUDE.md inside a subfolder applies when the agent works in that folder. So when your root file starts collecting rules that only matter for one area (src/billing/, scripts/), move them into a small CLAUDE.md in that folder instead of growing the root. Root file stays under 100 lines, area rules load only when relevant.
Variants: Next.js SaaS, Python scripts, monorepo
Same skeleton, different brackets. Each variant below is a diff from the base starter: what to swap or add, section by section. Full copy-paste versions of all three are in the download.
Variant: Next.js SaaS (Stripe, auth, database)
The defining feature of a SaaS repo is that some code loses money when edited wrongly. The variant mostly hardens Never touch and Definition of done.
The npm run build addition is the one I'd fight for: dev mode is forgiving about server/client component boundaries, and "works in dev, fails in the production build" is one of the top 3 ways a Next.js session ends in a fake done.
Variant: Python script project (scrapers, pipelines, automation)
Script projects usually have no test suite and no build step, so Definition of done shifts from "checks pass" to "ran end to end on real input, show me the output."
"Show me actual output" is the load-bearing line. On script projects the fake-done rate is highest because there's no compiler to call the bluff; making the agent paste real output closes that gap.
Variant: Monorepo (multiple apps and packages)
In a monorepo the root CLAUDE.md becomes a constitution (rules that apply everywhere) and each workspace gets its own small file. The two failure modes to write against: running commands from inside a workspace instead of the root, and "helpfully" editing workspaces the task wasn't about.
The nesting mechanic from the growing-it section is the whole play here: per-workspace files load when the agent works in that workspace, so the root file stays small and nobody's context gets taxed with another workspace's rules.
That's the whole system: one file under 80 lines, six sections that each earn their place, a delete list, and one growth rule. Download the starter, fill the brackets tonight, and the next session you run will already behave differently. When a rule earns its way in via the twice-rule, you'll know the file is working.
Get the next drop
Every new Vault system ships to the list first. Twice a week, free.