explaingit

forrestchang/andrej-karpathy-skills

Analysis updated 2026-06-20

116,250Audience · developerComplexity · 1/5LicenseSetup · easy

TLDR

A CLAUDE.md configuration file for Claude Code and Cursor that enforces disciplined AI coding habits: surface assumptions first, make minimum changes, and verify with tests before finishing.

Mindmap

mindmap
  root((Karpathy Skills))
    What it does
      AI coding rules
      CLAUDE.md file
      Cursor rule file
    Principles
      Think before coding
      Simplicity first
      Surgical changes
      Goal-driven
    Audience
      Claude Code users
      Cursor users
    Install
      Plugin install
      Copy to project
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Drop this CLAUDE.md into a project so Claude Code stops making silent assumptions and asks clarifying questions before writing code.

USE CASE 2

Enforce a minimum-change rule so the AI only edits what you asked for and leaves unrelated code untouched.

USE CASE 3

Set up a test-driven workflow where the assistant writes a failing test first, then iterates until the code makes it pass.

USE CASE 4

Apply the same disciplined rules to the Cursor editor using the included Cursor rule file.

What is it built with?

Markdown

How does it compare?

forrestchang/andrej-karpathy-skillsclash-verge-rev/clash-verge-reviptv-org/iptv
Stars116,250116,117115,965
LanguageTypeScriptTypeScript
Setup difficultyeasyeasyeasy
Complexity1/53/51/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Free to use, copy, and adapt for any purpose under the MIT license.

In plain English

This project is a single configuration file called CLAUDE.md, designed to make Claude Code (an AI coding assistant) behave better when helping developers write software. It is based on observations from Andrej Karpathy about common pitfalls that large language models fall into when generating code. The problems it tries to fix are familiar to anyone who has worked with AI coding tools: the model makes silent assumptions, writes more code than necessary, edits files it was not asked to touch, and removes or changes things it does not fully understand. The solution is a short rulebook organized around four principles. Think Before Coding asks the model to surface its assumptions and ask questions when ambiguous. Simplicity First tells it to write the minimum code that solves the problem and avoid speculative abstractions. Surgical Changes restricts edits to only what was requested, even if nearby code looks improvable. Goal-Driven Execution reframes tasks as verifiable success criteria, often by writing tests first, so the assistant can loop until it gets things right. You would use it if you regularly work with Claude Code (or, with the included rule file, Cursor) and find the assistant overcomplicates things or makes unwanted changes. The repository is distributed either as a Claude Code plugin or as a CLAUDE.md file you copy into a project. There is also a Chinese-language version. The project is MIT-licensed.

Copy-paste prompts

Prompt 1
I've added the andrej-karpathy-skills CLAUDE.md to my project. Write me a task prompt that triggers the Surgical Changes rule so the AI only modifies one function and explains what it assumed.
Prompt 2
My Claude Code session rewrites code I didn't ask to change. Help me adapt the CLAUDE.md rules from andrej-karpathy-skills to add an explicit 'do not touch' list for certain files.
Prompt 3
I want to use the Goal-Driven Execution rule from this CLAUDE.md. Show me how to phrase a coding task so Claude writes a failing test first and loops until it passes.
Prompt 4
I use Cursor instead of Claude Code. How do I apply the andrej-karpathy-skills rules in Cursor using the included rule file?

Frequently asked questions

What is andrej-karpathy-skills?

A CLAUDE.md configuration file for Claude Code and Cursor that enforces disciplined AI coding habits: surface assumptions first, make minimum changes, and verify with tests before finishing.

What license does andrej-karpathy-skills use?

Free to use, copy, and adapt for any purpose under the MIT license.

How hard is andrej-karpathy-skills to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is andrej-karpathy-skills for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub forrestchang on gitmyhub

Verify against the repo before relying on details.