karpathy-guidelines

Apply behavioral guidelines to LLM coding for simplicity and surgical edits.

41|8|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/fimoklei/pm-ai-playbook --skill karpathy-guidelines-fimoklei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/fimoklei/pm-ai-playbook/tree/main/skills/agentic-skills/karpathy-guidelines
Command: npx skills add https://github.com/fimoklei/pm-ai-playbook --skill karpathy-guidelines-fimoklei

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps reduce common coding mistakes made by Large Language Models (LLMs) by providing a set of behavioral guidelines. It aims to improve code quality, clarity, and maintainability.

Core Features & Use Cases

  • Pre-coding best practices: Encourages explicit assumption stating, surfacing tradeoffs, and clarifying confusion before implementation.
  • Simplicity focus: Guides towards writing minimum viable code, avoiding speculative features or over-abstraction.
  • Surgical editing: Promotes touching only necessary code, cleaning up only one's own mess, and matching existing styles.
  • Goal-driven execution: Emphasizes defining verifiable success criteria and looping until verified.
  • Use Case: When asking an LLM to refactor a piece of code, use these guidelines to ensure the LLM focuses only on the requested changes and doesn't introduce unnecessary complexity or side effects.

Quick Start

Apply the karpathy-guidelines skill to ensure the LLM writes simple, surgical, and goal-driven code.

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 overcomplicating code during refactoring?

To prevent overcomplication during refactoring, apply behavioral guidelines that enforce surgical edits and minimum viable code. This ensures the LLM touches only necessary code, matches existing styles, and avoids speculative features or unnecessary side effects.

What are the best practices for writing code with LLMs?

Best practices for writing code with LLMs involve stating explicit assumptions, surfacing tradeoffs, and defining verifiable success criteria. This goal-driven execution approach ensures the LLM focuses on clarity, efficiency, and maintainable software development.

Why does my LLM-generated code include unnecessary features and abstractions?

Unnecessary features and abstractions occur when LLMs lack simplicity constraints. Enforcing guidelines that promote minimum viable code and explicit assumption stating prevents the LLM from introducing speculative complexity during code generation.

How do I ensure LLM code modifications stay surgical and minimal?

To ensure surgical and minimal code modifications, use guidelines that restrict the LLM to touching only necessary code and cleaning up only its own mess. This prevents unwanted side effects and maintains existing code style during refactoring.

When do I need coding guidelines for LLM-generated code?

You need coding guidelines for LLM-generated code during code writing, review, and refactoring. These guidelines mitigate common LLM coding errors by establishing verifiable success criteria and ensuring goal-oriented execution throughout the software development process.