karpathy-guidelines

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

Updated Sep 7, 2026
One-click install
npx skills add https://github.com/cgfixit/CG-agent-harness --skill karpathy-guidelines-cgfixit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/cgfixit/CG-agent-harness/tree/main/assets/skills/karpathy-guidelines
Command: npx skills add https://github.com/cgfixit/CG-agent-harness --skill karpathy-guidelines-cgfixit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM-generated code often suffers from overcomplication, 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 tradeoffs explicitly instead of picking interpretations silently. - Simplicity and Surgical Changes: Enforces minimal code for the task and restricts edits to lines that trace directly to the user's request. - 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 function or fix a bug, activate these guidelines so the response states assumptions, avoids unrelated refactors, and defines how success will be verified. ## Quick Start Ask the AI to apply the karpathy-guidelines skill while writing or reviewing your 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 overcomplicated code from LLM assistants?▼

Apply guidelines that require minimum code for the problem, no speculative abstractions, and no unrequested configurability. This Skill instructs the model to rewrite solutions that a senior engineer would consider overcomplicated.

How to make AI coding assistants surface assumptions before coding?▼

Use the Think Before Coding guideline, which requires the model to state assumptions explicitly, present multiple interpretations instead of picking silently, and stop to ask when requirements are unclear.

What are surgical changes in AI-assisted code editing?▼

Surgical changes mean touching only code that traces directly to the user's request, matching existing style, and avoiding unrelated refactors or formatting fixes. Pre-existing dead code is mentioned but not deleted unless asked.

Does this skill execute code or connect to a repository?▼

No. It is prompt-level coding context only and does not connect a repository, discover a project, or execute any tool. The harness's write gates and confirmation requirements remain fully in force.

When should I not use these coding guidelines?▼

Skip them for trivial tasks where caution adds overhead without benefit. The guidelines bias toward caution over speed, so use judgment for very small or obvious changes.