{"id":"de25d156-c905-4113-97c0-210c18017c97","shortId":"DHcHyb","kind":"skill","title":"karpathy-guidelines","tagline":"Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.","description":"# Karpathy Guidelines\n\nBehavioral guidelines to reduce common LLM coding mistakes, derived from [Andrej Karpathy's observations](https://x.com/karpathy/status/2015883857489522876) on LLM coding pitfalls.\n\n**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.\n\n## 1. Think Before Coding\n\n**Don't assume. Don't hide confusion. Surface tradeoffs.**\n\nBefore implementing:\n- State your assumptions explicitly. If uncertain, ask.\n- If multiple interpretations exist, present them - don't pick silently.\n- If a simpler approach exists, say so. Push back when warranted.\n- If something is unclear, stop. Name what's confusing. Ask.\n\n## 2. Simplicity First\n\n**Minimum code that solves the problem. Nothing speculative.**\n\n- No features beyond what was asked.\n- No abstractions for single-use code.\n- No \"flexibility\" or \"configurability\" that wasn't requested.\n- No error handling for impossible scenarios.\n- If you write 200 lines and it could be 50, rewrite it.\n\nAsk yourself: \"Would a senior engineer say this is overcomplicated?\" If yes, simplify.\n\n## 3. Surgical Changes\n\n**Touch only what you must. Clean up only your own mess.**\n\nWhen editing existing code:\n- Don't \"improve\" adjacent code, comments, or formatting.\n- Don't refactor things that aren't broken.\n- Match existing style, even if you'd do it differently.\n- If you notice unrelated dead code, mention it - don't delete it.\n\nWhen your changes create orphans:\n- Remove imports/variables/functions that YOUR changes made unused.\n- Don't remove pre-existing dead code unless asked.\n\nThe test: Every changed line should trace directly to the user's request.\n\n## 4. Goal-Driven Execution\n\n**Define success criteria. Loop until verified.**\n\nTransform tasks into verifiable goals:\n- \"Add validation\" → \"Write tests for invalid inputs, then make them pass\"\n- \"Fix the bug\" → \"Write a test that reproduces it, then make it pass\"\n- \"Refactor X\" → \"Ensure tests pass before and after\"\n\nFor multi-step tasks, state a brief plan:\n```\n1. [Step] → verify: [check]\n2. [Step] → verify: [check]\n3. [Step] → verify: [check]\n```\n\nStrong success criteria let you loop independently. Weak criteria (\"make it work\") require constant clarification.","tags":["karpathy","guidelines","andrej","skills","swarmclawai","agent-skills","agents-md","ai-agents","ai-coding","aider","claude-code","codex"],"capabilities":["skill","source-swarmclawai","skill-karpathy-guidelines","topic-agent-skills","topic-agents-md","topic-ai-agents","topic-ai-coding","topic-aider","topic-claude-code","topic-codex","topic-coding-agents","topic-copilot","topic-cursor","topic-developer-tools","topic-gemini-cli"],"categories":["andrej-karpathy-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/swarmclawai/andrej-karpathy-skills/karpathy-guidelines","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add swarmclawai/andrej-karpathy-skills","source_repo":"https://github.com/swarmclawai/andrej-karpathy-skills","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 6 github stars · SKILL.md body (2,224 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:36.614Z","embedding":null,"createdAt":"2026-05-18T13:22:22.783Z","updatedAt":"2026-05-18T19:14:36.614Z","lastSeenAt":"2026-05-18T19:14:36.614Z","tsv":"'/karpathy/status/2015883857489522876)':50 '1':68,332 '2':121,336 '200':162 '3':184,340 '4':275 '50':168 'abstract':139 'add':291 'adjac':205 'andrej':44 'approach':103 'aren':215 'ask':89,120,137,171,261 'assum':74 'assumpt':26,85 'avoid':20 'back':108 'behavior':4,34 'beyond':134 'bias':58 'brief':330 'broken':217 'bug':304 'caution':60 'chang':24,186,242,249,265 'check':335,339,343 'clarif':358 'clean':192 'code':10,18,40,53,71,125,144,201,206,233,259 'comment':207 'common':8,38 'configur':148 'confus':78,119 'constant':357 'could':166 'creat':243 'criteria':31,282,346,352 'd':224 'dead':232,258 'defin':28,280 'delet':238 'deriv':42 'differ':227 'direct':269 'driven':278 'edit':199 'engin':176 'ensur':317 'error':154 'even':221 'everi':264 'execut':279 'exist':93,104,200,219,257 'explicit':86 'featur':133 'first':123 'fix':302 'flexibl':146 'format':209 'goal':277,290 'goal-driven':276 'guidelin':3,5,33,35,57 'handl':155 'hide':77 'implement':82 'imports/variables/functions':246 'imposs':157 'improv':204 'independ':350 'input':297 'interpret':92 'invalid':296 'judgment':67 'karpathi':2,32,45 'karpathy-guidelin':1 'let':347 'line':163,266 'llm':9,39,52 'loop':283,349 'made':250 'make':22,299,312,353 'match':218 'mention':234 'mess':197 'minimum':124 'mistak':11,41 'multi':325 'multi-step':324 'multipl':91 'must':191 'name':116 'noth':130 'notic':230 'observ':47 'orphan':244 'overcompl':21,180 'pass':301,314,319 'pick':98 'pitfal':54 'plan':331 'pre':256 'pre-exist':255 'present':94 'problem':129 'push':107 'reduc':7,37 'refactor':17,212,315 'remov':245,254 'reproduc':309 'request':152,274 'requir':356 'review':15 'rewrit':169 'say':105,177 'scenario':158 'senior':175 'silent':99 'simpler':102 'simplic':122 'simplifi':183 'singl':142 'single-us':141 'skill' 'skill-karpathy-guidelines' 'solv':127 'someth':112 'source-swarmclawai' 'specul':131 'speed':62 'state':83,328 'step':326,333,337,341 'stop':115 'strong':344 'style':220 'success':30,281,345 'surfac':25,79 'surgic':23,185 'task':65,287,327 'test':263,294,307,318 'thing':213 'think':69 'topic-agent-skills' 'topic-agents-md' 'topic-ai-agents' 'topic-ai-coding' 'topic-aider' 'topic-claude-code' 'topic-codex' 'topic-coding-agents' 'topic-copilot' 'topic-cursor' 'topic-developer-tools' 'topic-gemini-cli' 'touch':187 'toward':59 'trace':268 'tradeoff':55,80 'transform':286 'trivial':64 'uncertain':88 'unclear':114 'unless':260 'unrel':231 'unus':251 'use':12,66,143 'user':272 'valid':292 'verifi':29,285,289,334,338,342 'warrant':110 'wasn':150 'weak':351 'work':355 'would':173 'write':14,161,293,305 'x':316 'x.com':49 'x.com/karpathy/status/2015883857489522876)':48 'yes':182","prices":[{"id":"215a50df-bdd8-449e-a574-c284ed3b09f8","listingId":"de25d156-c905-4113-97c0-210c18017c97","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"swarmclawai","category":"andrej-karpathy-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:22:22.783Z"}],"sources":[{"listingId":"de25d156-c905-4113-97c0-210c18017c97","source":"github","sourceId":"swarmclawai/andrej-karpathy-skills/karpathy-guidelines","sourceUrl":"https://github.com/swarmclawai/andrej-karpathy-skills/tree/main/skills/karpathy-guidelines","isPrimary":false,"firstSeenAt":"2026-05-18T13:22:22.783Z","lastSeenAt":"2026-05-18T19:14:36.614Z"}],"details":{"listingId":"de25d156-c905-4113-97c0-210c18017c97","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"swarmclawai","slug":"karpathy-guidelines","github":{"repo":"swarmclawai/andrej-karpathy-skills","stars":6,"topics":["agent-skills","agents-md","ai-agents","ai-coding","aider","claude-code","codex","coding-agents","copilot","cursor","developer-tools","gemini-cli","goose","karpathy","llm","openclaw","opencode","prompt-engineering","skills","windsurf"],"license":"mit","html_url":"https://github.com/swarmclawai/andrej-karpathy-skills","pushed_at":"2026-05-11T12:43:50Z","description":"Karpathy-inspired coding-agent guidelines packaged for Claude Code, Codex, Cursor, Gemini, OpenCode, Aider, Copilot, OpenClaw, and any AGENTS.md or Agent Skills-compatible agent.","skill_md_sha":"fab13b6d547506196692ea505a356d8b1ce32c0a","skill_md_path":"skills/karpathy-guidelines/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/swarmclawai/andrej-karpathy-skills/tree/main/skills/karpathy-guidelines"},"layout":"multi","source":"github","category":"andrej-karpathy-skills","frontmatter":{"name":"karpathy-guidelines","description":"Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria."},"skills_sh_url":"https://skills.sh/swarmclawai/andrej-karpathy-skills/karpathy-guidelines"},"updatedAt":"2026-05-18T19:14:36.614Z"}}