← Back to all free guides

Fix Claude Code’s
3 Worst Habits

One free 65-line file, built from Andrej Karpathy’s biggest complaints about AI coding agents. Drop it in your project folder and Claude Code reads it automatically.

Andrej Karpathy was a founding member of OpenAI, ran AI at Tesla and founded Eureka Labs. In May 2026 he joined Anthropic. When he posts about why AI coding agents go wrong, people listen.

In one post he named the big ones. Agents guess instead of asking. They build "a bloated construction over 1000 lines when 100 would do." And they change code they don’t fully understand, even when it has nothing to do with the task.

A developer turned those complaints into a 65-line CLAUDE.md file and shared it free on GitHub. Claude Code reads a CLAUDE.md in your project folder at the start of every session, so the rules apply without you repeating them.

What The File Fixes

01

Silent assumptions

When an agent isn’t sure what you mean, it usually guesses, because guessing produces output. You get code that runs but solves a problem you didn’t have.

The first rule is Think Before Coding. Claude has to state its assumptions, lay out the options when there’s more than one reading, and ask when something is unclear. Karpathy’s words: "The models make wrong assumptions on your behalf and just run along with them without checking."

02

Overcomplication

Ask for a button and you can get a button, a wrapper component, a config file and a refactor of the parent. Five files for one feature.

The second rule is Simplicity First. Write the minimum code that solves the problem and skip features, abstractions and settings nobody asked for. The file’s gut check: would a senior engineer call this overcomplicated?

03

Edits you never asked for

A one-line bug fix comes back as a 200-line diff because the agent tidied the whole file while it was in there.

The third rule is Surgical Changes. Touch only what the task needs and match the existing style. If Claude spots unrelated dead code, it mentions it and leaves it alone. Every changed line should trace back to your request.

04

Bonus rule: prove it’s done

The fourth rule is Goal-Driven Execution. Each task gets a check you can verify, like a test that passes or a bug that stops reproducing. Claude keeps going until that check passes.

Set It Up In 30 Seconds

01

Option A: one project

Open the GitHub repo, copy the contents of CLAUDE.md, and save them in a file called CLAUDE.md in your project’s root folder. That’s the folder with your .git, package.json or pyproject.toml. Next time you open Claude Code there, it reads the file automatically.

Already have a CLAUDE.md? Add the rules to the end of yours, or paste this into Claude Code and let it merge them carefully.

Merge The Rules Into My CLAUDE.md
I want to add the Karpathy coding guidelines to this project. Here's the file: https://raw.githubusercontent.com/multica-ai/andrej-karpathy-skills/main/CLAUDE.md Do this in order and stop for my OK before step 4: 1. Fetch that file and read it. If you can't fetch it, tell me and I'll paste it in. 2. Check whether this project already has a CLAUDE.md in the root folder (the one with .git, package.json or pyproject.toml). If it does, read it. 3. Show me a plan: - If there's no CLAUDE.md: you'll create one with the guidelines, plus a short "Project notes" section at the top with how to run, test and build this project (from what you can see in the repo). - If there is one: list any rules in my file that conflict with the guidelines, and tell me where you'll add the new section. My existing project rules win on any conflict. 4. After I say OK, make the change. Touch only CLAUDE.md. 5. Show me the final file and the diff. Keep the whole file under about 150 lines. Don't invent build or test commands. If you can't find them, leave a TODO for me.

02

Option B: every project

The repo is also a Claude Code plugin. In Claude Code, run these two commands to use the guidelines across all your projects:

/plugin marketplace add multica-ai/andrej-karpathy-skills

/plugin install andrej-karpathy-skills@karpathy-skills

Make Sure It’s Working

The file says it’s working when your diffs get smaller, you rewrite less, and Claude asks its questions before it codes instead of after a mistake. To nudge it on a big task, start with this:

Think First Kickoff
Before you write any code for this task, follow the CLAUDE.md guidelines: 1. In 2 or 3 sentences, tell me what you think I'm asking for and list any assumptions you're making. 2. If anything is unclear or there are two reasonable ways to do it, ask me now instead of picking one. 3. Tell me the success check you'll use (a test that passes, a bug that stops reproducing, a page that matches the screenshot). 4. List the files you expect to change. If it's more than [3] files, explain why. Task: [describe the change]

Why It Works

The file isn’t magic. It’s a tight set of rules in a place Claude reads by default. Claude Code is more capable than its default habits, and clear rules close that gap. The tradeoff, which the file admits, is a little less speed on tiny tasks.