karpathy-guidelines

Enforce explicit assumptions and minimal implementations in LLM-generated code.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Nero-kk/claude-agent-skills --skill karpathy-guidelines-nero-kk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/Nero-kk/claude-agent-skills/tree/main/claude-skills/karpathy-guidelines
Command: npx skills add https://github.com/Nero-kk/claude-agent-skills --skill karpathy-guidelines-nero-kk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

These behavioral guidelines reduce common LLM coding mistakes by forcing explicit assumptions, minimizing speculative features, and driving verifiable outcomes so generated or edited code is safer and more maintainable.

Core Features & Use Cases

  • Think Before Coding: Require explicit assumptions and clarify ambiguities before implementation.
  • Simplicity First: Favor the minimal implementation that satisfies requirements and avoid speculative abstraction.
  • Surgical Changes & Goal-Driven Execution: Make only necessary edits, preserve surrounding code style, and define verifiable success criteria such as tests or checks.
  • Use Case: Use when asking an assistant to implement a feature, perform a code review, or refactor a module to ensure changes are focused, testable, and non-disruptive.

Quick Start

Ask the assistant to apply the Karpathy guidelines: state assumptions, propose the simplest change, make surgical edits, and list tests or checks that verify success.

Frequently Asked Questions about karpathy-guidelines

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

FAQPage Schema
How do I prevent LLM coding mistakes during code generation and refactoring?

Prevent LLM coding mistakes by enforcing explicit assumptions, minimal implementations, and verifiable success criteria before generating or refactoring source code. This approach ensures generated changes are safer, testable, and maintainable.

What are the best coding guidelines for test-driven bug fixes with LLMs?

The best coding guidelines for test-driven bug fixes require stating assumptions, proposing the simplest change, making surgical edits, and listing tests that verify success to guide automated coding workflows effectively.

How do I enforce simplicity and surgical changes in LLM code review?

Enforce simplicity in LLM code review by favoring the minimal implementation that satisfies requirements, avoiding speculative abstraction, and making only necessary edits to preserve surrounding code style without disruption.

Does applying Karpathy guidelines work for automated code authoring workflows?

Yes, applying Karpathy guidelines works for automated code authoring workflows by driving verifiable outcomes and forcing explicit assumptions, which reduces common LLM coding mistakes in generated source code.

When should I not use minimal implementations for LLM code refactoring?

You should not use minimal implementations for LLM code refactoring when the task requires complex speculative abstraction rather than surgical edits, or when verifiable success criteria cannot be clearly defined.