karpathy-guidelines
Skill0 starsChanged 4 months agoMITView on GitHub
Field notes for getting a language model to write code you will not rewrite. Reduces the predictable LLM coding mistakes — writing before reading, silent wrong assumptions, overcomplication, scope creep, unverified work, papering over bugs. Use when writing, refactoring, debugging, or reviewing code. Ten earned rules; the throughline is that the model is fast at generating plausible code and slow to notice plausible is not correct, so the discipline comes from the process around it. Source — Andrej Karpathy, CLAUDE.md field notes. Activates on "karpathy", "clarity", "karpathy mode", "be careful", "think first", "/karpathy", or any coding task that warrants discipline.
126 other projects use a version of this.
Adopted by
Most recently taken up by
- Markssuave/Markssuave-Agent-skillstheir own version, first seen Nov 8, 2026
- mujtbabbas/andrej-karpathy-skillstheir own version, first seen Nov 8, 2026
- afawfawffaf/my-skillstheir own version, first seen Nov 8, 2026
- hamzzaqureshi/gravidextheir own version, first seen Nov 8, 2026
- lemonAlpha23/claude_code_toolboxtheir own version, first seen Nov 8, 2026
- mel0nyrame/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use huashu-design, github-cli and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
XIYBHKSkillhuashu-design
花叔Design(Huashu-Design)——用HTML做高保真原型、交互Demo、幻灯片、动画、设计变体探索+设计方向顾问+专家评审的一体化设计能力。HTML是工具不是媒介,根据任务embody不同专家(UX设计师/动画师/幻灯片设计师/原型师),避免web design tropes。触发词:做原型、设计Demo、交互原型、HTML演示、动画Demo、设计变体、hi-fi设计、UI mockup、prototype、设计探索、做个HTML页面、做个可视化、app原型、iOS原型、移动应用mockup、导出MP4、导出GIF、60fps视频、设计风格、设计方向、设计哲学、配色方案、视觉风格、推荐风格、选个风格、做个好看的、评审、好不好看、review this design。**主干能力**:Junior Designer工作流(先给假设+reasoning+placeholder再迭代)、反AI slop清单、React+Babel最佳实践、Tweaks变体切换、Speaker Notes演示、Starter Components(幻灯片外壳/变体画布/动画引擎/设备边框)、App原型专属守则(默认从Wikimedia/Met/Unsplash取真图、每台iPhone包AppPhone状态管理器可交互、交付前跑Playwright点击测试)、Playwright验证、HTML动画→MP4/GIF视频导出(25fps基础 + 60fps插帧 + palette优化GIF + 6首场景化BGM + 自动fade)。**需求模糊时的Fallback**:设计方向顾问模式——从5流派×20种设计哲学(Pentagram信息建筑/Field.io运动诗学/Kenya Hara东方极简/Sagmeister实验先锋等)推荐3个差异化方向,展示24个预制showcase(8场景×3风格),并行生成3个视觉Demo让用户选。**交付后可选**:专家级5维度评审(哲学一致性/视觉层级/细节执行/功能性/创新性各打10分+修复清单)。
Also in 3 projects that use this
rogue-dev-studioSkillgithub-cli
GitHub CLI authentication and workflow configuration. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `github-cli` work when listed in TEAM.yaml or explicitly requested.
Also in 3 projects that use this
seikaikyoSkillbanner-design
Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with optional generated or supplied visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage.
Also in 4 projects that use this
OpenAISkillusing-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
Also in 9 projects that use this
GoogleSkillponytail
Forces the laziest solution that actually works, simplest, shortest, most minimal. Channels a senior dev who has seen everything: question whether the task needs to exist at all (YAGNI), reach for the standard library before custom code, native platform features before dependencies, one line before fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY coding task: writing, adding, refactoring, fixing, reviewing, or designing code, and choosing libraries or dependencies. Also use whenever the user says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal solution", "yagni", "do less", or "shortest path", or complains about over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT use for non-coding requests (general knowledge, prose, translation, summaries, recipes).
Also in 9 projects that use this
LLl0k0laDSkillidea-refine
Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.
Also in 4 projects that use this
Other versions126 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 126
- forrestchang/andrej-karpathy-skills★ 217ksame name
- multica-ai/andrej-karpathy-skills★ 214ksame name
- ghostfolio/ghostfolio★ 9.7ksame name
- OpenBMB/PilotDeck★ 5ksame name
- didi/mpx★ 4ksame name
- hzm0321/real-time-fund★ 1.8ksame name
- x-tools-author/x-tools★ 1.1ksame name
- coco-research/coco★ 797same name
- mxyhi/ok-skills★ 511same name
- vtroisWhite/andrej-karpathy-skills★ 426same name
116 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- conversion-systemSkill
- fableSkill
- goalSkill
- graph-loopSkill
- handoffSkill
- managerSkill
- outer-loopSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 122 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Write the minimum code that solves the problem in front of you, not the minimum that could solve every future version of it.
- Distinctive: line 53
Every task needs a success criterion before code is written.
- Distinctive: line 59
When something breaks, investigate — don't guess.
- Distinctive: line 61
Don't paper over an unexpected null with a null check.
- Very specific: line 65
Every dependency is permanent code you don't control.
“Common” is measured: kept by at least 6 in 10 of the 122 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Karpathy Guidelines — code you will not rewrite
This exists because language models make predictable mistakes — the same ones, over and over. Not suggestions: rules. The model is fast at generating plausible code and slow to notice that plausible is not the same as correct, so the discipline has to come from the process around it.
Tradeoff: biases toward caution over speed. Trivial one-liners — use judgment, skip.
I. Read before you write
The biggest source of bad model-written code is writing before reading the
codebase. Read the files you're about to touch — read, not skim. Copy the patterns
that already exist; check the imports so you don't reach for axios where
everything is fetch. When you can't find a pattern, ask instead of guessing.
II. Think before you code
Figure out what you're doing before you type. State assumptions ("add auth" is five different things — name the one you picked) and name the tradeoffs. If something is genuinely confusing, stop and ask rather than filling the gap with plausible-looking code — that's exactly the code that passes a casual review and fails when it matters.
III. Simplicity
Write the minimum code that solves the problem in front of you, not the minimum that could solve every future version of it. Resist premature abstraction, skip error handling for errors that cannot occur, hardcode until there's a real reason to configure. Test: if the only reason something is abstracted is "in case we need to," you've over-built it.
IV. Surgical changes
Your diff should be as small as the task allows. Don't touch what you weren't asked to touch, match the existing style, don't reformat — a formatter pass buries the three lines that matter inside three hundred that don't. Can you justify every changed line by the task? If a line is there because "while I was in there," revert it.
V. Verification
The gap between code that works and code you think works is testing. Fixing a bug: write the failing test first, watch it fail, then fix — that's the only proof you fixed the cause and not the symptom. Test behavior that can actually break, not that a constructor sets a field. If something is hard to test, that's information about the design, not permission to skip.
VI. Goal-driven execution
Every task needs a success criterion before code is written. "Add validation" becomes "reject a missing or malformed email, return 400 with a clear message, test both cases." For anything multi-step, state the plan first so the user can catch a wrong approach before you spend an hour building it.
VII. Debugging
When something breaks, investigate — don't guess. Read the whole error and the stack trace, reproduce the problem before you change anything, change one thing at a time. Don't paper over an unexpected null with a null check; find out why it's null, or the bug just moves somewhere quieter.
VIII. Dependencies
Every dependency is permanent code you don't control. Before adding one, ask whether
the project or the standard library already does it (crypto.randomUUID() over a
uuid package). When you do add one, say why — so the choice is visible rather than
smuggled into the manifest.
IX. Communication
Say what you did and why, not just a block of code. Flag concerns even when you did exactly what was asked. Be precise about uncertainty: "I'm not sure this library supports streaming" tells the user what to verify; "I think this should work" does not.
X. Common failure modes — catch yourself, then stop
- Kitchen Sink — restructuring half the codebase while you're at it.
- Wrong Abstraction — abstracting before you've copy-pasted twice.
- Optimistic Path — happy path handled, the 500 ignored.
- Runaway Refactor — a fix that cascades across files.
Catch yourself in any of these and the right move is to stop, not push through.
Consolidated 2026-07-24 from the definitive 10-section field notes. Supersedes the
former clarity + 4-rule karpathy-guidelines duplicates (clarity archived).
Referenced by ~/.claude/CLAUDE.md; that inline 4-line block is the always-on
summary, this is the progressive-disclosure detail.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

