karpathy-skills
Karpathy Skills turns Andrej Karpathy-inspired AI coding practices into
practical skills that vibe coders can use inside Claude Code and Codex.
The goal is simple: when an AI agent writes code for you, these skills help you
catch the common failure modes before they turn into bugs, bloated code, or
messy commits.
This repo ships one plugin, karpathy, with four core skills plus setup and
update commands:
/karpathy:audit - reviews your AI agent instruction files.
/karpathy:diff - reviews AI-generated code changes before you commit.
/karpathy:refactor - evidence-gated, behavior-preserving refactoring with
a recorded verification baseline and auto-revert.
/karpathy:wiki - a repo wiki / memory layer for helping agents understand
the codebase before they edit it.
/karpathy:setup / /karpathy:configure - tunes the default-on audit checks
for stale docs and missing doc indexes.
/karpathy:update - checks for and applies Karpathy plugin updates.
The wiki skill's product rationale and longer-term design are documented in
docs/repo-knowledge-bases.html.
Why This Exists
Vibe coding is powerful, but AI coding agents have predictable failure modes:
- They make assumptions without telling you.
- They overbuild simple requests.
- They refactor or reformat unrelated code.
- They delete comments or code they do not fully understand.
- They finish without a clear test or verification step.
Karpathy described these problems after extensive agentic coding. This project
turns those observations into concrete workflows that an agent can run for you.
The four principles behind the plugin are:
| Principle | Plain-English Meaning |
|---|
| Think Before Coding | Do not silently guess. State assumptions, ask when unclear, and surface tradeoffs. |
| Simplicity First | Write the smallest thing that solves the real task. No speculative abstractions. |
| Surgical Changes | Touch only what the task requires. No drive-by cleanup or unrelated rewrites. |
| Goal-Driven Execution | Define how success will be checked, then run the checks. |
The Skills
| Skill | Status | What It Is | What It Is For | Impact |
|---|
/karpathy:audit | Shipped | A review of your CLAUDE.md, AGENTS.md, or Cursor rules. | Making sure your agent instructions are clear, current, and useful. | Better standing instructions, fewer vague rules, less stale context. |
/karpathy:diff | Shipped | A review of the code changes an AI agent just made. | Catching scope creep before you commit. | Smaller diffs, fewer surprise edits, safer commits. |
/karpathy:refactor | Shipped MVP | An evidence-gated refactor executor: history evidence, verification baseline, small verified slices, auto-revert. | Simplifying a subsystem, or finding where refactoring actually pays off, without behavior changes. | Refactors that verify against a baseline instead of relying on taste. |
/karpathy:wiki | Shipped MVP | A local repo wiki that the agent maintains and reads before coding. | Helping the agent understand your project without rereading everything every time. | Faster orientation, better task briefs, less repeated context work. |
/karpathy:setup / /karpathy:configure | Shipped | A Pipelane-style checklist for audit docs checks. | Tuning or opting out of stale-doc and doc-index checks. | Audits catch roadmap/spec/todo rot and missing indexes by default. |
/karpathy:update | Shipped | A guided plugin update workflow. | Staying current without remembering plugin-manager commands. | Update reminders point to one Karpathy command. |
If you only remember one thing:
Run /karpathy:diff before accepting or committing AI-generated code.
That is the highest-leverage habit.
Install
Claude Code
Inside Claude Code:
/plugin marketplace add jokim1/karpathy-skills
/plugin install karpathy@karpathy-skills
To update later:
/karpathy:update
Fallback if the command is not available yet:
karpathy update
/plugin marketplace update karpathy-skills
/plugin install karpathy@karpathy-skills
/reload-plugins
Claude Code can also auto-update installed plugins at startup. Third-party
marketplaces default to manual updates, so enable it from:
/plugin -> Marketplaces -> karpathy-skills -> Enable auto-update
Codex
Codex can install from this repo's native marketplace at
.agents/plugins/marketplace.json:
codex plugin marketplace add jokim1/karpathy-skills
Then install karpathy from the Codex plugin directory.
On Codex CLI builds that expose plugin installation directly:
codex plugin add karpathy@karpathy-skills
To update later:
/karpathy:update
Fallback if the command is not available yet:
karpathy update
Shell fallback: