karpathy-guidelines

Apply behavioral guidelines to reduce common LLM coding mistakes and improve code quality.

228k|22.8k|Updated Jan 27, 2026
Ready to run
npx skills add https://github.com/multica-ai/andrej-karpathy-skills --skill karpathy-guidelines-multica-ai
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/multica-ai/andrej-karpathy-skills/tree/main/skills/karpathy-guidelines
Command: npx skills add https://github.com/multica-ai/andrej-karpathy-skills --skill karpathy-guidelines-multica-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large language models often make wrong assumptions, overcomplicate code, make unnecessary changes to unrelated sections, and lack clear success criteria. This Skill provides a structured framework to prevent these pitfalls and ensure focused, minimal, well-reasoned implementations. ## Core Features & Use Cases - Think Before Coding: State assumptions explicitly, surface tradeoffs, and push back on unclear requirements before implementation. - Simplicity First: Write minimum code that solves the problem—no speculative features, unnecessary abstractions, or defensive error handling. - Surgical Changes: Edit only what the task requires; match existing style; remove only orphaned code your changes created. - Goal-Driven Execution: Define verifiable success criteria and loop until goals are met through tests or concrete checks. - Use Case: When an AI assistant is refactoring a payment module, apply these guidelines to avoid over-engineering the code, accidentally changing unrelated logic, or adding features that weren't requested. ## Quick Start When working with an AI on code, ask it to follow the Karpathy guidelines by referencing the four core principles: think before coding, keep it simple, make surgical changes, and define measurable success criteria.

Frequently Asked Questions about karpathy-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent an AI from overcomplicating code?▼

Apply Simplicity First: request the AI write minimum code solving only the stated problem, remove speculative features and unused abstractions, and ask whether a senior engineer would call the result overcomplicated. If yes, rewrite it simpler.

What does surgical changes mean in code editing?▼

Surgical changes means editing only lines directly required by the task. Match existing style, don't refactor working code, and remove only imports or functions your changes made orphaned—never pre-existing dead code.

Why should I define success criteria before coding?▼

Clear success criteria (e.g., 'write tests for invalid inputs, then make them pass') let the AI work autonomously with verifiable endpoints. Vague criteria ('make it work') require constant clarification and lead to scope creep.

How do I surface assumptions when requirements are ambiguous?▼

Before implementing, state your interpretation explicitly, present multiple valid interpretations if ambiguity exists, and ask which path aligns with the user's intent. This prevents silent wrong choices.

When should I not apply these guidelines?▼

These guidelines bias toward caution over speed. For trivial tasks like renaming a variable, use judgment—don't over-process. Apply them fully for complex refactors, multi-step features, or production changes.