A file named CLAUDE.md hit #1 on GitHub Trending.
82,000 stars. 7,800 forks.
It started with Andrej Karpathy. Former Director of AI at Tesla. Founding member of OpenAI. He identified 4 behaviors that make Claude Code fail and wrote them down in a single file.
A developer took those 4 rules, expanded them, published the file. It went viral..
The reason: coding accuracy went from 65% to 94%.
Most developers using Claude Code daily have never set this up. They're starting from zero every session. Re-explaining the same context. Cleaning up unwanted scope changes. Reverting refactors nobody asked for.
This is the full file.
The setup most devs missed
Every time you open Claude Code, it starts with nothing.
It doesn't know your stack. Your standards. Your project context. What you've already tried. What you explicitly decided not to do three sessions ago.
So it guesses. And when it guesses, it refactors code you didn't ask it to touch. It suggests frameworks that break your existing architecture. It deletes files without asking. It contradicts decisions you already made.
CLAUDE.md is a plain text file you place in your project root. Claude Code reads it automatically at the start of every session.
One setup. Zero repeated explanations. Three categories of expensive mistakes fixed.
1 / 3 | DEFAULTS: $375/week you're spending to repeat yourself
The average developer spends 30 minutes per day re-explaining context to Claude.
Stack. Coding standards. Project background. What's already been tried. None of it persists between sessions unless you write it down once and let Claude read it every time.
30 minutes per day at $150/hour developer rate: $375/week. Per developer.
For a team of 5: $1,875/week gone.
These 7 rules go at the top of your CLAUDE.md file.
→ Kill the filler:
→ Match length to the task:
→ Show options before acting:
→ Admit uncertainty before it costs me:
→ Who I am and what I know:
→ Current project context:
→ Lock your voice:
Time spent re-explaining context per day: 30 min At $150/hour developer rate: $75/day Per week: $375/week per developer Team of 5: $1,875/week CLAUDE.md setup for this section: 45 minutes total
mistake to avoid: don't write your CLAUDE.md from scratch. Use this prompt first, then edit the output:
2 / 3 | BEHAVIOR: the $150/hour changes you didn't authorize
You ask Claude to fix one function.
It refactors three files, renames your variables, reorganizes imports, and rewrites comments you spent time crafting.
All without asking.
1 hour to review and revert unwanted changes: $150. Three times a week: $450/week. Per developer.
For a team of 5: $2,250/week spent cleaning up changes nobody authorized.
These 7 rules go in the behavior section of your CLAUDE.md.
→ Stay in scope:
→ Ask before big changes:
→ Confirm before anything destructive:
→ Hard stops for production:
→ Always show what changed:
→ Never act without explicit confirmation:
→ Think before you write code:
1 hour/week reverting unwanted scope changes: $150/week 30 min/week doing manual diffs after each task: $75/week Total behavior-related waste per developer: $225/week Team of 5: $1,125/week CLAUDE.md behavior section setup: 30 minutes
3 / 3 | MEMORY + STACK: the setup that makes Claude Code actually reliable
Claude forgets everything between sessions.
Every decision you made. Every approach that failed. The reason you chose Prisma over Drizzle six months ago. The constraint that exists because of a specific client requirement.
It forgets. Then it suggests exactly what you already ruled out.
This section gives Claude the closest thing to real memory that currently exists. And locks your tech stack so it stops proposing tools that break your existing architecture.
→ MEMORY.md decision log:
→ Session end summary:
→ ERRORS.md failure log:
→ Permanent facts list:
→ Lock your tech stack:
→ Extended Thinking for hard decisions:
→ The 4 rules that went viral:
Karpathy identified 4 behaviors that make Claude Code fail. A developer distilled them into these 4 lines. Coding accuracy went from 65% to 94%.
2 hours/week recovering from forgotten decisions and wrong suggestions: $300/week per dev Wrong stack recommendations and incompatible tools: $75/week Total memory-related waste per developer: $375/week Team of 5: $1,875/week MEMORY.md + ERRORS.md + stack setup: 20 minutes
CONCLUSION
Here's the full math.
$375/week re-explaining context every session $225/week reverting unauthorized changes $375/week recovering from forgotten decisions Total waste per developer: $975/week
Team of 5 developers: $4,875/week Per year: $253,500
CLAUDE.md setup: 2 hours total Karpathy's 4 rules alone: 65% to 94% coding accuracy
One plain text file. 21 rules. Two hours of work.
The developers who set this up are working with a version of Claude that remembers decisions, stays in scope, confirms before destroying anything, never suggests a framework that breaks your architecture.
The ones who haven't are spending $975/week to repeat themselves.
p.s. start with Karpathy's 4 rules. just those 4. paste them into a new file called CLAUDE.md in your project root right now. it takes 2 minutes. add the rest one week at a time as you notice what's missing.
Bookmark this before it gets buried. If this was useful, share it with one person who needs it.

