Karpathy coding guidelines
Updated 2026-08-04
Questions this answers
- My AI coding agent overcomplicates everything and adds stuff I didn't ask for.
- How do I get Claude Code to write simpler, more careful code?
- The agent makes wrong assumptions and charges ahead without checking.
- Is there a good starting set of rules for coding with an AI agent?
The Fix
These are coding guidelines, drawn from Andrej Karpathy's take on where AI agents go wrong, that you drop into Claude Code or Cursor to make them more disciplined. The gist: think before coding and name your assumptions, keep the code minimal, make surgical edits that touch only what the task needs, and work toward a clear definition of done. Karpathy's point is that models make wrong assumptions and overbuild, and the rules push back on that.
You install it as a Claude Code plugin so the rules apply across your projects, or drop the CLAUDE.md into a single repo if you only want it there. It's the same idea as Taste Skill, a small instruction pack that shapes how the agent behaves, pointed at code discipline this time. If you've watched an agent barrel ahead and overcomplicate, this is a ready-made correction.
When to Use It
Worth it if you code with an AI agent and keep having to rein it in, especially the overbuilding and the sprawling edits. Installed as a plugin, it's a set-and-forget baseline that nudges the agent toward simpler, more careful work on every project.
It's opinionated by design, so if you disagree with the minimalist bent, treat it as a starting point and cut what you don't want. And it only shapes behavior through instructions, so it's no substitute for reading the diff. You still check the work.