docs-fetcher
Fetch up-to-date library documentation directly into context to prevent hallucinated APIs and outdated code examples. Use when user says "use docs", "fetch docs for [library]", "check [library] docs", or asks about a library's API, methods, or usage patterns and current documentation would be helpful. Also use proactively when generating code for libraries where version-specific accuracy matters.
When & Why to Use This Skill
The Docs Fetcher skill enhances AI coding accuracy by retrieving real-time, official library documentation directly into the conversation context. It effectively eliminates API hallucinations and the use of deprecated code patterns by providing the LLM with the most current technical references, ensuring that generated code follows the latest best practices and version-specific syntax.
Use Cases
- Case 1: When working with rapidly evolving frameworks like LangChain or FastAPI, use this skill to fetch the latest API references and avoid using outdated or deprecated methods.
- Case 2: Verify specific function signatures and parameter types by fetching official documentation pages when the AI is unsure about a library's exact implementation details.
- Case 3: Proactively integrate current documentation into the workflow when starting a new project with a specific library to ensure all generated boilerplate and logic adhere to the latest stable release.
| name | docs-fetcher |
|---|---|
| description | Fetch up-to-date library documentation directly into context to prevent hallucinated APIs and outdated code examples. Use when user says "use docs", "fetch docs for [library]", "check [library] docs", or asks about a library's API, methods, or usage patterns and current documentation would be helpful. Also use proactively when generating code for libraries where version-specific accuracy matters. |
Docs Fetcher
Fetch current documentation for libraries to ensure accurate, up-to-date code generation.
Workflow
Trigger Detection
Activate this skill when:
- User explicitly requests: "use docs", "fetch docs for X", "check X documentation"
- User asks about specific API methods, parameters, or patterns for a supported library
- Generating code where version-specific accuracy is critical
Execution Steps
- Identify the library from user request or code context
- Look up documentation URLs in references/libraries.md
- Fetch relevant pages using
fetch_webpagetool with appropriate URLs - Use fetched content to inform code generation or answer
Fetching Strategy
For comprehensive coverage, fetch multiple pages:
fetch_webpage(urls: [
"https://fastapi.tiangolo.com/tutorial/dependencies/",
"https://fastapi.tiangolo.com/advanced/advanced-dependencies/"
])
For quick lookups, fetch the most relevant single page.
Adding Libraries
To add a new library, edit references/libraries.md:
- Find the official documentation URL
- Identify key pages: quickstart, API reference, common patterns
- Add entry following the existing format
Limitations
- Fetches only explicitly listed URLs (no recursive crawling)
- Some documentation sites may block or limit fetches
- Very large pages may be truncated
- No version pinning — fetches current docs
When NOT to Use
- General programming questions not library-specific
- Libraries not in the mapping (inform user, suggest they provide URLs)
- Simple questions where training knowledge is sufficient