karpathy-education-first について
karpathy-education-firstは、技術プロジェクトや概念を初心者向けの教材に変えるスキルです。小さく読みやすい実装や実例を使い、コードが動く理由も説明します。
主な機能
- 01プロジェクトの教材版を作成
- 02実行可能な小規模サンプルを作成
- 03具体例を使った概念の解説
- 04リファレンス文書をチュートリアルに変換
- 05コードの学びやすさをレビュー
活用シーン
- 01最小限のプロジェクトで複雑な概念を教える
- 02完成した成果を初心者向け文書にする
- 03技術文書を学びやすく整える
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ learnprompt/ andrej-karpathy-skills --skill karpathy-education-firstインストール後、Claude Code で/karpathy-education-firstを入力して読み込まれたか確認します。
詳細
スキル 12:教育を最優先する姿勢
出典:https://x.com/karpathy/status/2021694437152157847 | https://x.com/karpathy/status/2056753169888334312 純粋な Python による 243 行の GPT | Anthropic にいても「教育への情熱は変わらない」
核心原則
教えられないなら、本当に理解しているとは言えません。すべてをナノプロジェクトにしましょう。
Karpathy の得意技は、複雑なシステムを最小限で読みやすいコードから一から再実装し、最大限に詳しく説明することです。製品化のためではなく、理解するためです。
243 行の GPT は、最速の実装ではありませんでした。最も理解しやすい実装でした。それが目標です。
教育用バージョンのプロンプト
プロジェクトを完了したら、教育用バージョンを作成します。
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.
ナノプロジェクトのパターン
物事を理解しやすくする Karpathy のアプローチです。
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)
「Karpathy のように説明する」プロンプト
技術的な概念を説明するためのプロンプトです。
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]
教えるためのドキュメント
技術ドキュメントをリファレンスからチュートリアルに変えます。
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]" at the top
ブログ記事ジェネレーター
プロジェクトを共有できる教育コンテンツに変えるためのプロンプトです。
Write a technical blog post about [PROJECT/INSIGHT].
Style: Karpathy-style — direct, precise, example-driven, opinionated.
Structure:
1. Hook: why does this matter RIGHT NOW? (1-2 punchy sentences)
2. The core insight: one thing that changes how you think about [topic]
3. Show, don't tell: working code example that demonstrates the insight
4. What I tried that didn't work (builds credibility + saves readers time)
5. What I learned: 3-5 concrete takeaways, actionable
6. What's next: 2-3 things worth exploring
Tone:
- First person, direct
- Specific (exact line counts, benchmark numbers, actual errors)
- Skeptical of hype, enthusiastic about substance
- Never say "in conclusion" or "in summary" — just end when you're done
Audience: [WHO WILL READ THIS]
Length: [~1000 words for blog / ~500 for Twitter thread / ~300 for Gist]
複雑な研究をわかりやすくする
論文や研究を、教えやすいコンテンツにまとめます。
Distill this [paper/research/concept] into a teachable explainer.
Source: [PASTE ABSTRACT OR KEY SECTIONS]
Output:
1. ELI5 version: explain to a smart non-expert in 3 sentences
2. Key insight: what's the one thing this paper figured out?
3. The method in plain language: how did they do it? (no equations, just logic)
4. Why it matters: what does this enable that wasn't possible before?
5. The catch: what are the limitations or assumptions?
6. Nano-project idea: how could someone understand this by building a tiny version?
教育を重視したコードレビューのチェックリスト
教育を最優先する視点でコードをレビューするときに使います。
Is this code teachable?
- [ ] Can a motivated beginner understand what it does in 5 minutes?
- [ ] Does each function have a comment explaining WHY, not just what?
- [ ] Are variable names descriptive enough to read like documentation?
- [ ] Is there a README that explains how to run it from scratch?
- [ ] Does it have at least one worked example in the comments?
- [ ] Are the non-obvious parts explained?
If any box is unchecked: the code isn't done yet.
ワークフロー
該当するワークフロー:研究から公開まで(最終段階)+月次チェックアップ(最終段階)
| 位置 | 上流 | 下流 |
|---|---|---|
| Bの第4ステップ | karpathy-output-evolution(仕上げ後) | 公開/共有 |
| Dの第4ステップ | karpathy-practice-environments(練習後) | チュートリアルの作成 |
研究から公開までの流れ:autoresearch → llm-wiki → output-evolution → education-first 月次チェックアップの流れ:meta-reflection → understanding-first → practice-environments → education-first
プロンプトの契約
Convert <PROJECT_OR_CONCEPT> into a teaching version for beginners. Produce: 1) Core concept in one sentence, 2) Minimal runnable example (< 300 lines, no hidden deps), 3) Step-by-step walkthrough (explain WHY not just WHAT), 4) 3-5 progressive exercises (easy→hard), 5) Common misconceptions and how to check if you fell into them.
検証チェックリスト
- 核心となる概念を一文で説明できる
- 最小限の実行可能な例が実際に動く(300 行未満、隠れた依存関係なし)
- ウォークスルーで WHAT だけでなく WHY も説明されている
- 練習問題の難易度が段階的に上がっている
- よくある誤解を自分で確認する方法がある
- 初心者が最初のステップを 5 分以内に理解できる