# Karpathy-Inspired Claude Code Guidelines

> A single CLAUDE.md file that improves Claude Code behavior by enforcing four principles derived from Andrej Karpathy's observations on LLM coding pitfalls.

Created by Jiayuan Zhang, Karpathy-Inspired Claude Code Guidelines is a single `CLAUDE.md` file designed to address common LLM coding pitfalls identified by Andrej Karpathy. It enforces four core principles — Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution — to reduce overcomplication, unnecessary edits, and silent wrong assumptions. The file can be installed as a Claude Code plugin or dropped directly into any project, and also ships with a Cursor rule for cross-editor compatibility.

- **Think Before Coding** — *Forces the model to state assumptions explicitly, surface ambiguity, present tradeoffs, and ask for clarification rather than guessing silently.*
- **Simplicity First** — *Instructs the model to write the minimum code that solves the problem, avoiding speculative features, unnecessary abstractions, and over-engineered solutions.*
- **Surgical Changes** — *Restricts edits to only what the user requested; the model must not refactor adjacent code, remove pre-existing dead code, or alter unrelated comments.*
- **Goal-Driven Execution** — *Transforms imperative tasks into verifiable success criteria with explicit verification steps, enabling the model to loop independently until goals are met.*
- **Claude Code Plugin install** — *Add the marketplace with `/plugin marketplace add forrestchang/andrej-karpathy-skills`, then install with `/plugin install andrej-karpathy-skills@karpathy-skills` to apply guidelines across all projects.*
- **Per-project CLAUDE.md install** — *Run `curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md` in any project directory for immediate effect.*
- **Cursor integration** — *A committed `.cursor/rules/karpathy-guidelines.mdc` file applies the same four principles when the project is opened in Cursor.*
- **Customizable** — *Designed to be merged with project-specific instructions; add your own sections to the generated `CLAUDE.md` for team or repo-level conventions.*

## Features
- Single CLAUDE.md file for Claude Code behavior improvement
- Think Before Coding principle
- Simplicity First principle
- Surgical Changes principle
- Goal-Driven Execution principle
- Claude Code plugin installation support
- Per-project CLAUDE.md installation
- Cursor project rule included
- Customizable with project-specific guidelines
- MIT-inspired open-source approach

## Integrations
Claude Code, Cursor

## Platforms
CLI

## Pricing
Open Source

## Links
- Website: https://github.com/forrestchang/andrej-karpathy-skills
- Documentation: https://github.com/forrestchang/andrej-karpathy-skills/blob/main/README.md
- Repository: https://github.com/forrestchang/andrej-karpathy-skills
- EveryDev.ai: https://www.everydev.ai/tools/andrej-karpathy-skills
