Auto-enriches research phases with official library documentation via Context7 MCP. Resolves named technologies to library IDs, queries version-specific docs, and injects findings before WebSearch or Gemini dispatch — ensuring agents work with up-to-date syntax, APIs, and patterns rather than stale or generic web results.
From fwnpx claudepluginhub gmedali/flywheel-plugin --plugin fwThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Provides patterns for shared UI in Compose Multiplatform across Android, iOS, Desktop, and Web: state management with ViewModels/StateFlow, navigation, theming, and performance.
Provide official, version-specific library documentation as the primary research source across all Flywheel workflows. Context7 MCP tools are available natively to Claude Code and its Task() sub-agents — no external scripts or dependencies required.
This skill activates automatically when any of the following are detected:
package.json, requirements.txt, go.mod, Cargo.toml, etc. during codebase scan phasesBefore invoking Context7, identify target technologies:
package.json (or equivalent) for relevant packagesFor each detected technology (max 3 per phase):
mcp__context7__resolve-library-id(
libraryName: "<technology name>",
query: "<task-specific query>"
)
mcp__context7__query-docs(
libraryId: "<resolved ID from step 1>",
query: "<command-type-specific query — see templates below>"
)
Structure the output as:
## Context7 Documentation Findings
### <Library Name> (via Context7)
- **Library ID**: `<resolved ID>`
- **Relevant APIs/Patterns**: <key findings from query>
- **Version Notes**: <any version-specific information>
- **Gotchas**: <documented pitfalls or breaking changes>
OFFICIAL DOCUMENTATION CONTEXTWhen a command invokes fw-researcher via Task(), the researcher calls Context7 directly as its first action before WebSearch/WebFetch:
1. Detect technologies from task + codebase scan
2. For each technology (max 3):
a. resolve-library-id → get Context7 ID
b. query-docs → get relevant documentation
3. Use Context7 findings to inform what gaps remain
4. Fill gaps via WebSearch/WebFetch (primary sources)
5. Include Context7 section in output
Context7 findings inform what to search for next — if official docs already cover the topic comprehensively, WebSearch can focus on community experiences and edge cases instead of duplicating basic API documentation.
When a command calls dispatch.sh gemini directly, Claude must enrich the prompt before dispatch (dispatch.sh agents cannot call MCP tools):
1. Detect technologies from task + codebase scan
2. For each technology (max 3):
a. resolve-library-id → get Context7 ID
b. query-docs → get relevant documentation
3. Prepend findings to the Gemini prompt:
OFFICIAL DOCUMENTATION CONTEXT (via Context7):
<formatted findings>
---
<original Gemini prompt>
This gives Gemini access to official documentation it would otherwise need to search for (and might get wrong or miss).
Each command type uses a query template tailored to what it needs from documentation:
| Command | Query Template |
|---|---|
/fw:implement | "Best practices and API reference for implementing <FEATURE> with <library>" |
/fw:design | "Architecture patterns and best practices for <DESIGN_BRIEF> with <library>" |
/fw:migrate | "Migration guide for <library>. Breaking changes, deprecated APIs, and upgrade steps from <SOURCE_VERSION> to <TARGET_VERSION>" |
/fw:debug | "Known issues, gotchas, and common errors with <library> related to <ROOT_CAUSE>" |
/fw:document | "How <TOPIC> works in <library>. API reference, usage patterns, and configuration" |
/fw:harden | "Security best practices, known vulnerabilities, and secure configuration for <package>" |
Every failure is non-blocking. This skill is purely additive — workflows must never halt on enrichment failure.
| Failure | Behaviour |
|---|---|
resolve-library-id returns no results | Skip this technology, continue to next |
query-docs returns empty or irrelevant results | Skip this technology, continue to next |
| Context7 MCP server unavailable | Skip all Context7 enrichment, log a note, continue workflow |
| Network timeout | Skip, continue — do not retry |
| All 3 lookups fail | Proceed without Context7 context; workflow continues as before |
When Context7 is skipped entirely, add a brief note to the session output:
ℹ️ Context7 enrichment skipped — <reason>. Proceeding with WebSearch/Gemini only.