source-driven-development
Use when implementing framework-specific or library-specific code — verify non-trivial APIs against official documentation before writing them, and record the source in task notes, docs, or the PR.
Best use case
source-driven-development is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when implementing framework-specific or library-specific code — verify non-trivial APIs against official documentation before writing them, and record the source in task notes, docs, or the PR.
Teams using source-driven-development should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/source-driven-development/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How source-driven-development Compares
| Feature / Agent | source-driven-development | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when implementing framework-specific or library-specific code — verify non-trivial APIs against official documentation before writing them, and record the source in task notes, docs, or the PR.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Source-Driven Development AI agents can confidently generate outdated or deprecated framework code. Source-driven development replaces memory-based implementation with a repeatable loop: **detect the version, fetch the official source, implement from that source, then capture the reference in durable notes**. ## When to Use - Writing framework-specific code you have not touched recently - Using a library that changed versions since the last time you used it - Implementing middleware, routing, configuration, hooks, or SDK integration - Seeing deprecation warnings or suspecting API drift - Asking an AI agent to write code where stale training data could mislead it ## When NOT to Use | Instead of source-driven-development | Use | |-------------------------------------|-----| | Writing pure business logic with no framework dependency | `spec-driven-development` | | Reusing a stable internal utility with known behavior | implement directly | | Looking up tool setup for MCP servers | `mcp-ecosystem` | ## Prerequisites - You know which library, framework, or SDK is involved - You can determine the exact version used in the project - You have access to official docs, release notes, or migration guides ## Workflow ### 1. Detect the exact version Do not look up docs before you know what version the project actually uses. ```text Check package manifests, lockfiles, or module metadata first. Examples: - package.json / package-lock.json - pyproject.toml / requirements.txt - go.mod ``` ### 2. Fetch the official source Use this priority order: 1. Official documentation site 2. Official GitHub repository changelog or migration guide 3. Official release notes or blog posts 4. MDN for web platform APIs Avoid secondary tutorials as your primary authority. ### 3. Extract the exact pattern you need Write down the specific API shape before coding: - function or hook name - required arguments - return shape - error handling behavior - version-specific caveats ### 4. Implement to match the source Only write the framework code after you can point to the official pattern it follows. ```text Implementation rule: - use the documented API shape - follow the documented order of operations - avoid "this is probably how it works" guesses ``` ### 5. Capture the reference in durable project context For non-obvious decisions, record the source in one of: - task notes - ADR or design doc - PR description - surrounding documentation Prefer durable project context over scattering source URLs through product code. ## Examples ### Next.js middleware change ```text 1. Confirm the project uses Next.js 15 in package.json 2. Fetch the current official middleware docs 3. Verify the App Router middleware API shape 4. Implement the middleware 5. Note the docs URL and the version-specific behavior in the PR description ``` ### Using Context7 for live docs ```text use context7 How do I configure middleware in Next.js 15 App Router? ``` ## Common Rationalizations | Rationalization | Reality | |----------------|---------| | "I remember how this API works" | Framework APIs drift quietly between versions. | | "The AI probably knows the current syntax" | Model training data is not a guarantee of version accuracy. | | "A blog post is good enough" | Secondary tutorials often lag behind the official API. | | "I'll fix deprecations later" | Deprecations compound and make migrations harder. | ## Red Flags - Guessing parameter order or option names - Writing code before checking the installed version - Mixing patterns from multiple major versions - No durable note for a non-obvious framework decision ## Verification - [ ] The project version was checked before implementation - [ ] The implementation matches an official source - [ ] Non-obvious API choices were captured in docs, notes, or the PR - [ ] No deprecated or guessed API usage remains ## Tips - Use `Context7` or direct doc fetches when you need current, version-aware guidance - Pair this with `spec-driven-development` when an interface and a framework decision both matter - If a decision still feels fuzzy after reading docs, stop and isolate the unknown before coding ## See Also - [`spec-driven-development`](../spec-driven-development/SKILL.md) — define interfaces and boundaries first - [`context-engineering`](../context-engineering/SKILL.md) — provide the right source context to the agent - [`mcp-ecosystem`](../../copilot-exclusive/mcp-ecosystem/SKILL.md) — set up documentation-oriented MCP tools
Related Skills
doubt-driven-development
Use when a non-trivial decision should not stand without a fresh-context challenge - isolate the artifact and contract, run an adversarial review before committing, and reconcile the findings while change is still cheap.
spec-driven-development
Use before starting any non-trivial feature to write a technical spec first — prevents misaligned implementation and scope creep
verification-before-completion
Use before claiming any task is done — run the exact command that proves the fix works, read the output, and only then report success.
using-git-worktrees
Use when you need multiple branches checked out at once — create isolated working directories for parallel development without cloning the repository repeatedly
triage
Use when a single issue needs structured triage — classify it, reproduce if needed, request missing information, and leave a durable brief or close-out note in the tracker.
to-issues
Use when a plan, spec, or PRD must become an actionable backlog — break it into thin dependency-aware issues that each deliver a verifiable vertical slice
sprint-workflow
Use when starting a new feature, refactor, or multi-step dev task — runs the full sprint cycle (Think → Plan → Build → Review → Test → Ship → Monitor) using Copilot CLI's plan/autopilot modes.
sprint-retro
Use at the end of a sprint to run a data-driven retrospective — analyzes session history and git metrics to surface what shipped, what slowed you down, and concrete improvements.
security-audit
Use when a codebase needs a formal security audit beyond a quick scan — applies OWASP Top 10 and STRIDE threat modeling from a CSO perspective to surface systemic vulnerabilities.
release
Use when a sprint or feature is complete and ready to ship — tags the version, generates GitHub Release notes, runs rollout or smoke verification, and publishes to npm/PyPI/Docker registries.
prompt-optimizer
Use when a rough prompt, vague idea, or task description needs to become a finished copy-pasteable prompt for a chat-based LLM - rewrite it into one ready-to-send prompt with no blanks, no placeholders, and a clear output shape.
outside-voice
Use when you need an independent second opinion before, during, or after implementation — run challenge, consult, or review mode in a direct builder-to-builder voice