
受Karpathy启发的编码代理指南,适用于Claude Code、Codex、Cursor、Gemini、OpenCode、Aider、Copilot、OpenClaw以及任何兼容Agent Skills的代理 AGENTS.md。
概览
受卡帕提启发的编码代理指南,适用于Claude Code、Codex、Cursor、Gemini CLI、OpenCode、Aider、GitHub Copilot、OpenClaw、Warp、Windsurf、Cline以及更广泛的SwarmVault/SwarmClaw代理矩阵。 规范来源是skills/karpathy-guidelines/SKILL.md。代理专用文件通过适配器生成,确保仓库根节点可读,同时所有支持的工具都获得相同的行为指导。 这些指南涵盖了安德烈·卡帕西描述的四种常见的LLM编码失败模式: 内容故意简短。它旨在与项目特定的说明合并,而非替换它们。 通过npm安装,然后用npx运行安装程序: CLI会将npm包中的正确适配器复制到目标项目中。 先克隆一次,然后把正确的适配器复制到任何项目中。安装程序读取安装/targets.json,从适配器//...复制,然后写入代理预期的真实路径。
概述(AI 翻译)
受卡帕提启发的编码代理指南,适用于Claude Code、Codex、Cursor、Gemini CLI、OpenCode、Aider、GitHub Copilot、OpenClaw、Warp、Windsurf、Cline以及更广泛的SwarmVault/SwarmClaw代理矩阵。
规范源代码为 skills/karpathy-guidelines/SKILL.md。代理专用文件在 adapters/ 下生成,因此仓库根节点保持可读,同时所有支持的工具都能获得相同的行为指导。
英文 |简体中文
这带来了什么
这些指南涵盖了安德烈·卡帕西描述的四种常见的LLM编码失败模式:
| 原理 | 防止 |
|---|---|
| 编程前三思 | 沉默的假设,隐藏的困惑,遗漏的权衡 |
| 简洁优先 | 过度设计、臃肿的抽象、推测性特征 |
| 外科手术 | 路过重写、无关清理、意外行为改变 |
| 目标驱动执行 | 模糊的完成标准和未经验证的更改 |
内容故意简短。它旨在与项目特定的说明合并,而非替换它们。
快速安装
通过 npm 安装,然后用 npx 运行安装程序:
或者全局安装CLI:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Karpathy-Inspired Agent Skills
Karpathy-inspired coding-agent guidelines packaged for Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Aider, GitHub Copilot, OpenClaw, Warp, Windsurf, Cline, and the wider SwarmVault/SwarmClaw agent matrix.
The canonical source is skills/karpathy-guidelines/SKILL.md. Agent-specific files are generated under adapters/ so the repository root stays readable while every supported tool receives the same behavioral guidance.
English | Simplified Chinese
What This Adds
These guidelines address four common LLM coding failure modes described by Andrej Karpathy:
| Principle | Prevents |
|---|---|
| Think Before Coding | Silent assumptions, hidden confusion, missing tradeoffs |
| Simplicity First | Over-engineering, bloated abstractions, speculative features |
| Surgical Changes | Drive-by rewrites, unrelated cleanup, accidental behavior changes |
| Goal-Driven Execution | Vague completion criteria and unverified changes |
The content is intentionally short. It is meant to merge with project-specific instructions, not replace them.
Quick Install
Install through npm and run the installer with npx:
npx @swarmclawai/andrej-karpathy-skills --list
npx @swarmclawai/andrej-karpathy-skills --agent codex --dest /path/to/project
Or install the CLI globally:
npm install -g @swarmclawai/andrej-karpathy-skills
andrej-karpathy-skills --agent cursor --dest /path/to/project
The CLI copies the right adapter from the npm package into the destination project.
Clone Install
Clone once, then copy the right adapter into any project. The installer reads install/targets.json, copies from adapters//..., and writes to the real path your agent expects.
git clone https://github.com/swarmclawai/andrej-karpathy-skills.git
cd andrej-karpathy-skills
node scripts/install.mjs --list
node scripts/install.mjs --agent codex --dest /path/to/project
Use --force if you intentionally want to overwrite an existing instruction file:
node scripts/install.mjs --agent claude --dest /path/to/project --force
node scripts/install.mjs --agent openclaw --dest /path/to/project --force
Use --global for agents with supported user-level skill locations:
node scripts/install.mjs --agent claude --global --force
node scripts/install.mjs --agent hermes --global --force
Adapter Layout
If you only need one file, copy the adapter source to the install target shown below:
| Agent | Adapter source | Installs to |
| — | — |
| Codex | adapters/codex/AGENTS.md | AGENTS.md |
| Claude Code | adapters/claude/CLAUDE.md | CLAUDE.md |
| Cursor | adapters/cursor/.cursor/rules/karpathy-guidelines.mdc | .cursor/rules/karpathy-guidelines.mdc |
| Gemini CLI | adapters/gemini/GEMINI.md | GEMINI.md |
| Aider | adapters/aider/CONVENTIONS.md | CONVENTIONS.md |
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add swarmclawai/andrej-karpathy-skills