Four Rules to Stop Your AI from Architecting Itself into a Corner
These guidelines turn Andrej Karpathy's field notes on LLM coding failures into behavioral guardrails that Claude Code actually follows.

What it does
This repo packages Andrej Karpathy’s specific complaints about how LLMs write software—silent assumptions, unchecked confusion, and gratuitous overengineering—into four concrete principles meant to constrain Claude Code. It ships as both a cross-project plugin and a per-project CLAUDE.md, plus a matching Cursor rule. The goal is to force the model to ask rather than guess, simplify rather than bloat, and touch only what you asked for.
The interesting bit The guidelines act as a behavioral patch for autocomplete’s worst instincts. “Surgical Changes” explicitly forbids “improving” adjacent code or matching your preferred style over the existing one, while “Goal-Driven Execution” demands verifiable success criteria instead of vague imperatives like “fix the bug.”
Key highlights
- Four rules: Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution
- Forces explicit reasoning: state assumptions, present tradeoffs, and stop when confused
- Ships with a Cursor rule file so the same constraints apply in
.cursor/rules/ - Designed to merge with existing
CLAUDE.mdfiles rather than replace them - Explicitly admits it is biased toward caution over speed
Caveats
- The README’s installation instructions are vague; “Open fastsetup application” is not a universally recognized step
- At its core, this is a well-structured markdown prompt packaged as a plugin
Verdict Worth a look if Claude Code has ever silently rewritten your imports or architected a 1,000-line solution to a 100-line problem. If you already enforce strict prompting discipline manually, this formalizes your existing workflow without adding much else.
Frequently asked
- What is 0xwilliamortiz/andrej-karpathy-skills?
- These guidelines turn Andrej Karpathy's field notes on LLM coding failures into behavioral guardrails that Claude Code actually follows.
- Is andrej-karpathy-skills open source?
- Yes — 0xwilliamortiz/andrej-karpathy-skills is open source, released under the MIT license.
- How popular is andrej-karpathy-skills?
- 0xwilliamortiz/andrej-karpathy-skills has 576 stars on GitHub.
- Where can I find andrej-karpathy-skills?
- 0xwilliamortiz/andrej-karpathy-skills is on GitHub at https://github.com/0xwilliamortiz/andrej-karpathy-skills.