Loading...
Loading...
Library documentation via Context7. Use for API references, code examples, framework docs.
npx skill4agent add alexei-led/claude-code-config looking-up-docsmcp__context7__resolve-library-idlibraryNamemcp__context7__query-docscontext7CompatibleLibraryIDtopic| Mode | Use For |
|---|---|
| API references, code examples (default) |
| Conceptual guides, architecture, tutorials |
# React hooks
resolve-library-id: "react"
get-library-docs: context7CompatibleLibraryID="/facebook/react", topic="hooks", mode="code"
# Next.js middleware
resolve-library-id: "next.js"
get-library-docs: context7CompatibleLibraryID="/vercel/next.js", topic="middleware"
# Go net/http
resolve-library-id: "go net/http"
get-library-docs: context7CompatibleLibraryID="/golang/go", topic="http server"
# Kubernetes API
resolve-library-id: "kubernetes"
get-library-docs: context7CompatibleLibraryID="/kubernetes/kubernetes", topic="deployment"topic="hooks"topic="useEffect cleanup function"topictopic="json.Unmarshal"libraryName="react 18"topic="middleware error handling"topicmode="code"page=2page=3Context7 query returns empty?
├── Try broader query (e.g., "hooks" instead of "useCallback")
├── Still empty?
│ ├── Re-resolve library ID with alternative name
│ │ (e.g., "nextjs" → "next.js", "golang" → "go")
│ └── Still empty?
│ ├── Library not indexed → Use fallbacks below
│ └── Very niche library → WebSearch for official docs# If "fastapi" fails, try:
resolve-library-id: "starlette" # FastAPI's underlying framework
resolve-library-id: "pydantic" # Often used with FastAPIWebSearch: "<library> official documentation <feature>"
WebFetch: Official docs URL → extract relevant info# Clone and explore
git clone --depth=1 <repo>
Grep: "function <name>" --type=<lang>mcp__perplexity-ask__perplexity_ask: "How to use <feature> in <library> 2024"| Library | Fallback |
|---|---|
| Internal/proprietary | Source code + README |
| Very new (<6 months) | WebSearch + official docs |
| Niche/specialized | Perplexity or GitHub issues |
| Language stdlib | Use language docs directly |
# Initial attempt fails
resolve-library-id: "htmx"
→ No results
# Fallback 1: WebSearch
WebSearch: "htmx documentation hx-swap"
→ Found: https://htmx.org/docs/
# Fallback 2: Fetch docs
WebFetch: url="https://htmx.org/docs/", prompt="Explain hx-swap attribute"
→ Returns relevant documentation