Karpathy Breaks Down What Claude Code Keeps Doing Wrong
A LinkedIn post by Hamza Khalid about a repo that hit 110K GitHub stars in under 3 months and stayed #1 trending for 28 days straight — distilling Andrej Karpathy’s principles for Claude Code into a karpathy-guidelines.mdc file.
The Dos and Don’ts
- Do: State assumptions before writing a single line of code.
- Do: Write the minimum code that solves the problem. Then stop.
- Do: Define success criteria before starting any multi-step task.
- Do: Ask clarifying questions before implementing, not after making mistakes.
- Never: Over-engineer or touch code you weren’t asked to.
For Claude.ai users: paste the 4 principles into your project instructions and add them to your skill as a negative-instructions block.
Discussion
- Idan Schorr (top comment): “The post admits the principles aren’t new in paragraph two. What went viral was the relief. Every Claude Code user has had it rewrite the login system when they asked for a hex code change.” Adds it “helps for the first ten messages, then it gets bored and refactors your test suite anyway.”
- Gerson Gerard Cruz: Principle #1 shows how much human intervention matters — clarity of thinking before typing any code.
- Md Sajib Shaikh: “Silent assumptions cause more AI coding mistakes than bad code generation itself.”
- Dr. Joerg Storm: Over-engineering appears when success criteria stay vague; better outcomes correlate with earlier constraint anchoring.
- Natan Mohart: “‘Simplicity First’ might be the most valuable principle — AI struggles less with writing code than with knowing when to stop writing code.”