karpathy-guidelines

Guide code writing, review, and refactoring to mitigate LLM coding errors.

5|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/mfmezger/ai_agent_dotfiles --skill karpathy-guidelines-mfmezger
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/mfmezger/ai_agent_dotfiles/tree/main/shared/skills/karpathy-guidelines
Command: npx skills add https://github.com/mfmezger/ai_agent_dotfiles --skill karpathy-guidelines-mfmezger

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers and AI agents avoid common pitfalls in coding by providing clear, actionable guidelines to improve code quality, reduce complexity, and ensure clarity.

Core Features & Use Cases

  • Reduces Overcomplication: Encourages writing the minimum necessary code.
  • Promotes Clarity: Surfaces assumptions and tradeoffs explicitly.
  • Ensures Surgical Changes: Guides users to modify only the required parts of existing codebases.
  • Focuses on Verifiable Goals: Helps define clear success criteria for tasks.
  • Use Case: When an AI agent is asked to refactor a piece of code, these guidelines ensure it only modifies what's necessary and doesn't introduce speculative features.

Quick Start

Apply the karpathy-guidelines skill to ensure all code changes are minimal and well-justified.

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 when refactoring existing code?

To prevent LLM coding mistakes during refactoring, apply behavioral guidelines that enforce surgical edits, ensuring the AI modifies only necessary code without introducing speculative features or unnecessary complexity.

What are the best coding guidelines for AI-assisted software development?

Coding guidelines for AI-assisted software development should focus on explicit assumption surfacing, minimizing code complexity, performing surgical edits, and establishing verifiable success criteria to mitigate common large language model errors.

How do I define verifiable success criteria for AI code generation tasks?

Verifiable success criteria for AI code generation tasks are defined by establishing clear, testable goals before implementation, ensuring that code changes remain minimal, well-justified, and directly address the specified requirements.

Why does AI-generated code often introduce unnecessary complexity?

AI-generated code often introduces unnecessary complexity because models tend to overcomplicate solutions; applying focused guidelines encourages writing the minimum necessary code and explicitly surfacing tradeoffs to reduce bloat.

Can I use these coding guidelines for reviewing AI agent code changes?

Yes, you can use these coding guidelines for reviewing AI agent code changes, as they provide actionable principles to surface hidden assumptions, verify success criteria, and ensure modifications are surgical and minimal.

When should I not use automated refactoring for my software development?

You should be cautious with automated refactoring when tasks lack clear verifiable success criteria or when the AI risks modifying unnecessary parts of the codebase, as guidelines emphasize surgical, minimal changes only.