karpathy-guidelines

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

Updated May 21, 2026
One-click install
npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill karpathy-guidelines-cagesthrottleus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/CagesThrottleUs/private-ai-harness/tree/main/skills/karpathy
Command: npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill karpathy-guidelines-cagesthrottleus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM-generated code often suffers from overcomplication, silent assumptions, scope creep, and unverified claims. This Skill provides a set of behavioral guidelines, derived from Andrej Karpathy's observations on LLM coding pitfalls, that keep AI-assisted coding surgical, simple, and verifiable. ## Core Features & Use Cases - Think Before Coding: Surfaces assumptions, ambiguities, and simpler alternatives explicitly instead of picking interpretations silently. - Simplicity and Surgical Changes: Enforces minimum-code solutions and restricts edits to lines that trace directly to the user's request, matching existing style. - Goal-Driven Verification: Transforms vague tasks into test-backed success criteria and requires adversarial repros for load-bearing safety or compatibility claims. - Use Case: While refactoring a validation module, the assistant writes a failing test first, touches only the relevant functions, removes only the imports its own changes orphaned, and builds a minimal repro to confirm the new input limit actually holds. ## Quick Start Ask the assistant to apply the karpathy guidelines while implementing or reviewing your next code change.

Frequently Asked Questions about karpathy-guidelines

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

FAQPage Schema
How do I reduce overcomplication in AI-generated code?

Apply simplicity-first rules: no speculative features, no abstractions for single-use code, and no unrequested configurability. If a 200-line solution could be 50 lines, rewrite it, and prefer deleting complexity over relocating it.

How to keep AI code changes surgical and minimal?

Require that every changed line traces directly to the user's request. Do not refactor adjacent code, reformat unrelated sections, or delete pre-existing dead code; only clean up imports and variables your own changes orphaned.

When should these coding guidelines not be applied strictly?

The guidelines bias toward caution over speed, so for trivial tasks use judgment rather than full ceremony. They are most valuable for multi-step implementations, refactors, and changes carrying correctness or compatibility claims.

How do I verify backward compatibility claims in code changes?

Read the dependency's actual source rather than trusting docs, then build the smallest adversarial repro that would falsify the claim. Ask what breaks for existing production clients before confirming the new behavior works.

Why does AI-generated code often include unnecessary error handling?

LLMs tend to add defensive handling for impossible scenarios and speculative flexibility. The guidelines counter this by requiring explicit assumptions and minimum code that solves only the stated problem.