dong evan

Apr 29, 2026 • 3 min read

The 97.8k-Star File That Makes Claude Code Stop Overengineering

The 97.8k-Star File That Makes Claude Code Stop Overengineering

!Karpathy Skills GitHub

There's a specific kind of frustration that comes from working with AI coding assistants.

You ask for something simple. You get something elaborate. You ask for a bug fix. You get a refactor. The model is technically doing what you asked — but it's also doing a dozen things you didn't ask for, and now you have to untangle which changes were intentional.

Andrej Karpathy felt it too. The OpenAI co-founder and former Tesla AI director posted on X in January 2026 about four failure modes he kept hitting with LLM coding tools. His observations were precise, recognizable, and immediately resonant with anyone who'd spent serious time with these tools.

Someone took those observations and turned them into a CLAUDE.md file. A single configuration file you drop in your project root. Claude Code reads it and adjusts its behavior accordingly.

The repo — forrestchang/andrej-karpathy-skills — has 97.8k stars on GitHub. Nearly 100,000 developers found it useful enough to bookmark.

Here's what it actually contains, and why I think one rule matters more than the others.

The Four Rules

Rule 1: Think Before Coding. The model should state its assumptions explicitly before writing code. If it's uncertain about something, it should ask rather than guess. If multiple interpretations exist, it should surface them. This sounds obvious, but the default behavior is the opposite — models make silent assumptions and run with them, and you only discover the mismatch when the output is wrong.

Rule 2: Simplicity First. Write the minimum code that solves the problem. No abstractions for single-use code. No speculative features. No error handling for impossible scenarios. The litmus test: would a senior engineer look at this and say it's overcomplicated? If yes, rewrite.

Rule 3: Surgical Changes. Touch only what you must. Don't improve adjacent code, comments, or formatting. Match existing style even if you'd do it differently. Every changed line should trace directly to the user's request. This is the rule that keeps your diffs clean and your code reviews sane.

Rule 4: Goal-Driven Execution. Transform vague tasks into verifiable goals. "Fix the bug" becomes "write a test that reproduces it, then make it pass." The model loops until the criteria are met rather than stopping at "looks about right."

Why Surgical Changes Is the One That Actually Changes Your Day

I've thought about which of these four rules delivers the most practical value, and I keep coming back to Surgical Changes.

Overengineering is visible. When the model writes 200 lines for a 5-line problem, you see it immediately. Bad assumptions surface during debugging — the output is wrong, you trace back, you find the assumption. Both of these failure modes are recoverable.

Drive-by changes are different. When the model fixes your bug and also adds type hints to three adjacent functions, reformats string quotes, and renames a variable for "clarity" — that's 40 lines of diff when you needed 4. During code review, you can't tell which changes were intentional. You have to read every line carefully. The noise is invisible until you're already in it.

Surgical Changes eliminates that entire category of problem.

The Limitation

These rules address behavioral tendencies, not capability gaps. If the model doesn't understand your codebase's architecture, four rules won't save it. And Simplicity First can occasionally overcorrect — some abstractions are genuinely necessary, but the model can't always distinguish "necessary abstraction" from "overengineering."

As a default configuration, though, the cost-benefit is hard to argue with. One file, zero setup, immediate effect on the quality of your diffs.

Installation

# Claude Code plugin
/plugin marketplace add forrestchang/andrej-karpathy-skills
/plugin install andrej-karpathy-skills@karpathy-skills

# Or just download the file
curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md

Cursor users: copy .cursor/rules/karpathy-guidelines.mdc into your project's .cursor/rules/ directory.


Rules constrain behavior. They don't raise the capability ceiling. If you're building AI workflows that need to call multiple models — different models for different tasks — EvoLink provides a single API gateway to 30+ models. One endpoint, pay-per-use, no vendor lock-in.

The repo: forrestchang/andrej-karpathy-skills. 97.8k stars. Worth the 30 seconds to install.

Join dong on Peerlist!

Join amazing folks like dong and thousands of other builders on Peerlist.

peerlist.io/

It’s available... this username is available! 😃

Claim your username before it's too late!

This username is already taken, you’re a little late.😐

0

1

0