# Karpathy Verification

> Use when judging whether output is correct or finished: reviewing an AI-written diff before accepting, merging, or shipping; deciding whether a working demo means done; checking a model's numbers, counts, or self-reported success; or setting up an LLM as a judge, grader, or council.

- Skill: `yshms/karpathy-verification` (Agent Skill)
- Install (CLI): `npx skillmds@latest add yshms/karpathy-verification`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yshms/karpathy-verification/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: yshms (https://skillmd.com/u/yshms)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/yshms/karpathy-verification

---


# Karpathy Verification Loop

Generation is cheap; discrimination — reading output and judging it — is the capability that stays scarce. Karpathy states the two halves in two separate passages of the same thread: he braces for a slopacolypse across digital media, and, under Atrophy, he notes that writing code and reading code are different capabilities in the brain (X status/2015883857489522876, 26 Jan 2026, agent-coding notes).

On the loop: "usually they are doing the generation, and we as humans are doing the verification. It is in our interest to make this loop go as fast as possible." (YC AI Startup School Software 3.0 talk, 17 Jun 2025; transcript at latent.space/p/s3).

Your job as reviewer is not syntax. Agent code now fails the way "a slightly sloppy, hasty junior dev" would (same Jan 2026 thread) — conceptually.

**Boundary.** Rule 4 of `karpathy-coding-loop` is the generator checking its own success criterion mid-loop. This skill is the reviewer deciding whether the artifact leaves the room.

## Review procedure

1. **Read as visual red/green diffs, in small chunks — never raw dumps.** If the diff is too big to audit in one sitting, the task was too big: split it and regenerate rather than skimming.
2. **Hunt conceptual errors, not typos.**
   - Wrong assumptions silently run with — the #1 failure mode.
   - System-design and security flaws. Karpathy caught Claude matching a successful Stripe payment to user credits by email address, missing that the Stripe checkout email may differ from the Google signup email; line-correct, design-wrong, fixed by passing a persistent user id in the request metadata (karpathy.bearblog.dev/vibe-coding-menugen, 27 Apr 2025).
   - Bloat: unneeded abstraction, defensive try/except for impossible cases, configurability nobody asked for.
   - Collateral damage: comments or code changed outside the task's scope.
   - Deprecated or hallucinated APIs — on MenuGen, Claude produced roughly 1000 lines against what looked like deprecated Clerk APIs (vibe-coding-menugen, 27 Apr 2025).
3. **Verify the dumb stuff regardless of apparent brilliance.** Jagged intelligence: a model that just did something genius can still get 9.11 vs 9.9 wrong (X status/1816531576228053133, 25 Jul 2024, jagged-intelligence coinage). Independently recheck arithmetic, counts, and trivially-checkable claims. Route every calculation through code execution, never mental math from weights.
4. **Demo != done.** "Demo is works.any(), product is works.all()" — slide text from the Software 3.0 talk as recorded by latent.space/p/s3 (17 Jun 2025), not retrievable spoken words. Each additional nine of reliability costs the same amount of work again — the march of nines, as reported from the Dwarkesh Podcast interview (17 Oct 2025). And feeling 80% done usually means closer to 20%: on MenuGen the remaining bulk was deployment, auth, and browser-based config across four vendor consoles, not code (vibe-coding-menugen, 27 Apr 2025).
5. **High-stakes answer -> LLM council.** Put the same question to a handful of frontier models (his council ships with four: gpt-5.1, gemini-3-pro-preview, claude-sonnet-4.5, grok-4), have them cross-review and rank each other with identities hidden, then apply your own qualitative read as the final ranking. As reported of his announcement, the council ranked GPT-5.1 top while he preferred Gemini 3's answer (X status/1992381094667411768, 22 Nov 2025, llm-council announcement).

## LLM-as-judge

- Demand an exact machine-parseable output format and tell the judge why: "I will be parsing it programmatically" (karpathy.bearblog.dev/auto-grade-hn, 10 Dec 2025).
- Anonymize identities in the judged inputs. The llm-council README gives this as the design rationale — identities are hidden so a model cannot play favorites — not as a bias he measured.
- Spot-check verdicts by hand and iterate the rubric on the errors you find `(house rule)`.

## Excuse -> Reality

| Excuse | Reality |
|---|---|
| "The tests pass" | Tests can encode the same wrong assumption the code does. Check the assumption, not the green. |
| "The diff is long but it's all boilerplate" | Then it is cheap to split. Long-and-skimmed is how design flaws ship. |
| "It worked when I ran it" | That is works.any(). Name the failure cases you did not run. |
| "The agent said it verified" | Self-report is not evidence. Run the command yourself. |
| "I read the summary of the changes" | The summary was generated by the thing under review. |
| "The math looks right" | Route it through code. Jagged intelligence. |

## Red flags

- Accepting a diff you scrolled past rather than read, outside declared throwaway mode.
- "The demo worked" as the completion criterion.
- Trusting a model's arithmetic or self-reported success without an independent check.
- Reviewing only what changed, not what the change implies for the system design.

## If the verdict is environmental

A hallucinated API, a regression to conventions this repo does not use, or the third repeat of the same mistake is a context problem, not a review problem: go to `karpathy-context-engineering` rather than re-prompting.

## Sources

Karpathy: YC AI Startup School Software 3.0 talk, 17 Jun 2025 (transcript, slide text and annotations at latent.space/p/s3) — generation/verification loop, works.any/works.all. karpathy.bearblog.dev/vibe-coding-menugen, 27 Apr 2025 — Stripe/email design flaw, deprecated Clerk APIs, 80%/20%. karpathy.bearblog.dev/auto-grade-hn, 10 Dec 2025 — parse-it-programmatically prompt. X status/2015883857489522876 (26 Jan 2026, agent-coding notes) — slopacolypse, generation vs discrimination, hasty-junior-dev failure mode. X status/1816531576228053133 (25 Jul 2024, jagged-intelligence coinage). X status/1992381094667411768 (22 Nov 2025, llm-council announcement) — the four council models and the GPT-5.1-vs-Gemini-3 disagreement, as reported. github.com/karpathy/llm-council README — the anonymization design only; it does not report the disagreement. Dwarkesh Podcast, 17 Oct 2025 — march of nines, via secondary reporting; the phrase was not retrievable in the published transcript.

MIT notice for this skill set (upstream: `multica-ai/andrej-karpathy-skills`, formerly `forrestchang/andrej-karpathy-skills`): see `karpathy-coding-loop/references/examples.md`.

