Using Live Documentation
Overview
Your training data is outdated. Current documentation is always more accurate.
Before writing, configuring, or recommending anything involving a library or framework, check if you used the documentation-searcher to get current information on it. If not, dispatch it first.
Core Principle
LLM training data becomes stale the moment training ends. Libraries evolve:
- APIs change between versions
- Best practices get updated
- New features get added
- Old patterns get deprecated
Before implementing anything involving a library or framework, check if you dispatched the documentation-searcher agent for it already. If not, dispatch it before writing code.
Mandatory Workflow
Step 1: Recognize the Trigger
Use documentation search when you encounter ANY of these:
- Library name mentioned (react-query, fastapi, pydantic, express, etc.)
- Framework name mentioned (Next.js, Django, React, Vue, etc.)
- Version number specified (react-query v5, Python 3.12, etc.)
- Technical concept tied to specific tool (optimistic updates in react-query)
- Implementation questions (how do I X in Y?)
- Best practices questions (what's the right way to X?)
- Debugging library-specific behavior
Red flags that mean you're about to fail:
- "Based on my knowledge of..."
- "From what I remember about..."
- "The typical pattern for..."
- Writing code without checking docs first
- Having uncertainty about the correct approach
Step 2: Dispatch Documentation Search Subagent
Why subagent instead of direct Context7:
- Saves 10,000-20,000 tokens of context in main agent
- Subagent filters docs to only what you need
- Main agent stays focused on implementation
- Better token management across the session
How to dispatch:
Dispatch the documentation-searcher agent with the following information:
- Library name: Exact package/library name (e.g., "react-query", "fastapi", "pydantic")
- Topic: Specific concept or feature (e.g., "optimistic updates", "path parameters", "field validators")
- What you need: Specific APIs, patterns, or examples you're looking for
The agent will search Context7 documentation and provide a focused synthesis with:
- Exact API signatures
- Recommended patterns and best practices
- Code examples
- Version-specific guidance
Step 3: Implement Using Verified Patterns
After receiving subagent synthesis:
- Cite what you learned: "According to react-query v5 docs (from subagent search)..."
- Use exact API signatures provided
- Follow recommended patterns from synthesis
- Note any differences from what you expected
- If gaps exist, dispatch another search or use WebSearch
Avoid:
- Mixing training data patterns with doc patterns
- Assuming API names/signatures
- Skipping documentation check "to save time"
- Implementing first, verifying later
- Using Context7 MCP tools directly — to look up documentation, use the documentation-searcher agent, not Context7 directly
Red Flags - STOP
If you're thinking ANY of these, you're about to violate the skill:
Context Rationalization Flags
- ❌ "I'm only using X% of budget" - Percentage hides absolute waste
- ❌ "Well within acceptable limits" - Ignores session-wide compounding
- ❌ "I have plenty of budget left" - Context is for ENTIRE session
- ❌ "This is just one search" - "Just one" becomes "just one more"
Efficiency Framing Flags
- ❌ "Direct access is more efficient" - You're optimizing for wrong metric
- ❌ "Subagent dispatch is overhead" - It's an investment, not overhead
- ❌ "Completed in fewer messages" - Messages don't matter, tokens do
- ❌ "For straightforward lookups, direct is optimal" - Context math doesn't change
Quality Justification Flags
- ❌ "I got comprehensive examples" - You don't need comprehensive, you need relevant
- ❌ "I can filter the docs myself" - Filtering doesn't remove docs from context
- ❌ "I need detailed information" - Subagent provides exactly what you need
The context math:
- Direct Context7: 15,000-25,000 tokens per search
- Subagent: 2,000-5,000 tokens per search
- Difference: 10,000-20,000 tokens SAVED per search
- 3 searches: 48,000 tokens saved
- That's 48,000 tokens for MORE searches, longer conversations, complex implementations
Never use "I have budget left" to justify waste.
When NOT to Use Documentation Search
Skip documentation search for:
- Language built-ins (Python dict, JavaScript Array)
- Standard library basics (Python os.path, JavaScript fs)
- Well-known universal concepts (HTTP status codes, REST principles)
- Questions about YOUR codebase (use Read/Grep)
But DO use documentation search for:
- Third-party libraries, even familiar ones
- Framework-specific patterns
- Version-specific APIs
- Best practices for tools
When in doubt: dispatch a subagent. The cost of a subagent search (2,000-5,000 tokens) is tiny compared to implementing wrong patterns from training data.
Context Management Strategy
Why subagents are mandatory:
Context savings per search:
- Direct Context7: 15,000-25,000 tokens per search
- Subagent approach: 2,000-5,000 tokens per search
- Savings: 10,000-20,000 tokens per search
Across a session:
- 3 direct searches: ~60,000 tokens
- 3 subagent searches: ~12,000 tokens
- Savings: ~48,000 tokens
That's 48,000 tokens available for:
- More codebase files
- Longer conversations
- Additional library searches
- Complex implementations
Verification Checklist
Before claiming you've implemented something correctly, verify:
If you have ANY uncertainty after receiving synthesis:
- Dispatch another documentation-searcher agent with refined topic
- Use WebSearch for supplementary info
- Ask human for clarification
Avoid:
- Using Context7 MCP tools directly — use documentation-searcher agent instead
- Shipping uncertain implementations
- Skipping documentation search to "save time"
Common Mistakes
Mistake 1: "I remember this API"
❌ "I know react-query uses useQuery, let me write this..."
✅ "Let me dispatch documentation-searcher agent to verify the current useQuery API..."
Why it fails: APIs change. Your memory is from training cutoff.
Mistake 2: "Subagent overhead isn't worth it"
❌ "This is just one search, I'll use Context7 directly..."
✅ "Even one search saves 15,000 tokens. Always dispatch documentation-searcher agent."
Why it fails: "Just one" becomes "just one more" throughout the session. Context compounds.
Mistake 3: "I'll verify after writing"
❌ [Writes full implementation] "Let me check if this is right..."
✅ [Dispatches documentation-searcher agent first] "Now I'll implement using verified patterns..."
Why it fails: Fixing wrong code takes longer than writing correct code once.
Integration with Other Workflows
With Test-Driven Development:
- Dispatch documentation-searcher agent BEFORE writing test
- Receive synthesis with API signatures
- Write test using documented patterns
- Implement using same synthesis
With Brainstorming:
- During design discussion, dispatch documentation-searcher agent for relevant docs
- Base design on current capabilities from synthesis
- Don't propose deprecated patterns
- Verify feasibility with current API
With Debugging:
- Dispatch documentation-searcher agent when error involves library
- Check if API usage matches synthesis patterns
- Verify you're using correct version's API
- Look for migration guides if version changed
Summary
Before implementing ANYTHING involving a library/framework:
- Recognize trigger (library name → stop)
- Dispatch documentation-searcher agent
- Provide clear library name, topic, and what you need
- Receive synthesis with API signatures and patterns
- Implement using verified patterns from synthesis
- Cite documentation source
Before implementing anything involving a library or framework:
- Check if you dispatched documentation-searcher for it — if not, dispatch it first
- To look up documentation, use the documentation-searcher agent, not Context7 directly
- Context savings: 10,000-20,000 tokens per search
- Your training data is always outdated — current documentation is always more accurate
1---2name: using-live-documentation3description: Before implementing, writing, configuring, or setting up anything involving libraries, frameworks, or complex APIs, check if you have looked up current documentation for them. If not, load this skill first. Triggers on third-party libraries (such as react-query, FastAPI, Django, pytest), complex standard library modules (such as subprocess, streams, pathlib, logging), and "how to" questions about library usage. Do NOT use for trivial built-ins (such as dict.get, Array.map) or pure algorithms.4---56# Using Live Documentation78## Overview910**Your training data is outdated. Current documentation is always more accurate.**1112Before writing, configuring, or recommending anything involving a library or framework, check if you used the documentation-searcher to get current information on it. If not, dispatch it first.1314## Core Principle1516LLM training data becomes stale the moment training ends. Libraries evolve:17- APIs change between versions18- Best practices get updated19- New features get added20- Old patterns get deprecated2122Before implementing anything involving a library or framework, check if you dispatched the documentation-searcher agent for it already. If not, dispatch it before writing code.2324## Mandatory Workflow2526### Step 1: Recognize the Trigger2728Use documentation search when you encounter ANY of these:2930- Library name mentioned (react-query, fastapi, pydantic, express, etc.)31- Framework name mentioned (Next.js, Django, React, Vue, etc.)32- Version number specified (react-query v5, Python 3.12, etc.)33- Technical concept tied to specific tool (optimistic updates in react-query)34- Implementation questions (how do I X in Y?)35- Best practices questions (what's the right way to X?)36- Debugging library-specific behavior3738**Red flags that mean you're about to fail:**39- "Based on my knowledge of..."40- "From what I remember about..."41- "The typical pattern for..."42- Writing code without checking docs first43- Having uncertainty about the correct approach4445### Step 2: Dispatch Documentation Search Subagent4647**Why subagent instead of direct Context7:**48- Saves 10,000-20,000 tokens of context in main agent49- Subagent filters docs to only what you need50- Main agent stays focused on implementation51- Better token management across the session5253**How to dispatch:**5455Dispatch the documentation-searcher agent with the following information:5657- **Library name**: Exact package/library name (e.g., "react-query", "fastapi", "pydantic")58- **Topic**: Specific concept or feature (e.g., "optimistic updates", "path parameters", "field validators")59- **What you need**: Specific APIs, patterns, or examples you're looking for6061The agent will search Context7 documentation and provide a focused synthesis with:62- Exact API signatures63- Recommended patterns and best practices64- Code examples65- Version-specific guidance6667### Step 3: Implement Using Verified Patterns6869**After receiving subagent synthesis:**70711. Cite what you learned: "According to react-query v5 docs (from subagent search)..."722. Use exact API signatures provided733. Follow recommended patterns from synthesis744. Note any differences from what you expected755. If gaps exist, dispatch another search or use WebSearch7677**Avoid:**78- Mixing training data patterns with doc patterns79- Assuming API names/signatures80- Skipping documentation check "to save time"81- Implementing first, verifying later82- Using Context7 MCP tools directly — to look up documentation, use the documentation-searcher agent, not Context7 directly8384## Red Flags - STOP8586If you're thinking ANY of these, you're about to violate the skill:8788### Context Rationalization Flags89- ❌ "I'm only using X% of budget" - Percentage hides absolute waste90- ❌ "Well within acceptable limits" - Ignores session-wide compounding91- ❌ "I have plenty of budget left" - Context is for ENTIRE session92- ❌ "This is just one search" - "Just one" becomes "just one more"9394### Efficiency Framing Flags95- ❌ "Direct access is more efficient" - You're optimizing for wrong metric96- ❌ "Subagent dispatch is overhead" - It's an investment, not overhead97- ❌ "Completed in fewer messages" - Messages don't matter, tokens do98- ❌ "For straightforward lookups, direct is optimal" - Context math doesn't change99100### Quality Justification Flags101- ❌ "I got comprehensive examples" - You don't need comprehensive, you need relevant102- ❌ "I can filter the docs myself" - Filtering doesn't remove docs from context103- ❌ "I need detailed information" - Subagent provides exactly what you need104105**The context math:**106- Direct Context7: 15,000-25,000 tokens per search107- Subagent: 2,000-5,000 tokens per search108- Difference: 10,000-20,000 tokens SAVED per search109- 3 searches: 48,000 tokens saved110- That's 48,000 tokens for MORE searches, longer conversations, complex implementations111112**Never use "I have budget left" to justify waste.**113114## When NOT to Use Documentation Search115116**Skip documentation search for:**117- Language built-ins (Python dict, JavaScript Array)118- Standard library basics (Python os.path, JavaScript fs)119- Well-known universal concepts (HTTP status codes, REST principles)120- Questions about YOUR codebase (use Read/Grep)121122**But DO use documentation search for:**123- Third-party libraries, even familiar ones124- Framework-specific patterns125- Version-specific APIs126- Best practices for tools127128**When in doubt: dispatch a subagent.** The cost of a subagent search (2,000-5,000 tokens) is tiny compared to implementing wrong patterns from training data.129130## Context Management Strategy131132**Why subagents are mandatory:**133134**Context savings per search:**135- Direct Context7: 15,000-25,000 tokens per search136- Subagent approach: 2,000-5,000 tokens per search137- Savings: 10,000-20,000 tokens per search138139**Across a session:**140- 3 direct searches: ~60,000 tokens141- 3 subagent searches: ~12,000 tokens142- Savings: ~48,000 tokens143144**That's 48,000 tokens available for:**145- More codebase files146- Longer conversations147- Additional library searches148- Complex implementations149150## Verification Checklist151152Before claiming you've implemented something correctly, verify:153154- [ ] Dispatched documentation-searcher agent to fetch current documentation155- [ ] Provided clear library name, topic, and what you need156- [ ] Received synthesis with API signatures157- [ ] API signatures match documentation exactly158- [ ] Patterns follow current best practices from synthesis159- [ ] No uncertainties remain about correct approach160- [ ] Can cite documentation source for key decisions161- [ ] Did NOT use Context7 MCP tools directly162163**If you have ANY uncertainty after receiving synthesis:**164- Dispatch another documentation-searcher agent with refined topic165- Use WebSearch for supplementary info166- Ask human for clarification167168**Avoid:**169- Using Context7 MCP tools directly — use documentation-searcher agent instead170- Shipping uncertain implementations171- Skipping documentation search to "save time"172173## Common Mistakes174175### Mistake 1: "I remember this API"176177```178❌ "I know react-query uses useQuery, let me write this..."179✅ "Let me dispatch documentation-searcher agent to verify the current useQuery API..."180```181182**Why it fails:** APIs change. Your memory is from training cutoff.183184### Mistake 2: "Subagent overhead isn't worth it"185186```187❌ "This is just one search, I'll use Context7 directly..."188✅ "Even one search saves 15,000 tokens. Always dispatch documentation-searcher agent."189```190191**Why it fails:** "Just one" becomes "just one more" throughout the session. Context compounds.192193### Mistake 3: "I'll verify after writing"194195```196❌ [Writes full implementation] "Let me check if this is right..."197✅ [Dispatches documentation-searcher agent first] "Now I'll implement using verified patterns..."198```199200**Why it fails:** Fixing wrong code takes longer than writing correct code once.201202## Integration with Other Workflows203204**With Test-Driven Development:**2051. Dispatch documentation-searcher agent BEFORE writing test2062. Receive synthesis with API signatures2073. Write test using documented patterns2084. Implement using same synthesis209210**With Brainstorming:**2111. During design discussion, dispatch documentation-searcher agent for relevant docs2122. Base design on current capabilities from synthesis2133. Don't propose deprecated patterns2144. Verify feasibility with current API215216**With Debugging:**2171. Dispatch documentation-searcher agent when error involves library2182. Check if API usage matches synthesis patterns2193. Verify you're using correct version's API2204. Look for migration guides if version changed221222## Summary223224**Before implementing ANYTHING involving a library/framework:**2252261. Recognize trigger (library name → stop)2272. Dispatch documentation-searcher agent2283. Provide clear library name, topic, and what you need2294. Receive synthesis with API signatures and patterns2305. Implement using verified patterns from synthesis2316. Cite documentation source232233**Before implementing anything involving a library or framework:**234- Check if you dispatched documentation-searcher for it — if not, dispatch it first235- To look up documentation, use the documentation-searcher agent, not Context7 directly236- Context savings: 10,000-20,000 tokens per search237- Your training data is always outdated — current documentation is always more accurate