karpathy-guidelines

Apply behavioral guidelines to reduce LLM coding mistakes in code changes.

1|Updated May 20, 2025
One-click install
npx skills add https://github.com/vessux/dotfiles --skill karpathy-guidelines-vessux
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/vessux/dotfiles/tree/main/umbel/skills/local/karpathy-guidelines
Command: npx skills add https://github.com/vessux/dotfiles --skill karpathy-guidelines-vessux

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Behavioral guidelines to reduce common LLM coding mistakes, derived from Karpathy's observations on LLM coding pitfalls, helping engineers avoid overcomplication, surface assumptions, and define a clear path for safe changes.

Core Features & Use Cases

  • Minimal and surgical changes: Touch only what you must; avoid altering unrelated code.
  • Explicit assumptions and tradeoffs: Surface assumptions and state tradeoffs before coding.
  • Verifiable success criteria and plan: Provide a plan with measurable criteria to guide changes.

Quick Start

Apply these guidelines to your current coding task to minimize mistakes.

Frequently Asked Questions about karpathy-guidelines

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

FAQPage Schema
How do I prevent common LLM coding mistakes when refactoring code?

To prevent common LLM coding mistakes during refactoring, apply surgical guidelines that enforce minimal changes, surface explicit assumptions, and define verifiable success criteria before executing modifications. This approach avoids overcomplication and keeps changes strictly targeted.

What are surgical coding guidelines for LLMs?

Surgical coding guidelines are behavioral rules that ensure LLMs touch only necessary code, state explicit tradeoffs before writing, and provide a verifiable plan. They reduce overcomplication by forcing the model to define goals and assumptions upfront before generating changes.

How do I review code generated by an LLM for overcomplication?

Review LLM-generated code for overcomplication by checking if the changes are minimal and surgical, verifying that assumptions are explicitly stated, and ensuring the implementation matches a predetermined plan with measurable success criteria.

Can I use these coding guidelines for any LLM refactoring task?

Yes, you can use these coding guidelines for any LLM refactoring task regardless of platform. They are behavioral guidelines applied to writing or reviewing code, requiring no specific dependencies or environment setup to implement within your prompts.

What's the best way to define verifiable success criteria for LLM code changes?

The best way to define verifiable success criteria for LLM code changes is to specify clear goals and state explicit assumptions upfront. This provides a measurable plan that guides the LLM to execute surgical changes without altering unrelated code.

Why does my LLM generated code alter unrelated functions during a refactor?

LLM generated code alters unrelated functions during a refactor because it lacks explicit surgical constraints. By applying behavioral guidelines that enforce minimal changes and require verifiable success criteria, you prevent the model from overcomplicating the output.