Karpathy Guidelines
Code qualityAndrej Karpathy's coding principles as a skill: think first, stay simple, change surgically.
by forrestchang (principles by Andrej Karpathy)forrestchang/andrej-karpathy-skills
Stars222.3k
Forks22.3k
Watchers1.3k
Open issues137
Licensen/a
Last push6 months ago
Install
install
$ /plugin marketplace add forrestchang/andrej-karpathy-skills
Update
update
$ /plugin marketplace update andrej-karpathy-skills
Then run /reload-plugins. Official marketplaces auto-update at startup.
When to use it
- Every project: paste the principles into CLAUDE.md as standing rules
- When generated code keeps growing speculative abstractions and unrequested features
- Reviewing diffs that touched more than they needed to
Commands & flags
- /karpathy-guidelines
- Invoke the skill to apply the four principles to current work.
- Add to CLAUDE.md
- Paste the four principles as standing project rules for automatic application.
- Think before coding
- State assumptions, surface tradeoffs, push back on complexity.
- Simplicity first
- Write the minimum code that solves the problem, nothing speculative.
- Surgical changes
- Touch only what you must; clean up only your own mess.
- Goal-driven execution
- Define success criteria and loop until verified.
How to use it
Works best as standing guidance rather than an invoked skill. The four principles:
- Think before coding: state assumptions, surface tradeoffs, push back on complexity
- Simplicity first: minimum code that solves the problem, nothing speculative
- Surgical changes: touch only what you must, clean up only your own mess
- Goal-driven execution: define success criteria, loop until verified
Add to a project's CLAUDE.md or install the plugin for automatic application.
Why it earns its place
Four short rules that counteract the most common LLM coding failures: over-engineering, scope creep, drive-by refactors, and declaring victory without verification. Cheap to adopt, immediately visible in diff quality.
Try it
claude
> Apply the Karpathy principles when refactoring this module