karpathy-guidelines

Enforce clear assumptions, simplicity, and surgical code changes.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/Pans0020/opencode-skills --skill karpathy-guidelines-pans0020
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/Pans0020/opencode-skills/tree/main/karpathy-guidelines
Command: npx skills add https://github.com/Pans0020/opencode-skills --skill karpathy-guidelines-pans0020

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces common LLM coding failures by enforcing clear assumptions, simpler implementations, minimal edits, and verifiable success criteria.

Core Features & Use Cases

  • Think before coding: surfaces assumptions and ambiguous interpretations instead of picking silently.
  • Simplicity first: discourages overengineering, unnecessary abstractions, and speculative error handling.
  • Surgical changes: limits edits to what the user asked, avoiding risky refactors and preserving unrelated behavior.
  • Goal-driven execution: turns tasks into testable success criteria with a loop that verifies progress.

Quick Start

Use the karpathy-guidelines when drafting or reviewing an AI-generated code change, explicitly stating assumptions, keeping changes surgical, and defining what tests or checks prove the result is correct.

Frequently Asked Questions about karpathy-guidelines

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

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

To reduce LLM coding mistakes, enforce clear assumptions, simplicity, and surgical refactors that limit edits to the user's request. Define verifiable success criteria with test-backed goal loops to verify progress and prevent accidental collateral changes.

What is the best way to prevent speculative features and overengineering in AI-generated code?

Prevent overengineering in AI-generated code by applying simplicity-first guidelines that discourage unnecessary abstractions and speculative error handling. Surface ambiguous interpretations explicitly rather than picking them silently during code review.

How do I ensure surgical changes when reviewing LLM refactors?

Ensure surgical changes during LLM refactoring by tying edits directly to user requests and avoiding risky refactors. This approach preserves unrelated behavior and prevents accidental collateral changes from occurring.

Why does my LLM write code with unintended collateral behavior changes?

Unintended collateral behavior changes occur when LLMs lack enforced surgical edits and clear assumptions. Apply guidelines that tie edits directly to user requests and establish verifiable success criteria with test-backed loops to prevent this.

Can I use behavior guidelines to define testable success criteria for code generation?

Yes, behavior guidelines turn coding tasks into testable success criteria by establishing a goal-driven execution loop. This loop verifies progress and defines exactly what tests or checks prove the code result is correct.