karpathy-guidelines

Enforce behavioral guidelines for LLM-assisted coding to prevent overcomplication and dead code.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/chrisliu298/karpathy-guidelines --skill karpathy-guidelines-chrisliu298
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/chrisliu298/karpathy-guidelines/tree/main
Command: npx skills add https://github.com/chrisliu298/karpathy-guidelines --skill karpathy-guidelines-chrisliu298

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps LLMs avoid common coding mistakes like overcomplication, dead code, and incorrect assumptions, leading to more efficient and maintainable code.

Core Features & Use Cases

  • Promotes Simplicity: Encourages writing the minimum code necessary to solve a problem.
  • Enforces Caution: Guides LLMs to think before coding, ask clarifying questions, and avoid speculative additions.
  • Ensures Clarity: Promotes surgical changes, matching existing styles, and clear goal-driven execution.
  • Use Case: When asking an LLM to refactor a piece of code, invoking this skill ensures the LLM only makes necessary changes and doesn't introduce unnecessary complexity or features.

Quick Start

Use the karpathy-guidelines skill to ensure your LLM writes simple, direct code for the task.

Frequently Asked Questions about karpathy-guidelines

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

FAQPage Schema
How do I stop an LLM from overcomplicating code during refactoring?

To stop an LLM from overcomplicating code during refactoring, apply behavioral guidelines that enforce simplicity first, demand surgical changes, and prevent speculative additions. This ensures the model writes only the minimum code necessary to solve the problem.

What are the best coding guidelines for LLM-assisted code generation?

The best coding guidelines for LLM-assisted code generation enforce four core principles: Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution. This prevents common pitfalls like bloated abstractions, dead code, and incorrect assumptions.

How do I make an LLM ask clarifying questions before writing code?

To make an LLM ask clarifying questions before writing code, enforce a caution-biased guideline set requiring the model to think before coding. This approach prevents incorrect assumptions and ensures clear, goal-driven execution.

Does enforcing simplicity guidelines prevent LLMs from adding dead code?

Yes, enforcing simplicity guidelines prevents LLMs from adding dead code by biasing the generation toward caution and surgical changes. The guidelines explicitly restrict speculative additions and bloated abstractions, ensuring cleaner, maintainable code.

How do I ensure an LLM matches existing code styles when making changes?

To ensure an LLM matches existing code styles when making changes, enforce surgical changes as a core principle. This requires the model to execute goal-driven updates without introducing unnecessary complexity or unrelated features.

When should I use LLM coding guidelines for software engineering tasks?

You should use LLM coding guidelines for software engineering tasks whenever you need to enforce caution and simplicity. Applying these guidelines to all coding tasks prevents overcomplication, bloated abstractions, and incorrect assumptions during code generation.