Agent skill · Andrej Karpathy Skills
/karpathy-guidelines Four rules against common LLM coding mistakes
This skill gives a coding agent four working rules drawn from Andrej Karpathy's observations on LLM coding pitfalls. The agent states its assumptions and asks when unsure, writes the smallest code that solves the task, edits only lines tied to your request, and turns each task into a check it can verify before calling the work done.
Works with
- Claude Code
When to use it
- Your agent builds the wrong thing because it guessed what you meant
- Reviews keep finding refactors and abstractions nobody asked for
- You want smaller, cleaner pull requests from an agent
How it works
- 1Think before coding
Before writing code it states its assumptions, lays out competing interpretations and stops to ask when something is unclear.
- 2Simplicity first
It writes the minimum code for the request: no extra features, single-use abstractions or configuration nobody requested.
- 3Surgical changes
It leaves adjacent code, comments and formatting alone, matches the existing style and removes only what its own change made unused.
- 4Goal-driven execution
It rewrites a task as a verifiable goal, such as a failing test to make pass, and states a short plan with a check for each step.
What it steers the agent away from
- Silently picking one reading of an ambiguous request
- Writing 200 lines where 50 would do
- Deleting dead code or comments it was not asked to touch
Install this skill
It installs with the Andrej Karpathy Skills pack.
Claude Code (plugin)Makes the skill available in every project. The marketplace uses the repository's original name, which GitHub redirects
/plugin marketplace add forrestchang/andrej-karpathy-skills
/plugin install andrej-karpathy-skills@karpathy-skillsClaude Code (CLAUDE.md, one project)Writes the rules to CLAUDE.md in the current folder and replaces an existing file; to keep yours, append with >> instead
curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.mdCommands come from the author’s README; check it for changes before you run them.
Questions
Does it work outside Claude Code?
The SKILL.md loads in agents that support the Agent Skills format, and the repository ships the same rules as a Cursor project rule and a CLAUDE.md file.
How do I know it is working?
The README suggests watching for smaller diffs, fewer rewrites, clarifying questions before implementation and pull requests without drive-by refactoring.
Summary by trendhub. The skill itself lives in multica-ai/andrej-karpathy-skills/skills/karpathy-guidelines by Multica (MIT); read the full, current text there.