You ask Claude to fix one small thing. It fixes it. It also renames three variables, rewrites a function you never mentioned, adds error handling for cases that can't happen, and deletes a comment it didn't understand.
If that sounds familiar, you are not alone. Andrej Karpathy, one of the best-known names in AI, described exactly this on X: models make wrong assumptions and keep going without checking, they overcomplicate code, and they change things that have nothing to do with the task.
A developer took those observations and turned them into a single instruction file for Claude Code. It's called andrej-karpathy-skills, it's free, and it has over 200,000 stars on GitHub.
One thing worth clearing up: Karpathy didn't write the file. It's based on what he said, not written by him.
The four rules
- Think before coding. Say out loud what you're assuming. If a request can be read two ways, show both instead of picking one quietly. If you're confused, stop and ask.
- Simplicity first. Write the least code that solves the problem. No features nobody asked for, no abstractions for something used once, no handling for impossible cases.
- Surgical changes. Touch only what the task needs. Don't restyle or refactor the code next door. Every changed line should trace back to the request.
- Goal-driven execution. Turn a vague task into a goal you can check, for example a test that fails now and should pass. Then loop until it passes.
How to install it
Two options:
- As a Claude Code plugin, available in every project. Run these two commands inside Claude Code:
/plugin marketplace add forrestchang/andrej-karpathy-skills
/plugin install andrej-karpathy-skills@karpathy-skills
- As a CLAUDE.md file in one project. Download the file into the project folder, or paste its contents at the end of the CLAUDE.md you already have.
Cursor users get a ready rule file in the same repo.
How to tell it's working
- Smaller diffs, with fewer changes you didn't ask for.
- Simpler code on the first try.
- Questions come before the code, not after the mistake.
What to know first
- It's an instruction file, not magic. Claude can still make mistakes. It just gets clearer rules to work by.
- It trades speed for caution. On a typo fix you don't need all four rules. The file says so itself.
- You don't need to comment anywhere to get it. Some posts ask you to comment a keyword to receive it by DM. It's public, on GitHub, under the MIT license.
The bottom line
If Claude keeps "improving" things you didn't ask about, this fix costs nothing: one file, two minutes. The four rules are also on Masterphub as a ready skill: search "Karpathy" on Masterphub.
COPY. PASTE. PROFIT.
MASTERPHUB | UR PORTAL TO A NEW ERA
Sources