Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
andrej-karpathy-skills logo

andrej-karpathy-skills

karpathy-skills

workflowClaude Codeby forrestchang

Summary

Karpathy-inspired behavioral guidelines for coding agents: clarify assumptions, keep changes simple, edit surgically, and verify before claiming completion.

Install to Claude Code

/plugin install andrej-karpathy-skills@karpathy-skills

Run in Claude Code. Add the marketplace first with /plugin marketplace add dawsonblock/SKILL-MD if you haven't already.

README.md

Karpathy-Inspired Coding Agent Guidelines

<p align="center"> <strong>A practical instruction pack that makes coding agents more reliable, simpler, and less destructive.</strong> </p>

<p align="center"> <a href="./README.md">English</a> · <a href="./README.zh.md">简体中文</a> </p>

<p align="center"> <img alt="Version" src="https://img.shields.io/badge/version-1.1.2-2563eb"> <img alt="License" src="https://img.shields.io/badge/license-MIT-16a34a"> <img alt="Validation" src="https://img.shields.io/badge/validation-required-f59e0b"> </p>

> Not affiliated with or endorsed by Andrej Karpathy.

A small instruction pack for coding agents, inspired by public observations from Andrej Karpathy about LLM coding pitfalls.

Why This Exists

Most coding agents fail in the same predictable ways:

  • They make silent assumptions.
  • They overengineer straightforward tasks.
  • They modify unrelated code while fixing one issue.
  • They execute without clear, testable success criteria.

This repo gives you one coherent fix: a concise behavior contract plus tooling that keeps every distribution format in sync.

The 4 Principles

| Principle | Prevents | | --- | --- | | Think Before Coding | Silent assumptions, hidden confusion, missing tradeoffs | | Simplicity First | Premature abstraction, bloated implementations | | Surgical Changes | Drive-by edits, style drift, unrelated refactors | | Goal-Driven Execution | Vague implementation without verification |

Install

Option A: Claude Code Plugin (recommended)

Add marketplace:

/plugin marketplace add forrestchang/andrej-karpathy-skills

Install plugin:

/plugin install andrej-karpathy-skills@karpathy-skills

Option B: CLAUDE.md (per project)

New project:

curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md

Existing project (append):

echo "" >> CLAUDE.md
curl https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md >> CLAUDE.md

Cursor Support

This repository ships a committed Cursor project rule at .cursor/rules/karpathy-guidelines.mdc, so the guidelines apply automatically when opened in Cursor.

See CURSOR.md for setup and contributor workflow.

Canonical Source and Sync Model

To prevent drift across files, guideline content is centralized and generated:

Generated targets:

Supported Coding-Agent Targets

The canonical guideline body is stored in:

docs/guidelines.md

Generated targets:

Do not edit generated bodies directly. Edit docs/guidelines.md, then run:

python3 scripts/check.py

Using with VS Code Copilot

This repository includes Copilot custom instructions at:

.github/copilot-instructions.md

VS Code and GitHub Copilot use this file as repository-level guidance for chat and coding tasks. It is generated from docs/guidelines.md; do not edit it directly.

After changing the canonical guideline file, run:

python3 scripts/check.py

Optional reusable prompt files live in:

.github/prompts/repo-repair.prompt.md
.github/prompts/verify-change.prompt.md
.github/prompts/surgical-edit.prompt.md

Development

The canonical guideline body lives in:

docs/guidelines.md

After editing it, regenerate derived files:

python3 scripts/sync_guidelines.py

Check sync and validation:

PYTHONDONTWRITEBYTECODE=1 python3 scripts/sync_guidelines.py --check
PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate.py
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -p "test_*.py"
PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate.py

Or run the full sequence with one command:

python3 scripts/check.py

Build and verify a release archive end-to-end:

python3 scripts/package_release.py

This creates dist/SKILL-MD-main-fixed.zip, extracts it to a temporary directory, and reruns scripts/check.py against the extracted copy.

Release checklist

Before publishing a release ZIP:

PYTHONDONTWRITEBYTECODE=1 python3 scripts/check.py
PYTHONDONTWRITEBYTECODE=1 python3 scripts/package_release.py

Output: dist/SKILL-MD-main-fixed.zip

Source archive vs release archive

Do not commit generated release archives under dist/.

Use these commands by intent:

  • Release archive (generated + self-verified):
PYTHONDONTWRITEBYTECODE=1 python3 scripts/package_release.py
  • Source archive prep (clean generated artifacts first):
PYTHONDONTWRITEBYTECODE=1 python3 scripts/clean.py
  • Pre-commit validation:
PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate.py

PYTHONDONTWRITEBYTECODE=1 prevents Python from creating __pycache__ and .pyc files, which are intentionally rejected by repository validation.

This checks plugin JSON, Cursor frontmatter, required guideline sections, canonical body sync, and forbidden outdated wording/patterns.

The generated files are:

  • CLAUDE.md
  • .cursor/rules/karpathy-guidelines.mdc
  • .github/copilot-instructions.md
  • skills/karpathy-guidelines/SKILL.md

Optional lint tooling

This repo includes optional Trunk configuration under .trunk/. It is not required to use or contribute to the instruction package.

Required checks use only the Python scripts:

PYTHONDONTWRITEBYTECODE=1 python3 scripts/check.py

Trunk is separate local tooling for contributors who want additional linting. It is not wired into CI. Trunk execution is not verified in this environment.

What Good Looks Like

A healthy setup typically produces:

  • Smaller, more focused diffs.
  • Blocking clarifying questions only when required for correctness.
  • Explicit assumptions when they affect implementation.
  • Verification commands before completion claims.
  • Clear reports of changed files, verification results, and remaining failures.

For concrete before/after examples, see EXAMPLES.md.

Repository Layout

.
├── CLAUDE.md
├── CURSOR.md
├── EXAMPLES.md
├── README.md
├── README.zh.md
├── docs/
│   └── guidelines.md
├── scripts/
│   ├── check.py
│   ├── clean.py
│   ├── package_release.py
│   ├── sync_guidelines.py
│   └── validate.py
├── skills/
│   └── karpathy-guidelines/
│       └── SKILL.md
├── tests/
│   └── test_validate_and_sync.py
├── .claude-plugin/
│   ├── marketplace.json
│   └── plugin.json
├── .cursor/
│   └── rules/
│       └── karpathy-guidelines.mdc
├── .github/
│   ├── copilot-instructions.md
│   ├── prompts/
│   │   ├── repo-repair.prompt.md
│   │   ├── verify-change.prompt.md
│   │   └── surgical-edit.prompt.md
│   └── workflows/
│       └── validate.yml
└── .trunk/
    └── trunk.yaml

License

MIT — see LICENSE.

Related plugins

Browse all →