Claude Code × Andrej Karpathy

Karpathy-Inspired Claude Code Guidelines

A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.

“The models make wrong assumptions on your behalf and just run along with them without checking. They don't manage their confusion, don't seek clarifications, don't surface inconsistencies, don't present tradeoffs, don't push back when they should.”— Andrej Karpathy
Get Started Free →

Demo

Video Preview

The Problems

What Goes Wrong

“The models make wrong assumptions on your behalf and just run along with them without checking. They don't manage their confusion, don't seek clarifications, don't surface inconsistencies, don't present tradeoffs, don't push back when they should.”
“They really like to overcomplicate code and APIs, bloat abstractions, don't clean up dead code… implement a bloated construction over 1000 lines when 100 would do.”
“They still sometimes change/remove comments and code they don't sufficiently understand as side effects, even if orthogonal to the task.”
— Andrej Karpathy

The Solution

Four Principles in One File

PrincipleAddresses
Think Before CodingWrong assumptions, hidden confusion, missing tradeoffs
Simplicity FirstOvercomplication, bloated abstractions
Surgical ChangesOrthogonal edits, touching code you shouldn't
Goal-Driven ExecutionLeverage through tests-first, verifiable success criteria

The Framework

Four Principles. One File.

Each principle directly addresses a real LLM coding failure mode.

01

Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs. State assumptions explicitly — if uncertain, ask rather than guess. Push back when a simpler approach exists.

02

Simplicity First

Minimum code that solves the problem. Nothing speculative. No abstractions for single-use code. If 200 lines could be 50, rewrite it.

03

Surgical Changes

Touch only what you must. Clean up only your own mess. Don't refactor things that aren't broken. Every changed line should trace directly to the request.

04

Goal-Driven Execution

Define success criteria. Loop until verified. LLMs are exceptionally good at looping until they meet specific goals — give it success criteria and watch it go.

Key Insight

“LLMs are exceptionally good at looping until they meet specific goals. Don't tell it what to do — give it success criteria and watch it go.”

— Andrej Karpathy

Get Started Free →

Free · Open Source · MIT License