All tools
SkillCommunity188k

Karpathy LLM-Coding Skills

Updated Jul 5, 2026

A single CLAUDE.md encoding four principles from Andrej Karpathy's public writing: Think Before Coding (surface assumptions and tradeoffs), Simplicity First (minimum code, nothing speculative), Surgical Changes (touch only what the task requires), and Goal-Driven Execution (define success criteria and loop until verified). Installable as a Claude Code plugin or per-project CLAUDE.md.

View on GitHub

What it does

  • /plugin marketplace add forrestchang/andrej-karpathy-skills

    Register the Karpathy skills marketplace in Claude Code.

  • /plugin install andrej-karpathy-skills@karpathy-skills

    Install the Karpathy guardrail CLAUDE.md as a plugin that applies across all projects.

  • Think Before Coding principle

    Forces the model to state assumptions explicitly, present multiple interpretations, and stop rather than guess.

  • Simplicity First principle

    Minimum code that solves the problem — no speculative features, abstractions, or over-engineering.

  • Surgical Changes principle

    Every changed line traces to the user request; no drive-by improvements to adjacent code.

  • Goal-Driven Execution principle

    Transform tasks into verifiable goals with test-first success criteria so the model can loop independently.

Files (1)

OVERVIEW.mdprimary · markdown · 2.2 KB
## What it does

A single CLAUDE.md file encoding four behavioral guardrails derived from Andrej Karpathy's public writing about LLM-coding failure modes. The four principles address the problems he identified directly:

**Think Before Coding** — The model must state its assumptions explicitly, present multiple interpretations when ambiguous, push back if a simpler approach exists, and stop rather than guess when confused.

**Simplicity First** — Minimum code that solves the problem. No features beyond what was asked, no abstractions for single-use code, no speculative error handling, no "flexibility" that wasn't requested. If 200 lines could be 50, rewrite it.

**Surgical Changes** — Touch only what the task requires. Do not improve adjacent code, comments, or formatting. Match existing style even if you'd do it differently. Every changed line must trace directly to the user's request.

**Goal-Driven Execution** — Transform imperative instructions into verifiable goals. Instead of "add validation," write a test for invalid inputs then make it pass. For multi-step tasks, state a plan with a verification check for each step so the model can loop independently.

From Karpathy: "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."

## Install

**Plugin (recommended — works across all projects):**

```
/plugin marketplace add forrestchang/andrej-karpathy-skills
/plugin install andrej-karpathy-skills@karpathy-skills
```

**Per-project CLAUDE.md (new project):**

```bash
curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md
```

**Per-project CLAUDE.md (append to existing):**

```bash
echo "" >> CLAUDE.md
curl https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md >> CLAUDE.md
```

Also includes a Cursor rule at .cursor/rules/karpathy-guidelines.mdc for use in Cursor.

## When to use

Any project where you find Claude over-complicating code, making silent assumptions, touching unrelated files, or producing changes that need constant correction. These guardrails bias toward caution over speed — appropriate for non-trivial work, not every single-line fix.