The One File That Makes Claude Stop Guessing: Karpathy's 4 Rules for Claude Code
A single CLAUDE.md built from Andrej Karpathy's notes on AI coding mistakes, past 221,000 stars. Claude asks before it builds, keeps changes small, and proves the job is done
Andrej Karpathy, a co-founder of OpenAI, put the biggest problem with AI coding in one line: the models make wrong assumptions on your behalf and just run along with them without checking. Someone turned his notes into a single CLAUDE.md file for Claude Code, and it's past 221,000 stars.
Here's what the four rules do, how to add the file in two minutes, and when to tell Claude to skip them.
The four rules
- Think before coding: Claude states its assumptions, lays out the options and asks you when something is unclear.
- Simplicity first: the least code that solves the problem, nothing extra 'just in case'.
- Surgical changes: Claude only touches what you asked for and leaves working parts alone (it points out other problems instead of rewriting them).
- Goal-driven: your request becomes checks Claude can run, like tests, and it keeps going until they pass.
Add it in two minutes
- Open Claude Code in your project.
- Easiest: type /plugin marketplace add forrestchang/andrej-karpathy-skills, then /plugin install andrej-karpathy-skills@karpathy-skills.
- Or keep it per project: download the CLAUDE.md file from the repo into your project folder (or paste its text at the end of the CLAUDE.md you already have).
- Start a new session so Claude reads it.
- Give it a real task and watch it ask its questions first.
Read CLAUDE.md first. I want to add [the feature] to this project. Before you write any code, list what you're assuming and ask me anything that's unclear. Then make the smallest change that does it, and show me how you checked it works.
Free, for your email
Get the full setup steps + the copy-paste setup prompt
The rest of this guide (2 more sections) opens right here. The setup prompt, one paste into Claude that sets it all up, comes by email only. Use your real address.
50,000+ follow where these guides come from. No spam, unsubscribe in one click.