1---2name: karpathy-guidelines3description: <Purpose>4---56<Purpose>7This skill adapts the ideas from the `andrej-karpathy-skills` repository into a Codex-friendly workflow.8Use it when you want disciplined execution with less overengineering, smaller diffs, and tighter alignment to the actual goal.9</Purpose>1011<Use_When>12- The user asks for "Karpathy-style", "simple and surgical", or "don't overengineer"13- The task is easy to overcomplicate with abstractions or broad refactors14- You are about to modify a codebase with unclear side effects and want tighter discipline15- You need to keep changes minimal while still finishing the job end-to-end16</Use_When>1718<Do_Not_Use_When>19- The user explicitly wants broad redesign, large-scale refactor, or exploratory architecture work20- The task is purely creative writing with no engineering decision-making21- A larger systems redesign is already approved and minimalism would be counterproductive22</Do_Not_Use_When>2324<Core_Principles>2526## 1. Think Before Coding27- Restate the real goal in one or two sentences before editing28- Identify the smallest surface that can solve the problem29- Check what already exists before inventing a new pattern30- Do not code from a vague hunch when the codebase can answer the question directly3132## 2. Simplicity First33- Prefer the simplest solution that fully solves the problem34- Reuse existing modules, conventions, and utilities before adding new ones35- Avoid speculative abstractions, premature optimization, and "frameworking"36- If two approaches work, prefer the one that is easier to explain and easier to delete later3738## 3. Surgical Changes39- Touch as few files and symbols as possible40- Keep behavior changes narrow and intentional41- Avoid drive-by edits unless they are required for correctness42- Preserve surrounding code patterns unless there is a strong reason to unify or fix them4344## 4. Goal-Driven Execution45- Judge progress by whether the user goal is solved, not by how much code was produced46- Verify the concrete outcome after changes47- Call out remaining risks or gaps clearly instead of hiding them behind large edits48- Stop once the goal is met; do not keep polishing unrelated areas4950</Core_Principles>5152<Execution_Checklist>53Before editing:54- State the target outcome55- Identify the smallest likely change set56- Inspect existing code paths and constraints5758While editing:59- Keep diffs compact60- Prefer modification over invention61- Avoid renaming, moving, or restructuring unless necessary6263Before finishing:64- Verify the user-facing outcome65- Summarize what changed in plain language66- Name any residual risks, edge cases, or untested paths67</Execution_Checklist>6869<Behavioral_Defaults>70- Bias toward deletion over addition when safe71- Treat complexity as a cost that must be justified72- Avoid introducing new dependencies unless the user asked for them or the task truly requires them73- Do not confuse "thorough" with "large"74- When unsure, choose the more reversible path75</Behavioral_Defaults>7677<Suggested_Phrases>78When activating this skill mentally, aim for these questions:79- "What is the smallest change that solves the real problem?"80- "Can I reuse what is already here?"81- "Am I changing this because it is necessary, or because it is tempting?"82- "Does this help the user outcome, or just make the code look different?"83</Suggested_Phrases>8485<Source>86Adapted from:87- https://github.com/vtroisWhite/andrej-karpathy-skills88- repository guidance centered on Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution89</Source>