Pattern · Discipline

Viral CLAUDE.md

Karpathy · Forrest Chang

Karpathy named the failure modes in late 2025. Chang turned them into a 70-line file (Jan 2026) that crossed 110k stars — one of the fastest-growing GitHub repos of the year. The artifact matters more than the prose: a copy-pasteable boilerplate clients will already have heard of.

01 Think before code
Work through the problem first. Show reasoning. Identify uncertainty.
02 Simplicity first
Simplest thing that could work. No unrequested abstractions.
03 Surgical changes
Touch only what's in scope. Flag other issues; don't fix them.
04 Ask, don't assume
Flag uncertainty explicitly before proceeding.
The four rules at the core of the file. Most of the surrounding 70 lines repeats these or extends them with voice/identity/stack-lock guidance.

What's novel beyond the four rules: a tech-stack lock, mandatory change-summaries, hard stops for destructive/production actions, and MEMORY.md / ERRORS.md — persistent decision and failure logs. That last pair is the genuine contribution — a concrete instantiation of the Write operation in context engineering.

Don't repeat the "65% → 94% accuracy" number to clients. No methodology was published. The accompanying "$975/dev/week" math is napkin-quality. Citing either would undermine our credibility. See Synthesis · honest outcomes.

Maps onto patterns we already have:

Karpathy (observation) · Forrest Chang (distillation) · multica-ai/andrej-karpathy-skills

Recommend the file as a starting boilerplate — tailored to client stack/voice, percentage stripped. Cautionary tale for the prompt-file linter: don't cargo-cult all 70 lines.