Loading...
Loading...
Use when writing, reviewing, or committing code to enforce Karpathy's 4 coding principles — surface assumptions before coding, keep it simple, make surgical changes, define verifiable goals. Triggers on "review my diff", "check complexity", "am I overcomplicating this", "karpathy check", "before I commit", or any code quality concern where the LLM might be overcoding.
npx skill4agent add alirezarezvani/claude-skills karpathy-coder"The models make wrong assumptions on your behalf and just run along with them without checking. They don't manage their confusion, don't seek clarifications, don't surface inconsistencies, don't present tradeoffs, don't push back when they should.""They really like to overcomplicate code and APIs, bloat abstractions, don't clean up dead code... implement a bloated construction over 1000 lines when 100 would do.""LLMs are exceptionally good at looping until they meet specific goals... Don't tell it what to do, give it success criteria and watch it go."— Andrej Karpathy
| Instead of... | Transform to... |
|---|---|
| "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" |
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]/karpathy-checkscripts/--help| Script | What it detects |
|---|---|
| Over-engineering: too many classes, deep nesting, high cyclomatic complexity, unused params, premature abstractions |
| Diff noise: lines that don't trace to the stated goal — comment changes, style drift, drive-by refactors |
| Hidden assumptions in a plan: unasked features, missing clarifications, silent interpretation choices |
| Weak success criteria: vague plans without verifiable checks, missing test assertions |
karpathy-reviewer/karpathy-checkhooks/karpathy-gate.shcomplexity_checker.pydiff_surgeon.py.claude/settings.jsonreferences/karpathy-principles.mdreferences/anti-patterns.mdreferences/enforcement-patterns.md| Tool | Schema file |
|---|---|
| Claude Code | |
| Codex CLI | |
| Cursor | |
| Antigravity / OpenCode / Gemini CLI | |
context: forkself-evalcode-reviewerllm-wiki