@swarmclawai/andrej-karpathy-skills-3
AKarpathy-inspired coding-agent guidelines packaged for Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Aider, GitHub Copilot, OpenClaw, Warp, Windsurf, Cline, and the wider SwarmVault/SwarmClaw…
Install
agr install @swarmclawai/andrej-karpathy-skills-3 --target codexWrites 1 file into AGENTS.md, pinned to git-d384e9ff.
- AGENTS.md
Document
Karpathy Guidelines
Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.
1. Think Before Coding
Don't assume. Don't hide confusion. Surface tradeoffs.
Before implementing:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
2. Simplicity First
Minimum code that solves the problem. Nothing speculative.
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
3. Surgical Changes
Touch only what you must. Clean up only your own mess.
When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.
When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.
The test: Every changed line should trace directly to the user's request.
4. Goal-Driven Execution
Define success criteria. Loop until verified.
Transform tasks into verifiable goals:
- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"
For multi-step tasks, state a brief plan:
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
Repository README
Describes swarmclawai/andrej-karpathy-skills as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.
Karpathy-Inspired Agent Skills
Karpathy-inspired coding-agent guidelines packaged for Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Aider, GitHub Copilot, OpenClaw, Warp, Windsurf, Cline, and the wider SwarmVault/SwarmClaw agent matrix.
The canonical source is skills/karpathy-guidelines/SKILL.md. Agent-specific files are generated under adapters/ so the repository root stays readable while every supported tool receives the same behavioral guidance.
English | Simplified Chinese
What This Adds
These guidelines address four common LLM coding failure modes described by Andrej Karpathy:
| Principle | Prevents |
|---|---|
| Think Before Coding | Silent assumptions, hidden confusion, missing tradeoffs |
| Simplicity First | Over-engineering, bloated abstractions, speculative features |
| Surgical Changes | Drive-by rewrites, unrelated cleanup, accidental behavior changes |
| Goal-Driven Execution | Vague completion criteria and unverified changes |
The content is intentionally short. It is meant to merge with project-specific instructions, not replace them.
Quick Install
Install through npm and run the installer with npx:
npx @swarmclawai/andrej-karpathy-skills --list
npx @swarmclawai/andrej-karpathy-skills --agent codex --dest /path/to/project
Or install the CLI globally:
npm install -g @swarmclawai/andrej-karpathy-skills
andrej-karpathy-skills --agent cursor --dest /path/to/project
The CLI copies the right adapter from the npm package into the destination project.
Clone Install
Clone once, then copy the right adapter into any project. The installer reads install/targets.json, copies from adapters/<agent-id>/..., and writes to the real path your agent expects.
git clone https://github.com/swarmclawai/andrej-karpathy-skills.git
cd andrej-karpathy-skills
node scripts/install.mjs --list
node scripts/install.mjs --agent codex --dest /path/to/project
Use --force if you intentionally want to overwrite an existing instruction file:
node scripts/install.mjs --agent claude --dest /path/to/project --force
node scripts/install.mjs --agent openclaw --dest /path/to/project --force
Use --global for agents with supported user-level skill locations:
node scripts/install.mjs --agent claude --global --force
node scripts/install.mjs --agent hermes --global --force
Adapter Layout
If you only need one file, copy the adapter source to the install target shown below:
| Agent | Adapter source | Installs to |
| --- | --- |
| Codex | adapters/codex/AGENTS.md | AGENTS.md |
| Claude Code | adapters/claude/CLAUDE.md | CLAUDE.md |
| Cursor | adapters/cursor/.cursor/rules/karpathy-guidelines.mdc | .cursor/rules/karpathy-guidelines.mdc |
| Gemini CLI | adapters/gemini/GEMINI.md | GEMINI.md |
| Aider | adapters/aider/CONVENTIONS.md | CONVENTIONS.md |
| GitHub Copilot | adapters/copilot/.github/copilot-instructions.md | .github/copilot-instructions.md |
| VS Code Copilot Chat | adapters/vscode/.github/chatmodes/karpathy-guidelines.chatmode.md | .github/chatmodes/karpathy-guidelines.chatmode.md |
| OpenClaw | adapters/openclaw/.openclaw/skills/karpathy-guidelines/SKILL.md | .openclaw/skills/karpathy-guidelines/SKILL.md |
| Warp or shared Agent Skills | adapters/warp/.agents/skills/karpathy-guidelines/SKILL.md | .agents/skills/karpathy-guidelines/SKILL.md |
| Windsurf | adapters/windsurf/.windsurfrules | .windsurfrules |
The full target matrix lives in install/targets.json.
Supported Agent Matrix
The matrix is based on SwarmVault's installer targets and SwarmClaw's agent provider registry, then cross-checked with public agent documentation where available.
Core targets:
codex, claude, cursor, goose, pi, gemini, opencode, aider, copilot, trae, claw, droid, kiro, hermes, antigravity, vscode.
Extended Agent Skills targets:
amp, augment, adal, bob, cline, codebuddy, command-code, continue, cortex, crush, deepagents, firebender, iflow, junie, kilo-code, kimi, kode, mcpjam, mistral-vibe, mux, neovate, openclaw, openhands, pochi, qoder, qwen-code, replit, roo-code, trae-cn, warp, windsurf, zencoder.
See docs/agent-compatibility.md for the research notes and source links.
Claude Code Plugin
This repo still includes Claude plugin metadata at the root because plugin tooling expects it there:
.claude-plugin/plugin.json
.claude-plugin/marketplace.json
skills/karpathy-guidelines/SKILL.md
When published as a Claude plugin marketplace entry, the plugin exposes the same canonical skill used by every other adapter.
Maintain The Package
Edit the canonical skill, then regenerate and verify:
npm run generate
npm run verify
npm run pack:dry-run
Generated adapters live under adapters/<agent-id>/ and start with a comment that names their source. Do not edit generated adapters by hand; update skills/karpathy-guidelines/SKILL.md or scripts/generate.mjs.
Attribution
This package is based on the original forrestchang/andrej-karpathy-skills repository and preserves the MIT license attribution.
License
MIT
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-d384e9ff18bb2026-08-04