Skill detail
karpathy-education-first
Applies an education-first mindset to make projects teachable, with nano-project explanations and documentation written for beginners.
Inspect before use
Read the source instructions and check the requirements before you install this skill.
SKILL.md
The saved excerpt is a snapshot from when this skill was listed. The external source remains the complete and most current version.
--- name: karpathy-education-first description: 'Apply the education-first mindset — make everything you build teachable, create nano-project explanations, write for beginners. Use this skill when the user wants to explain a project to beginners, create a tutorial from code, write documentation that teaches (not just documents), make a concept accessible, or says "make this teachable", "explain like im a beginner", "nano project version", "teaching version", "explain from scratch", "blog post about this". Based on Karpathy 243-line GPT and Eureka Labs posts.' disable-model-invocation: false user-invocable: true related_skills: - karpathy-output-evolution - karpathy-practice-environments - karpathy-llm-wiki - karpathy-autoresearch --- # Skill 12: Education-First Mindset(教育至上) > Source: https://x.com/karpathy/status/2021694437152157847 | https://x.com/karpathy/status/2056753169888334312 > 243-line pure Python GPT | "education热情不变" even at Anthropic ## Core Principle **If you can't teach it, you don't own it. Make everything a nano-project.** Karpathy's signature move: take a complex system and reimplement it from scratch in minimal, readable code with maximal explanation. Not for production. For understanding. The 243-line GPT wasn't the fastest implementation. It was the most comprehensible implementation. That's the goal. ## The Teaching Version Prompt After completing any project, generate its teaching version: ``` I just built [PROJECT/CONCEPT]. Now create a teaching version of it. [PASTE CODE OR DESCRIBE PROJECT] Teaching version requirements: 1. Target audience: curious beginner who knows [PREREQUISITE LEVEL] 2. Start with: "Here's what we're building and why it matters" (2 paragraphs) 3. Walk through the code line-by-line in the most important sections 4. For every non-obvious decision: add a comment explaining WHY, not just WHAT 5. Add a "Try this yourself" section at the end with 3 small exercises 6. Maximum complexity rule: if a beginner would say "wait, what?" — add an explanation Output: the teaching version as a complete annotated script or tutorial. ``` ## The Nano-Project Pattern Karpathy's approach to making anything understandable: ``` Create a nano-project that demonstrates [COMPLEX CONCEPT]. Rules: - Under 200 lines of code (pure Python / stdlib preferred) - Zero external dependencies - Every line earns its place - Annotated: inline comments explain the key insight of each section - Complete: runs from scratch, shows meaningful output - Pedagogical: the code's structure mirrors the concept's structure The concept to demonstrate: [CONCEPT] What should the reader understand after running this? [LEARNING GOAL] Also provide: - 3-sentence explanation at the top of the file - What to try next (3 suggestions for extending it) ``` ## The "Explain Like Karpathy" Prompt For explaining any technical concept: ``` Explain [CONCEPT] the way Karpathy would explain it — clear, direct, minimal jargon, example-first. Format: 1. The one-sentence intuition (what it IS, not what it does) 2. The simplest possible concrete example (with actual numbers or code) 3. Why it matters (1-2 sentences, no hype) 4. The common misconception most people have about it 5. If you want to go deeper: [3 resources, ordered by accessibility] Audience: [DESCRIBE YOUR READER] ``` ## Documentation That Teaches Transform technical documentation from reference to tutorial: ``` Rewrite this documentation to be educational, not just informational. Current docs: [PASTE DOCUMENTATION] Rewrite rules: 1. Lead with a concrete example, not with definitions 2. Explain each parameter with: what it does + why you'd change it + what the default is and why 3. Add a "Common patterns" section showing 3 real use cases 4. Add a "Common mistakes" section showing 3 errors people make and how to fix them 5. Keep all technical accuracy; only improve pedagogical structure 6. Add: "After reading this, you should be able to [LEARNING GOAL]" atRead the full source on GitHub (opens external page)