karpathy-guidelines

Four behavioural rules distilled from Karpathy's coding notes: think first, keep it simple, change only what's needed, verify before shipping.

karpathy-guidelines is for when an agent changes too much and thinks too little: four behavioural rules distilled from Karpathy's notes. It constrains the process, not features.

Planning & executionagents 4未声明(仅索引,不提供下载) index only Scan upstream repo ↗

Upstream:multica-ai/andrej-karpathy-skills · ★ 236435 · last commit 2026-04-20 (222d)

What it is

Four behavioural rules distilled from common LLM coding failures: overcomplication, opportunistic edits, hidden assumptions, and missing success criteria. It is for developers who let an AI change their code. It ships no scripts, checkers, or auto-fixes, and it does not replace tests or code review.

Core workflow

StageContent
TriggerWriting, reviewing, or refactoring code, especially when the model may widen the change.
InputThe task description, the existing code, and the intended change.
StepsState assumptions and ambiguities, stop and ask when unclear; write the minimum code that solves the problem; touch only the requested scope and remove orphans your own change created; turn the task into verifiable success criteria and loop until verified.
OutputA short plan with a check per step, the bounded code change, and verification results.
BoundaryTrivial tasks may use judgement rather than mechanical application; no test framework or toolchain is prescribed.
Getting started: before editing, write your assumptions and success criteria in one line.

Traits

  • Four rules: think before coding, simplicity first, surgical changes, goal-driven execution.
  • Rejects speculative features, single-use abstractions, unrequested configurability, and error handling for impossible cases.
  • Every changed line must trace to the request; only orphans created by your change get deleted.
  • Weak goals are rewritten as verifiable ones, such as writing a failing test before a fix.

Who it is for and who it is not for

Good fitPoor fit
Small, bounded edits by an LLM in an existing codebaseTrivial tasks where speed matters
Reviewing over-engineered AI refactorsRules that must be machine-enforced
Turning vague requests into acceptance criteriaProjects wanting bundled tests or CI

How it differs

NeedUse
A behavioural contract while writing codekarpathy-guidelines
Automatic blocking of scope creepNot here; this skill has no scripts
A test framework or scaffoldOut of scope

Source-level risks

RiskSourceImpact
Text rules only, nothing executesThe file is rules with no scriptsRelies on model compliance; no enforcement
Deliberately biased to caution over speedTradeoff note at the topExtra questions and round trips on trivial tasks
Some rules are absoluteSimplicity First sectionConflicts with house conventions need judgement
External attribution linkLink to Karpathy’s postIf the link dies, context is untraceable
Licence metadata mismatchHeader says MIT, task metadata says undeclaredConfirm terms before redistribution

Go to upstream repository ↗

Example: input and output

Input

The agent edited 12 files at once — check it against Karpathy's rules.

Output

A rule-by-rule review: think first, keep simple, only necessary changes, verify.

Look for unrelated edits first.

FAQ

Can I download it?

No license upstream — index and link only.

Is it for non-engineers?

The rules are general; examples are code-oriented.

All four rules?

Start with think-first and change-only-what's-needed.

CategoryPlanning & execution
Version—
Agent supportClaude Code, Cursor, Codex, Generic (reads SKILL.md)
OSmacOS / Linux / Windows
Dependenciesnone
Environmentnone
Scriptsnone
License未声明(仅索引,不提供下载)
Sourcemultica-ai/andrej-karpathy-skills ↗
Verificationto verify (check upstream before installing)
Get itGo to upstream · gh-proxy · jsDelivr

"Generic (agents that read SKILL.md)" means any agent that discovers and loads SKILL.md; support level (auto-discovery, manual config, script execution) varies by agent.

This entry isn't hosted here (license or size); use the accelerated mirror above or the upstream repo.

Install

This is an index entry: install it from the upstream repository using its instructions.

Skills directory example: ~/.claude/skills/ for Claude Code; other agents use wherever SKILL.md is discovered.