Andrej Karpathy Skills¶
Andrej Karpathy Skills is a lightweight instruction layer designed to improve the reliability of [[AI Coding Agents]] by enforcing a disciplined engineering workflow^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md].
Developed by Forest Chang and inspired by Andrej Karpathy's observations of common failure modes in AI-assisted coding, the framework aims to make agents behave more like cautious engineers rather than overconfident writers^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]. Its core philosophy is that better workflows are more valuable than raw model intelligence; effectively, the system installs discipline, not features^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].
Core Principles¶
The framework is built upon four behavioral rules that guide how an agent should approach tasks^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md]:
1. Think Before Coding¶
The agent should not blindly guess user intent. When faced with ambiguous requirements, it should: * Expose ambiguities and ask clarifying questions^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]. * Present potential trade-offs rather than immediately starting implementation^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].
2. Simplicity First¶
The agent should prioritize minimalism and avoid over-engineering^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]: * Write only the minimum amount of code required to solve the problem^[001-TODO__Andrej_Karpathy_Skills-AI_Coding_Agent_行为框架.md]. * Avoid speculative abstractions (e.g., do not build a complete framework for a single function)^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].
3. Surgical Changes¶
Modifications should be precise and scoped strictly to the task^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]: * Only touch code relevant to the specific task^[001-TODO__Andrej_Karpathy_Skills-AI_Coding_Agent_行为框架.md]. * Do not refactor adjacent functions, clean up unrelated code, or rewrite comments outside the scope of work^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].
4. Goal-Driven Execution¶
The focus must be on verifiable outcomes^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]: * Convert fuzzy requirements into verifiable results^[001-TODO__Andrej_Karpathy_Skills-AI_Coding_Agent_行为框架.md]. * Follow a strict workflow: Reproduce Problem → Fix → Verify → Stop^[001-TODO__Andrej_Karpathy_Skills-AI_Coding_Agent_行为框架.md]. * Define clear success criteria rather than stopping with a vague "it's fixed" assertion^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].
Usage and Installation¶
While these principles can be applied manually as a prompt engineering strategy, they are typically implemented as an automated layer within AI coding tools^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md].
Installation Methods¶
- Plugin: It can be installed as a plugin for compatible IDEs (e.g., via
claude plugin marketplace)^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md]. - Project Configuration: It can be integrated by adding the repository's
CLAUDE.mdfile to the project root directory^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md].
Impact on Workflow¶
When installed, the agent's default behavior shifts from immediate, broad implementation to a scoped, verification-based process^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]. * Before: An agent might immediately generate full stacks (UI, API, DB) and create massive diffs^[001-TODO__Andrej_Karpathy_Skills-AI_Coding_Agent_行为框架.md]. * After: The agent asks clarifying questions about scope, defines a Minimal Viable Version, and produces small, focused diffs^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].
Success Metrics¶
The effectiveness of the framework is indicated by changes in agent behavior^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]: * Asking better clarification questions^[001-TODO__Andrej_Karpathy_Skills-AI_Coding_Agent_行为框架.md]. * Generating smaller, more focused diffs^[001-TODO__Andrej_Karpathy_Skills-AI_Coding_Agent_行为框架.md]. * Ceasing the random refactoring of unrelated files^[001-TODO__Andrej_Karpathy_Skills-AI_Coding_Agent_行为框架.md]. * Adopting a verification mindset (proving the fix works) over an implementation mindset^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].
Related Concepts¶
- [[AI Coding Agents]]
- 20/80 Learning Principle
- [[開發者工具與框架]]
Sources¶
001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md