karpathy-guidelines

Enforce coding guardrails for minimal, surgical LLM code changes.

1|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/Herxinsasa/Skills-Collector --skill karpathy-guidelines-herxinsasa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/Herxinsasa/Skills-Collector/tree/main/andrej-karpathy-skills/skills/karpathy-guidelines
Command: npx skills add https://github.com/Herxinsasa/Skills-Collector --skill karpathy-guidelines-herxinsasa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

LLMs frequently make common coding mistakes such as overcomplicating solutions, making unnecessary edits to existing code, and failing to define clear success criteria when writing, reviewing, or refactoring code, leading to extra rework and technical debt.

Core Features & Use Cases

  • Pre-Coding Guardrails: Requires surfacing assumptions, clarifying ambiguities, and stating tradeoffs before writing any code to avoid misalignment with requirements.
  • Simplicity-First Implementation: Enforces writing the minimum viable code that solves the stated problem, with no unrequested features, abstractions, or speculative error handling.
  • Surgical Edit Rules: Mandates only modifying code directly related to the user's request, matching existing code style, and only removing unused code created by your own changes.
  • Goal-Driven Execution: Requires defining verifiable success criteria for every task, with clear checkpoints for multi-step work to enable independent validation.
  • Use Case: Ideal for developers using AI assistants for code generation, PR reviews, bug fixes, and refactoring tasks to reduce costly rework and improve code quality.

Quick Start

Use the karpathy-guidelines skill to review your recent pull request changes and simplify any overcomplicated sections while ensuring all edits directly align with the original request.

Frequently Asked Questions about karpathy-guidelines

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

FAQPage Schema
How do I stop LLMs from making unnecessary edits to unrelated code during code generation?

To prevent unnecessary edits during code generation, enforce surgical edit rules that mandate modifying only code directly related to the request. This approach matches existing code style and removes solely unused code generated by your own changes.

What causes overcomplicated implementations in LLM code generation and how to avoid it?

Overcomplicated implementations in LLM code generation occur when unrequested features or speculative error handling are added. Avoid this by enforcing a simplicity-first rule that writes minimum viable code to solve the stated problem.

How to define verifiable success criteria for LLM code refactoring tasks?

Define verifiable success criteria for LLM code refactoring tasks by establishing clear checkpoints for multi-step work. This goal-driven execution requires explicit metrics for every task to enable independent validation of the refactored code.

Why should I surface assumptions before writing code with an AI assistant?

Surfacing assumptions before writing code with an AI assistant clarifies ambiguities and states tradeoffs early. These pre-coding guardrails prevent misalignment with requirements, reducing extra rework and technical debt during software development.

Can I apply these coding guidelines for pull request review and bug fixing?

Yes, you can apply these coding guidelines for pull request review and bug fixing. The behavioral rules are designed for software development workflows, helping individual developers and engineering teams simplify overcomplicated sections and validate changes.