karpathy-vibe-to-agentic について
karpathy-vibe-to-agentic は、エージェントを活用した段階的な作業で、素早く作ったプロトタイプをより信頼性と保守性の高いソフトウェアへ移行するスキルです。前提や障害要因を確認し、テスト可能な成功基準を定め、人によるレビューを維持します。
主な機能
- 01プロトタイプ監査のプロンプト
- 02テスト可能な成功基準
- 03段階的な改善ループ
- 04Vibeコーディングのアンチパターン確認
- 05人がレビューするエージェントのワークフロー
活用シーン
- 01本番向け開発の前にプロトタイプを評価する
- 02暗黙の目標をテスト可能な基準に置き換える
- 03レビューを挟みながらスクリプトを段階的に改善する
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ learnprompt/ andrej-karpathy-skills --skill karpathy-vibe-to-agenticインストール後、Claude Code で/karpathy-vibe-to-agenticを入力して読み込まれたか確認します。
詳細
スキル 5:Vibe Coding → Agentic Leap(Vibe Coding → エージェント型への飛躍)
出典:https://x.com/karpathy/status/2004607146781278521 | https://x.com/karpathy/status/2026731645169185220 「プログラマーとして、これほど遅れを感じたことはありません」— 56k いいね
核となる原則
Vibe Coding は最低ラインを引き上げます。エージェント型エンジニアリングは上限を引き上げます。
この2つは同じものではなく、両方が必要です。
| Vibe Coding | エージェント型エンジニアリング | |
|---|---|---|
| 目標 | 高速なプロトタイプ、アイデアの探索 | 信頼性が高く、保守しやすく、検証可能 |
| 方法 | 自然言語 → 実行 | タスク仕様 + 成功基準 + 反復 |
| タイミング | 最初の20%(探索) | 残りの80%(実行) |
| リスク | 自分が作ったものを理解していない | エージェントが自分の望むことを理解していない |
| Karpathy の言葉 | 「最低ラインを引き上げる」 | 「上限を引き上げる」 |
移行プロトコル
Vibe Coding で作ったプロトタイプをレベルアップさせる必要がある場合:
ステップ 1:作ったものを監査する
I vibe-coded this [project/script/app]. I need to understand what I actually have before leveling it up.
[PASTE CODE OR DESCRIBE IT]
Please:
1. Describe exactly what this does in plain English (3-5 sentences)
2. List every assumption baked in (hardcoded values, expected input format, etc.)
3. Identify the 3 most likely failure modes
4. List what's missing for this to be production-ready
5. What would break if I ran this on a different machine / with different data?
Be blunt. I'm about to invest more time in this and need to know if it's worth it.
ステップ 2:成功基準を定義する
Based on this audit of my prototype:
[AUDIT OUTPUT FROM STEP 1]
Help me define clear, verifiable success criteria for the "production-ready" version.
Format each criterion as a testable assertion:
- GIVEN [input/condition]
- WHEN [action]
- THEN [expected output/behavior]
List 5-7 criteria. Start with the most important.
ステップ 3:エージェント型クリーンアップの反復
You are a senior engineer reviewing this prototype. Your job is to systematically improve it.
Prototype: [CODE]
Success criteria: [FROM STEP 2]
Work incrementally:
1. First fix: address the most critical issue only (one diff)
2. After I approve each fix, suggest the next
3. Never refactor unrelated code
4. For each fix, explain: WHAT changed, WHY this matters, RISK of this change
Start with fix #1.
クリーンアップが必要な Vibe Coding のよくある兆候
Review this vibe-coded project for these specific anti-patterns:
[PASTE CODE]
Check for:
1. Hardcoded credentials, paths, or magic numbers → suggest config/env vars
2. No error handling on file I/O or network calls → add try/except with clear messages
3. print() debugging left in → identify and offer to remove
4. Functions doing 3+ things → suggest split points
5. No way to run without human supervision → suggest automation hooks
6. Dependencies that aren't in requirements.txt / package.json
For each issue found: show the exact line and suggest the minimal fix.
2トラックシステム
Karpathy はこれらを並行して進めています。
TRACK A (IDE / Human) TRACK B (Agent)
───────────────────── ───────────────
- Review diffs - Implement incrementally
- Apply taste/judgment - Run tests automatically
- Verify understanding - Suggest next steps
- Commit good work - Generate options
- Ask "is this right?" - Never commit autonomously
センスに関する判断には、常に人間を関与させてください。エージェントは実行のためのものであり、何を作る価値があるかを決めるためのものではありません。
アップグレード用の簡易プロンプト
シンプルな Vibe Coding スクリプトを手早く一度でアップグレードする場合:
Upgrade this vibe-coded script to production quality.
[PASTE SCRIPT]
Requirements:
1. Add proper error handling (no unhandled exceptions)
2. Make all hardcoded values configurable via CLI args or env vars
3. Add a --dry-run flag that shows what would happen without doing it
4. Add basic logging (not print) with timestamps
5. Keep the core logic identical — only add robustness
6. Maximum 20% increase in line count
Output the complete upgraded script.
ワークフロー
ワークフローに属します:アイデアからリリースまで(開発者)
| 位置 | 上流 | 下流 |
|---|---|---|
| 第5段階(仕上げ) | karpathy-supply-chain-hygiene(セキュリティレビュー後) | デプロイ/納品 |
全体の流れ:idea-files → agentic-engineering → minimalism → supply-chain-hygiene → vibe-to-agentic
プロンプトの契約
I have a vibe-coded prototype: <PASTE_CODE_OR_DESCRIBE>. Step 1: Audit — describe what it does, list hidden assumptions, identify failure modes, list what's missing for production. Step 2: Define 5-7 verifiable success criteria in GIVEN/WHEN/THEN format. Step 3: Start the agentic cleanup loop — one incremental fix at a time, explain WHAT/WHY/RISK for each.
検証チェックリスト
- プロトタイプに含まれる暗黙の前提をすべて列挙した
- 成功基準をテスト可能な GIVEN/WHEN/THEN 形式で定義した
- 各修正の反復で変更する問題は1つだけ
- 中核となるロジックが損なわれていない(機能は変わらない)
- エラー処理とログを追加した
- ハードコードされた値を設定項目に置き換えた
コメント
Markdown 対応