source-driven-development
公式ドキュメントに基づき実装判断を行い、古いパターンを排除した正確なコードを生成することで、信頼性が重要なフレームワークやライブラリ利用時に役立つ開発を支援するSkill。
📜 元の英語説明(参考)
Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters.
🇯🇵 日本人クリエイター向け解説
公式ドキュメントに基づき実装判断を行い、古いパターンを排除した正確なコードを生成することで、信頼性が重要なフレームワークやライブラリ利用時に役立つ開発を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o source-driven-development.zip https://jpskill.com/download/9590.zip && unzip -o source-driven-development.zip && rm source-driven-development.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9590.zip -OutFile "$d\source-driven-development.zip"; Expand-Archive "$d\source-driven-development.zip" -DestinationPath $d -Force; ri "$d\source-driven-development.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
source-driven-development.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
source-driven-developmentフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
ソース駆動開発
概要
フレームワーク固有のコードに関する決定はすべて、公式ドキュメントに裏付けられている必要があります。記憶に基づいて実装するのではなく、検証し、引用し、ユーザーにソースを確認させましょう。トレーニングデータは古くなり、APIは廃止され、ベストプラクティスは進化します。このスキルは、すべてのパターンがユーザーが確認できる信頼できる情報源に遡るため、ユーザーが信頼できるコードを入手できるようにします。
使用する場面
- ユーザーが特定のフレームワークの現在のベストプラクティスに従ったコードを求めている場合
- ボイラープレート、スターターコード、またはプロジェクト全体でコピーされるパターンを構築する場合
- ユーザーが明示的にドキュメント化され、検証された、または「正しい」実装を求めている場合
- フレームワークの推奨アプローチが重要な機能(フォーム、ルーティング、データフェッチ、状態管理、認証)を実装する場合
- フレームワーク固有のパターンを使用するコードをレビューまたは改善する場合
- フレームワーク固有のコードを記憶に基づいて記述しようとしている場合
使用しない場面:
- 正確さが特定のバージョンに依存しない場合(変数の名前変更、タイプミス修正、ファイルの移動)
- すべてのバージョンで同じように動作する純粋なロジック(ループ、条件分岐、データ構造)
- ユーザーが検証よりも速度を明示的に求めている場合(「とにかく早くやって」)
プロセス
検出 ──→ フェッチ ──→ 実装 ──→ 引用
│ │ │ │
▼ ▼ ▼ ▼
スタックは? 関連ドキュメントを ドキュメント化された ソースを提示
取得する パターンに従う
ステップ1:スタックとバージョンを検出する
プロジェクトの依存関係ファイルを読み取り、正確なバージョンを特定します。
package.json → Node/React/Vue/Angular/Svelte
composer.json → PHP/Symfony/Laravel
requirements.txt / pyproject.toml → Python/Django/Flask
go.mod → Go
Cargo.toml → Rust
Gemfile → Ruby/Rails
発見した内容を明示的に記述します。
スタック検出結果:
- React 19.1.0 (package.jsonより)
- Vite 6.2.0
- Tailwind CSS 4.0.3
→ 関連するパターンの公式ドキュメントをフェッチします。
バージョンが見つからない場合、または曖昧な場合は、ユーザーに質問してください。推測しないでください。バージョンによって、どのパターンが正しいかが決まります。
ステップ2:公式ドキュメントをフェッチする
実装している機能の特定のドキュメントページをフェッチします。ホームページではなく、完全なドキュメントではなく、関連するページです。
ソースの階層(権威の順):
| 優先度 | ソース | 例 |
|---|---|---|
| 1 | 公式ドキュメント | react.dev, docs.djangoproject.com, symfony.com/doc |
| 2 | 公式ブログ/変更履歴 | react.dev/blog, nextjs.org/blog |
| 3 | Web標準リファレンス | MDN, web.dev, html.spec.whatwg.org |
| 4 | ブラウザ/ランタイムの互換性 | caniuse.com, node.green |
権威がないもの - 一次ソースとして引用しないでください:
- Stack Overflow の回答
- ブログ記事またはチュートリアル(人気のあるものでも)
- AIが生成したドキュメントまたは要約
- 独自のトレーニングデータ(それがまさにポイントです - 検証してください)
フェッチするものに正確さを期してください:
悪い例: Reactのホームページをフェッチする
良い例: react.dev/reference/react/useActionStateをフェッチする
悪い例: 「django authentication best practices」を検索する
良い例: docs.djangoproject.com/en/6.0/topics/auth/をフェッチする
フェッチ後、主要なパターンを抽出し、非推奨の警告または移行ガイダンスをメモします。
公式ソースが互いに矛盾する場合(たとえば、移行ガイドがAPIリファレンスと矛盾する場合)、その矛盾をユーザーに提示し、検出されたバージョンに対して実際にどのパターンが機能するかを確認します。
ステップ3:ドキュメント化されたパターンに従って実装する
ドキュメントに示されている内容と一致するコードを記述します。
- 記憶ではなく、ドキュメントからのAPIシグネチャを使用します
- ドキュメントに何かを行う新しい方法が示されている場合は、新しい方法を使用します
- ドキュメントがパターンを非推奨にしている場合は、非推奨バージョンを使用しないでください
- ドキュメントが何かをカバーしていない場合は、未検証としてフラグを立てます
ドキュメントが既存のプロジェクトコードと矛盾する場合:
矛盾を検出しました:
既存のコードベースはフォームのローディング状態にuseStateを使用していますが、
React 19のドキュメントでは、このパターンにuseActionStateを推奨しています。
(出典: react.dev/reference/react/useActionState)
選択肢:
A) 最新のパターン (useActionState) を使用する — 現在のドキュメントと一貫性がある
B) 既存のコード (useState) と一致させる — コードベースと一貫性がある
→ どちらのアプローチを希望しますか?
矛盾を表面化させます。黙ってどちらかを選択しないでください。
ステップ4:ソースを引用する
フレームワーク固有のパターンにはすべて引用が必要です。ユーザーはすべての決定を検証できる必要があります。
コードコメント内:
// React 19 の useActionState を使用したフォーム処理
// 出典: https://react.dev/reference/react/useActionState#usage
const [state, formAction, isPending] = useActionState(submitOrder, initialState);
会話内:
フォーム送信状態に、手動の useState の代わりに useActionState を使用しています。
React 19 では、手動の isPending/setIsPending パターンがこのフックに置き換えられました。
出典: https://react.dev/blog/2024/12/05/react-19#actions
"useTransition が非同期関数をサポートするようになり [...] 保留状態を自動的に処理します"
引用ルール:
- 短縮されていない完全なURL
- 可能な場合は、アンカー付きのディープリンクを優先します(例:
/useActionStateよりも/useActionState#usage)— アンカーはトップレベルのページよりもドキュメントの再構築に耐えます - 自明ではない決定をサポートする場合は、関連する箇所を引用します
- プラットフォーム機能を推奨する場合は、ブラウザ/ランタイムのサポートデータを含めます
- パターンのドキュメントが見つからない場合は、明示的にその旨を伝えます。
未検証:このパターンの公式ドキュメントが見つかりませんでした。
これはトレーニングデータに基づいており、古くなっている可能性があります。
本番環境で使用する前に検証してください。
検証できなかったことについて正直に伝えることは、誤った自信よりも価値があります。
よくある合理化
| 合理化 | 現実 |
|---|---|
| 「このAPIについては自信があります」 | 自信は証拠ではありません。トレーニングデータには、正しく見えるものの、現在のバージョンでは壊れる古いパターンが含まれています。検証してください。 |
| 「ドキュメントをフェッチするとトークンが無駄になる」 | APIを幻覚する方がもっと無駄になります。ユーザー |
(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Source-Driven Development
Overview
Every framework-specific code decision must be backed by official documentation. Don't implement from memory — verify, cite, and let the user see your sources. Training data goes stale, APIs get deprecated, best practices evolve. This skill ensures the user gets code they can trust because every pattern traces back to an authoritative source they can check.
When to Use
- The user wants code that follows current best practices for a given framework
- Building boilerplate, starter code, or patterns that will be copied across a project
- The user explicitly asks for documented, verified, or "correct" implementation
- Implementing features where the framework's recommended approach matters (forms, routing, data fetching, state management, auth)
- Reviewing or improving code that uses framework-specific patterns
- Any time you are about to write framework-specific code from memory
When NOT to use:
- Correctness does not depend on a specific version (renaming variables, fixing typos, moving files)
- Pure logic that works the same across all versions (loops, conditionals, data structures)
- The user explicitly wants speed over verification ("just do it quickly")
The Process
DETECT ──→ FETCH ──→ IMPLEMENT ──→ CITE
│ │ │ │
▼ ▼ ▼ ▼
What Get the Follow the Show your
stack? relevant documented sources
docs patterns
Step 1: Detect Stack and Versions
Read the project's dependency file to identify exact versions:
package.json → Node/React/Vue/Angular/Svelte
composer.json → PHP/Symfony/Laravel
requirements.txt / pyproject.toml → Python/Django/Flask
go.mod → Go
Cargo.toml → Rust
Gemfile → Ruby/Rails
State what you found explicitly:
STACK DETECTED:
- React 19.1.0 (from package.json)
- Vite 6.2.0
- Tailwind CSS 4.0.3
→ Fetching official docs for the relevant patterns.
If versions are missing or ambiguous, ask the user. Don't guess — the version determines which patterns are correct.
Step 2: Fetch Official Documentation
Fetch the specific documentation page for the feature you're implementing. Not the homepage, not the full docs — the relevant page.
Source hierarchy (in order of authority):
| Priority | Source | Example |
|---|---|---|
| 1 | Official documentation | react.dev, docs.djangoproject.com, symfony.com/doc |
| 2 | Official blog / changelog | react.dev/blog, nextjs.org/blog |
| 3 | Web standards references | MDN, web.dev, html.spec.whatwg.org |
| 4 | Browser/runtime compatibility | caniuse.com, node.green |
Not authoritative — never cite as primary sources:
- Stack Overflow answers
- Blog posts or tutorials (even popular ones)
- AI-generated documentation or summaries
- Your own training data (that is the whole point — verify it)
Be precise with what you fetch:
BAD: Fetch the React homepage
GOOD: Fetch react.dev/reference/react/useActionState
BAD: Search "django authentication best practices"
GOOD: Fetch docs.djangoproject.com/en/6.0/topics/auth/
After fetching, extract the key patterns and note any deprecation warnings or migration guidance.
When official sources conflict with each other (e.g. a migration guide contradicts the API reference), surface the discrepancy to the user and verify which pattern actually works against the detected version.
Step 3: Implement Following Documented Patterns
Write code that matches what the documentation shows:
- Use the API signatures from the docs, not from memory
- If the docs show a new way to do something, use the new way
- If the docs deprecate a pattern, don't use the deprecated version
- If the docs don't cover something, flag it as unverified
When docs conflict with existing project code:
CONFLICT DETECTED:
The existing codebase uses useState for form loading state,
but React 19 docs recommend useActionState for this pattern.
(Source: react.dev/reference/react/useActionState)
Options:
A) Use the modern pattern (useActionState) — consistent with current docs
B) Match existing code (useState) — consistent with codebase
→ Which approach do you prefer?
Surface the conflict. Don't silently pick one.
Step 4: Cite Your Sources
Every framework-specific pattern gets a citation. The user must be able to verify every decision.
In code comments:
// React 19 form handling with useActionState
// Source: https://react.dev/reference/react/useActionState#usage
const [state, formAction, isPending] = useActionState(submitOrder, initialState);
In conversation:
I'm using useActionState instead of manual useState for the
form submission state. React 19 replaced the manual
isPending/setIsPending pattern with this hook.
Source: https://react.dev/blog/2024/12/05/react-19#actions
"useTransition now supports async functions [...] to handle
pending states automatically"
Citation rules:
- Full URLs, not shortened
- Prefer deep links with anchors where possible (e.g.
/useActionState#usageover/useActionState) — anchors survive doc restructuring better than top-level pages - Quote the relevant passage when it supports a non-obvious decision
- Include browser/runtime support data when recommending platform features
- If you cannot find documentation for a pattern, say so explicitly:
UNVERIFIED: I could not find official documentation for this
pattern. This is based on training data and may be outdated.
Verify before using in production.
Honesty about what you couldn't verify is more valuable than false confidence.
Common Rationalizations
| Rationalization | Reality |
|---|---|
| "I'm confident about this API" | Confidence is not evidence. Training data contains outdated patterns that look correct but break against current versions. Verify. |
| "Fetching docs wastes tokens" | Hallucinating an API wastes more. The user debugs for an hour, then discovers the function signature changed. One fetch prevents hours of rework. |
| "The docs won't have what I need" | If the docs don't cover it, that's valuable information — the pattern may not be officially recommended. |
| "I'll just mention it might be outdated" | A disclaimer doesn't help. Either verify and cite, or clearly flag it as unverified. Hedging is the worst option. |
| "This is a simple task, no need to check" | Simple tasks with wrong patterns become templates. The user copies your deprecated form handler into ten components before discovering the modern approach exists. |
Red Flags
- Writing framework-specific code without checking the docs for that version
- Using "I believe" or "I think" about an API instead of citing the source
- Implementing a pattern without knowing which version it applies to
- Citing Stack Overflow or blog posts instead of official documentation
- Using deprecated APIs because they appear in training data
- Not reading
package.json/ dependency files before implementing - Delivering code without source citations for framework-specific decisions
- Fetching an entire docs site when only one page is relevant
Verification
After implementing with source-driven development:
- [ ] Framework and library versions were identified from the dependency file
- [ ] Official documentation was fetched for framework-specific patterns
- [ ] All sources are official documentation, not blog posts or training data
- [ ] Code follows the patterns shown in the current version's documentation
- [ ] Non-trivial decisions include source citations with full URLs
- [ ] No deprecated APIs are used (checked against migration guides)
- [ ] Conflicts between docs and existing code were surfaced to the user
- [ ] Anything that could not be verified is explicitly flagged as unverified