karpathy-guidelines

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

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/CYRUS-pinto/pi-bot --skill karpathy-guidelines-cyrus-pinto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/CYRUS-pinto/pi-bot/tree/main/.agents/skills/karpathy-guidelines
Command: npx skills add https://github.com/CYRUS-pinto/pi-bot --skill karpathy-guidelines-cyrus-pinto

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, minimal, 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 minimum-code solutions and restricts edits to only what the request requires, matching existing style. - Goal-Driven Execution: Transforms vague tasks into verifiable success criteria with test-driven loops and explicit step-by-step plans. - Use Case: When asking an AI to fix a bug or refactor a module, activate these guidelines so the agent writes a reproducing test first, changes only the relevant lines, and verifies the fix against defined criteria. ## Quick Start Apply the karpathy guidelines while refactoring this function, keeping changes minimal and defining verifiable 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 an AI coding assistant from overcomplicating code?

Apply simplicity-first guidelines that forbid unrequested features, single-use abstractions, and speculative configurability. The skill instructs the agent to check whether a senior engineer would call the solution overcomplicated and rewrite it smaller if so.

How to make AI code changes surgical and minimal?

Use surgical-change rules: touch only what the request requires, match existing style, and never refactor adjacent code. Every changed line must trace directly to the user's request, and only dead code created by your own changes gets removed.

What are Karpathy's guidelines for LLM coding pitfalls?

They are behavioral rules derived from Andrej Karpathy's observations on LLM coding mistakes. They cover thinking before coding, simplicity first, surgical changes, and goal-driven execution with verifiable success criteria.

When should I not use these coding guidelines?

The guidelines bias toward caution over speed, so they may slow down trivial tasks. For simple one-off edits, use judgment rather than applying the full assumption-surfacing and planning process.

How do I turn vague coding tasks into verifiable goals?

Convert each task into a testable criterion, such as writing a failing test that reproduces a bug and then making it pass. For multi-step work, state a brief plan where each step has an explicit verification check.