Claude-skills karpathy-check
Run Karpathy's 4-principle review on staged changes or the last commit. Checks complexity, diff noise, hidden assumptions, and goal verification. Usage /karpathy-check [--last-commit]
install
source · Clone the upstream repo
git clone https://github.com/alirezarezvani/claude-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/alirezarezvani/claude-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.gemini/skills/karpathy-check" ~/.claude/skills/alirezarezvani-claude-skills-karpathy-check && rm -rf "$T"
manifest:
.gemini/skills/karpathy-check/SKILL.mdsource content
/karpathy-check
Review your staged changes (or last commit) against Karpathy's 4 coding principles.
Usage
/karpathy-check # review staged changes /karpathy-check --last-commit # review the most recent commit
What it runs
- Principle #2 (Simplicity):
on all changed files — detects over-engineering, premature abstractions, deep nesting, long functionsscripts/complexity_checker.py - Principle #3 (Surgical):
on the diff — detects comment-only changes, whitespace noise, style drift, drive-by refactorsscripts/diff_surgeon.py - Principles #1 + #4 (Think + Goals): The
agent reads the diff and applies human-judgment checks — hidden assumptions, missing verificationkarpathy-reviewer
Output
A structured report with per-principle verdicts and specific line-level fix recommendations.
When to run
- Before committing (catches noise and overcomplication early)
- After completing a feature (sanity check before PR)
- When you suspect the LLM overcoded something
Sub-agent
Dispatches the
karpathy-reviewer agent. See agents/karpathy-reviewer.md.
Scripts
engineering/karpathy-coder/scripts/complexity_checker.pyengineering/karpathy-coder/scripts/diff_surgeon.pyengineering/karpathy-coder/scripts/assumption_linter.pyengineering/karpathy-coder/scripts/goal_verifier.py
Skill Reference
→
engineering/karpathy-coder/SKILL.md