Skip to content

Diff-checking skill that flags overbuilt code against Karpathy's four coding principles before commit.

CCM score
66 of 100
skills.sh installs
1.1K
GitHub stars
30.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers four principles: surface assumptions, keep code simple, make surgical changes, and define verifiable goals
  • Includes four stdlib-only Python checkers (complexity_checker.py, diff_surgeon.py, assumption_linter.py, goal_verifier.py) plus a /karpathy-check slash command
  • Provides a karpathy-reviewer sub-agent and a non-blocking pre-commit hook, hooks/karpathy-gate.sh, for staged files
  • Designed for Claude Code and other agents, with guidance to relax the principles on trivial one-line edits

Install

$ npx -y skills add alirezarezvani/claude-skills --skill karpathy-coder -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Karpathy Coder — Active Coding Discipline

Derived from Andrej Karpathy's observations on LLM coding pitfalls. This is not just guidelines — it ships Python tools that detect violations, a review agent, a slash command, and a pre-commit hook.

"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

The four principles

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

Details

Repository
github.com/alirezarezvani/claude-skills
Categories
Code Review & Quality, Agent Workflow & Planning, Python
First seen
Jun 3, 2026

Questions

What does the karpathy-coder skill do?

The karpathy-coder skill checks a diff for overbuilt code, looking for hidden assumptions, needless abstraction, non-surgical changes and unverified goals. It enforces Andrej Karpathy's four coding principles and ships Python tools that detect violations, a review agent and a pre-commit hook.

How do I install the karpathy-coder skill?

Run npx -y skills add alirezarezvani/claude-skills --skill karpathy-coder -y in your project. This installs the skill so your agent can run the four-principle review on your changes.

Which skills lead karpathy-coder in the Code Review & Quality category?

In the Code Review & Quality category, karpathy-coder sits alongside improve-codebase-architecture, codebase-design, code-review, setup-ts-deep-modules and caveman-review. It differs by focusing on the four LLM-specific pitfalls rather than broader code review.

When should I use karpathy-coder before committing code?

Use it when you think you overcomplicated something, ask to review your diff, check complexity, or want a pre-commit check. It also fits any code quality concern where the model may be overcoding.

More from alirezarezvani/claude-skills

All 259

Similar to Karpathy Coder

More Code Review & Quality