/karpathy-code-guidelines:karpathy-guidelinesfrom karpathy-code-guidelines
Guides Claude Code using Karpathy's six principles: think first, keep it simple, surgical edits, define success, reproduce bugs, surface tradeoffs.
Ships in karpathy-code-guidelines. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apply these six principles to every coding task. They exist to prevent the most common and costly LLM coding failures.
Before writing any code:
Examples of what to say:
Write the minimum code that solves today's problem. Nothing speculative.
Never add, unless explicitly asked:
The test: Would a senior engineer call this overcomplicated? If yes, simplify.
If 200 lines could be 50, rewrite it.
Touch only what the task requires.
When editing existing code:
Dead code rules:
The test: Every changed line must trace directly to the user's request.
Transform imperative tasks into verifiable goals before starting.
| Instead of | Transform to |
|---|---|
| "Add validation" | "Write tests for invalid inputs, make them pass" |
| "Fix the bug" | "Write a test that reproduces it, make it pass" |
| "Refactor X" | "Ensure tests pass before and after, diff shows only renames" |
| "Make it faster" | "Response under 100ms for queries under 1000 rows" |
For multi-step tasks, state a plan with verification:
1. [Action] → verify: [specific check]
2. [Action] → verify: [specific check]
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant back-and-forth.
Never patch a bug you haven't confirmed exists.
Always follow this sequence:
If you cannot reproduce the bug, say so and ask for more context rather than guessing at a fix.
When multiple implementation approaches exist, briefly surface them before choosing.
Cover:
Keep it to 3–5 lines. Not an essay.
Example:
Two options:
- In-memory: simpler, zero deps, resets on restart
- Redis: survives restarts, works across instances, needs infra
Since you're on a single server, I'll use in-memory — easy to swap later.
Full rigor required: Any task touching auth, payments, data integrity, migrations, APIs, or multi-file refactors.
Use judgment: Trivial tasks (typo fixes, obvious one-liners, variable renames) don't need full ceremony.
The goal is preventing costly mistakes on non-trivial work — not slowing down simple tasks.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (burukalamanireethika/karpathy-inspired-claude-code-guidelines) — no native marketplace selected
npx claudepluginhub p/burukalamanireethika-karpathy-code-guidelinesOther plugins' skills for the same job