Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.karpathy.phronesisagent.com/llms.txt

Use this file to discover all available pages before exploring further.

Karpathy Skills is a Claude Code plugin and Cursor rule derived from Andrej Karpathy’s observations on LLM coding pitfalls. It ships as a single CLAUDE.md file — or as an installable Claude Code plugin — that injects four behavioral principles into every session, pushing the model to ask before assuming, keep code minimal, touch only what it must, and verify work against explicit success criteria.

The problems it solves

Andrej Karpathy identified three recurring failure modes in LLM-assisted coding:
“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.”
Karpathy Skills addresses all three with four explicit principles.

The four principles

PrincipleWhat it addresses
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
Each principle is a short, direct rule that the model applies before and during implementation. Together they shift the model’s default behavior from “run with it” to “verify, then act.”

How to know it’s working

You will see these signs when the guidelines are active:
  • Fewer unnecessary changes in diffs — only the lines you asked to change appear
  • Fewer rewrites due to overcomplication — code is simple the first time
  • Clarifying questions come before implementation — not after mistakes
  • Clean, minimal PRs — no drive-by refactoring or unsolicited “improvements”

Tradeoff

These guidelines bias toward caution over speed. For trivial tasks — a typo fix, an obvious one-liner — you can skip the full rigor and use your judgment. The goal is reducing costly mistakes on non-trivial work, not slowing down simple tasks.

Installation

Install via the Claude Code plugin marketplace or add CLAUDE.md directly to any project.

Think before coding

Surface assumptions, present tradeoffs, and push back when warranted.

Simplicity first

Write the minimum code that solves the problem — nothing speculative.

Surgical changes

Touch only what you must, and clean up only your own mess.