apply-karpathy-guidelines

Guide LLM coding with planning, simplicity, and verifiable success criteria.

Updated May 6, 2025
One-click install
npx skills add https://github.com/jah377/dotfiles --skill apply-karpathy-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apply-karpathy-guidelines
Source: https://github.com/jah377/dotfiles/tree/main/stow/claude/.claude/skills/apply-karpathy-guidelines
Command: npx skills add https://github.com/jah377/dotfiles --skill apply-karpathy-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses common coding mistakes made by Large Language Models, promoting more robust, efficient, and maintainable code by guiding users through a structured thinking and implementation process.

Core Features & Use Cases

  • Pre-coding Checklist: Ensures assumptions are stated, tradeoffs are considered, and clarity is achieved before implementation.
  • Simplicity Enforcement: Guides users to write the minimum necessary code, avoiding speculative features or over-abstraction.
  • Surgical Editing: Promotes focused changes, touching only what is required and cleaning up only the immediate impact of modifications.
  • Goal-Oriented Development: Encourages defining verifiable success criteria to ensure tasks are completed correctly and efficiently.
  • Use Case: When refactoring a complex function, use these guidelines to ensure you only modify the necessary parts, define clear tests for the changes, and avoid introducing new issues.

Quick Start

Before writing any code, state your assumptions and define clear success criteria for the task.

Frequently Asked Questions about apply-karpathy-guidelines

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

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

To prevent LLM coding errors during refactoring, apply behavioral guidelines enforcing surgical edits, explicit assumption surfacing, and minimal viable code. This structured approach ensures focused modifications and reduces complexity in production environments.

What are LLM best practices for writing minimal viable code?

LLM best practices for writing minimal viable code involve stating assumptions before implementation, avoiding speculative features, and enforcing simplicity. This ensures only the necessary code is written without over-abstraction.

How do I define verifiable success criteria for multi-step software development tasks?

Define verifiable success criteria for multi-step software development tasks by establishing goal-oriented execution metrics before coding. This requires explicit assumption surfacing to ensure tasks are completed correctly and efficiently.

Can I use these coding guidelines for complex function refactoring?

Yes, you can use these coding guidelines for complex function refactoring. They promote surgical editing by touching only required parts, defining clear tests for changes, and avoiding introducing new issues.

Why does my LLM generate over-abstractions and speculative features during code generation?

Your LLM generates over-abstractions and speculative features because it lacks simplicity enforcement. Applying structured guidelines guides the model to write the minimum necessary code and avoid speculative additions during code generation.