karpathy-guidelines

Enforces four coding principles for clarification, simplicity, surgical changes, and test-driven goals.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Simon-YHKim/eject-button --skill karpathy-guidelines-simon-yhkim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/Simon-YHKim/eject-button/tree/main/.claude/skills/karpathy-guidelines
Command: npx skills add https://github.com/Simon-YHKim/eject-button --skill karpathy-guidelines-simon-yhkim

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM coding agents often guess at ambiguous requirements, over-engineer simple requests, refactor unrelated code, and declare success without verification. This Skill applies Andrej Karpathy's four principles as a base behavioral layer so every coding task starts with clarified assumptions, minimal code, scoped diffs, and verifiable goals. ## Core Features & Use Cases - Think Before Coding: Surfaces assumptions, asks clarifying questions when confidence is below threshold, and presents multiple interpretations instead of silently picking one. - Simplicity First: Blocks speculative features, premature abstraction, and unrequested configurability; applies the 200-to-50-line rewrite test. - Surgical Changes: Ensures every diff line traces to the user request, forbids drive-by refactors, and matches existing code style. - Goal-Driven Execution: Converts imperative requests into declarative, test-first goals with step-by-step verify loops. - Use Case: When asked to "add a discount function," the agent produces one small function instead of a Strategy-pattern framework; when asked to "fix a bug," it writes a reproduction test first and touches only the buggy logic. ## Quick Start Ask the agent to apply the karpathy principles before implementing your next feature or bug fix.

Frequently Asked Questions about karpathy-guidelines

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

FAQPage Schema
How do I stop an AI coding agent from over-engineering simple requests?

Apply the Simplicity First principle, which bans speculative features, single-use abstractions, and unrequested configurability. The agent self-checks whether a senior engineer would call the output overcomplicated and rewrites toward minimal code.

How to make an AI agent ask clarifying questions before writing code?

Use the Think Before Coding principle: the agent surfaces assumptions, presents all valid interpretations, and stops to ask when confidence in the intended outcome falls below threshold, instead of silently guessing.

What are the Karpathy four principles for LLM coding?

They are Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution. Together they reduce wrong assumptions, over-engineering, scope creep in diffs, and unverified claims of completion.

Does this skill work with TDD or orchestrator workflows?

Yes, it is designed as a base behavioral layer referenced by orchestrator and TDD skills. Principle 4 maps directly to test-first execution, and Principle 1 aligns with diagnostic or interview phases in multi-step workflows.

When should I not apply all four principles strictly?

For trivial tasks like typo fixes or obvious one-liners, full four-principle verification adds unnecessary overhead. The skill explicitly advises scaling enforcement by judgment, targeting non-trivial work where mistakes are costly.