Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Behavioral guardrails for LLM-assisted coding. Use when writing, reviewing, or refactoring code in any project to avoid overcomplication, keep changes surgical, surface assumptions early, and execute against verifiable success criteria.
.claude/skills/alirezarezvani-karpathy-guidelines/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -21% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 377% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -53% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -24% | 0% |
| case-21 | ✓→✗ | ▼ Worse | -69% | 0% |
Behavioral guardrails for code generation in Claude Code projects, distilled from observations on common LLM coding failure modes. Apply these to every editing, reviewing, and refactoring task.
> Attribution: adapted from the MIT-licensed karpathy-guidelines skill by Forrest Chang > (https://github.com/forrestchang/andrej-karpathy-skills), inspired by Andrej Karpathy's > commentary on where LLM-generated code typically goes wrong. > ClaudeForge integrates these principles so every project initialised or enhanced through > /enhance-claude-md ships with them in its CLAUDE.md.
Apply on every non-trivial task: writing new code, editing existing code, code review, refactoring, and bug fixing. They are intentionally conservative — bias toward caution over speed.
Surface what is uncertain. Do not paper over confusion with plausible-sounding code.
Write the minimum code that solves the stated problem. Nothing speculative.
Self-check: a senior engineer skimming this diff — would they say it is overcomplicated for what was asked? If yes, simplify.
Touch only what the task requires. Do not opportunistically refactor.
When your own changes leave orphans:
Diff test: every changed line should be traceable to the user's request. If a line is not, drop it.
Turn the task into a verifiable goal, then iterate until the verification passes.
1. <step> → verify: <how you will check>
2. <step> → verify: <how you will check>
3. <step> → verify: <how you will check>Strong success criteria let you loop without supervision. Vague ones ("make it work") force the user back into the loop.
/enhance-claude-md injects a ## Behavioral Guidelines section into every generated or enhanced CLAUDE.md, summarising these four principles with a link back to this skill.claude-md-guardian agent preserves the section across automated maintenance updates.skill/generator.py and skill/template_selector.py insert the section unconditionally — these principles are not opt-in.The guidelines are working when diffs trend smaller, rewrites caused by overcomplication drop, and clarifying questions arrive before implementation rather than after a failed attempt.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 10,304 | 8,751 | -15% | 1 | 1 | 0% | 1,818 | 2,356 | +30% | 0 | 0 | — |
case-02 | fail→pass | 16,591 | 8,018 | -52% | 1 | 1 | 0% | 2,784 | 2,186 | -21% | 0 | 0 | — |
case-03 | pass→pass | 16,554 | 12,466 | -25% | 1 | 1 | 0% | 2,416 | 2,709 | +12% | 0 | 0 | — |
case-04 | pass→pass | 21,428 | 16,357 | -24% | 1 | 1 | 0% | 3,490 | 3,517 | +1% | 0 | 0 | — |
case-05 | pass→pass | 15,873 | 15,001 | -5% | 1 | 1 | 0% | 2,889 | 3,736 | +29% | 0 | 0 | — |
case-06 | fail→pass | 5,993 | 5,107 | -15% | 1 | 1 | 0% | 370 | 1,766 | +377% | 0 | 0 | — |
case-07 | fail→fail | 3,702 | 8,334 | +125% | 1 | 1 | 0% | 141 | 2,321 | +1546% | 0 | 0 | — |
case-08 | fail→pass | 22,381 | 6,914 | -69% | 1 | 1 | 0% | 4,571 | 2,147 | -53% | 0 | 0 | — |
case-09 | pass→pass | 7,274 | 8,264 | +14% | 1 | 1 | 0% | 1,178 | 2,290 | +94% | 0 | 0 | — |
case-10 | fail→pass | 11,741 | 4,724 | -60% | 1 | 1 | 0% | 2,112 | 1,601 | -24% | 0 | 0 | — |
case-11 | pass→pass | 16,400 | 6,595 | -60% | 1 | 1 | 0% | 2,955 | 2,066 | -30% | 0 | 0 | — |
case-12 | pass→pass | 8,423 | 6,921 | -18% | 1 | 1 | 0% | 1,624 | 2,172 | +34% | 0 | 0 | — |
case-13 | pass→pass | 5,001 | 7,183 | +44% | 1 | 1 | 0% | 824 | 1,695 | +106% | 0 | 0 | — |
case-14 | pass→pass | 5,531 | 4,140 | -25% | 1 | 1 | 0% | 993 | 1,606 | +62% | 0 | 0 | — |
case-15 | pass→pass | 10,647 | 10,654 | +0% | 1 | 1 | 0% | 1,947 | 2,699 | +39% | 0 | 0 | — |
case-16 | pass→pass | 6,731 | 16,012 | +138% | 1 | 1 | 0% | 1,119 | 2,662 | +138% | 0 | 0 | — |
case-17 | pass→pass | 12,988 | 6,349 | -51% | 1 | 1 | 0% | 2,140 | 1,991 | -7% | 0 | 0 | — |
case-18 | pass→pass | 5,297 | 3,674 | -31% | 1 | 1 | 0% | 733 | 1,564 | +113% | 0 | 0 | — |
case-19 | pass→pass | 4,922 | 2,824 | -43% | 1 | 1 | 0% | 997 | 1,356 | +36% | 0 | 0 | — |
case-20 | pass→pass | 16,143 | 6,116 | -62% | 1 | 1 | 0% | 3,076 | 1,899 | -38% | 0 | 0 | — |
case-21 | pass→fail | 18,880 | 2,938 | -84% | 1 | 1 | 0% | 3,927 | 1,228 | -69% | 0 | 0 | — |
case-22 | pass→pass | 11,538 | 4,841 | -58% | 1 | 1 | 0% | 1,920 | 1,669 | -13% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +14 percentage points is the difference between those two pass rates over the 20 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.