
Karpathy Guidelines
- 19.2k installs
- 197k repo stars
- Updated April 20, 2026
- forrestchang/andrej-karpathy-skills
Karpathy Guidelines is a skill providing behavioral principles to reduce LLM coding mistakes through explicit thinking, simplicity, and surgical changes.
About
Behavioral guidelines derived from Andrej Karpathy's observations on LLM coding pitfalls. Emphasizes thinking before coding, simplicity over speed, surgical changes that don't refactor unrelated code, and goal-driven execution with verifiable success criteria. Teaches how to surface assumptions, make targeted edits, and loop independently with strong success metrics.
- Think before coding: surface assumptions and tradeoffs explicitly
- Simplicity first: minimum code solving the problem with no speculative features
- Surgical changes: touch only what you must, clean only your own mess
Karpathy Guidelines by the numbers
- 19,245 all-time installs (skills.sh)
- +884 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #18 of 1,382 Code Review & Quality skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
karpathy-guidelines capabilities & compatibility
- Capabilities
- code review · simplification · testing · debugging
npx skills add https://github.com/forrestchang/andrej-karpathy-skills --skill karpathy-guidelinesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 19.2k |
|---|---|
| repo stars | ★ 197k |
| Security audit | 3 / 3 scanners passed |
| Last updated | April 20, 2026 |
| Repository | forrestchang/andrej-karpathy-skills ↗ |
How do you stop LLM agents from over-engineering code?
Review and improve LLM-generated code by applying Karpathy's behavioral guidelines to reduce overcomplication and ensure focused, verifiable implementations.
Who is it for?
Developers reviewing LLM-generated code; teams implementing AI-assisted development; anyone writing or reviewing code with high-quality standards
Skip if: Projects requiring rapid prototyping without quality gates
When should I use this skill?
An agent is about to implement, review, or refactor code and shows signs of over-engineering, unstated assumptions, or scope creep.
What you get
Documented pre-coding assumptions, scoped diffs, explicit tradeoffs, and verifiable success criteria before merge.
- Simplified, focused implementations
- Clear success criteria
- Surgical code changes
By the numbers
- 4 core behavioral guidelines
- Derived from Andrej Karpathy's LLM coding observations
Files
Karpathy Guidelines
Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.
1. Think Before Coding
Don't assume. Don't hide confusion. Surface tradeoffs.
Before implementing:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
2. Simplicity First
Minimum code that solves the problem. Nothing speculative.
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
3. Surgical Changes
Touch only what you must. Clean up only your own mess.
When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.
When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.
The test: Every changed line should trace directly to the user's request.
4. Goal-Driven Execution
Define success criteria. Loop until verified.
Transform tasks into verifiable goals:
- "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"
For multi-step tasks, state a brief plan:
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
Related skills
Forks & variants (5)
Karpathy Guidelines has 5 known copies in the catalog totaling 10.7k installs. They canonicalize to this original listing.
- multica-ai - 9.2k installs
- szkocot - 1.5k installs
- mxyhi - 66 installs
- juparave - 5 installs
- vechain - 2 installs
FAQ
How do I ensure code simplicity?
If you write 200 lines and it could be 50, rewrite it. Ask: Would a senior engineer say this is overcomplicated? If yes, simplify.
What should I do when editing existing code?
Don't improve adjacent code, comments, or formatting. Match existing style. Only remove imports/functions YOUR changes made unused; don't remove pre-existing dead code unless asked.
Is Karpathy Guidelines safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.