karpathy-guidelines

Applies behavioral guidelines to reduce common LLM coding mistakes during code writing and review.

25|4|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/thangchung/agent-engineering-experiment --skill karpathy-guidelines-thangchung
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/thangchung/agent-engineering-experiment/tree/main/DotNetClaw/.github/skills/karpathy-guidelines
Command: npx skills add https://github.com/thangchung/agent-engineering-experiment --skill karpathy-guidelines-thangchung

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM-generated code often suffers from overcomplication, unrequested features, silent assumptions, and sprawling edits that touch unrelated code. This Skill provides behavioral guidelines, derived from Andrej Karpathy's observations on LLM coding pitfalls, that keep AI-assisted coding focused, simple, and verifiable. ## Core Features & Use Cases - Think Before Coding: Surfaces assumptions, ambiguities, and simpler alternatives before implementation instead of silently picking an interpretation. - Simplicity and Surgical Changes: Enforces minimal code for the task, no speculative abstractions, and edits that touch only what the request requires. - Goal-Driven Execution: Transforms vague tasks into verifiable success criteria, such as writing a failing test before fixing a bug. - Use Case: When asking an AI to refactor a module or fix a bug, activate these guidelines so the change stays minimal, matches existing style, and is verified against explicit test criteria. ## Quick Start Apply the karpathy guidelines while refactoring this function, keeping changes minimal and defining testable success criteria first.

Frequently Asked Questions about karpathy-guidelines

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

FAQPage Schema
How do I stop AI from overcomplicating code?▼

Use guidelines that enforce simplicity first: no features beyond what was asked, no abstractions for single-use code, and no unrequested configurability. A useful check is whether a senior engineer would call the result overcomplicated.

How to make AI coding assistants make smaller changes?▼

Require surgical changes where every edited line traces directly to the user's request. The AI should not refactor adjacent code, reformat unrelated sections, or delete pre-existing dead code unless explicitly asked.

What are Karpathy's guidelines for LLM coding?▼

They are behavioral rules derived from Andrej Karpathy's observations on LLM coding pitfalls: think before coding, keep solutions simple, make surgical changes, and define goal-driven success criteria verified by tests.

When should I not use strict coding guidelines?▼

These guidelines bias toward caution over speed, so for trivial tasks they may add unnecessary overhead. Use judgment and skip the full process when the task is small and unambiguous.

How do I verify AI-generated code changes are correct?▼

Convert tasks into verifiable goals, such as writing a test that reproduces a bug before fixing it, or ensuring tests pass before and after a refactor. Strong success criteria let the AI loop independently until verified.