documentation-lookup
Look up library and framework documentation. Use when the user asks about API docs, library usage, framework features, or mentions specific libraries/packages by name.
When & Why to Use This Skill
This Claude skill provides a streamlined way to search and retrieve official library and framework documentation in real-time. It helps developers quickly find API references, code examples, and implementation details for various programming packages, significantly enhancing coding efficiency and reducing context switching by bringing documentation directly into the AI workflow.
Use Cases
- Case 1: Quickly looking up the syntax, parameters, and return types for specific library functions or React hooks during active development.
- Case 2: Accessing detailed API documentation and usage examples for third-party packages when local source code or README files are not available.
- Case 3: Exploring framework features and best practices by fetching relevant documentation snippets directly into the conversation to guide implementation.
- Case 4: Troubleshooting integration issues by referencing official documentation topics like authentication, routing, or state management without leaving the chat interface.
| name | documentation-lookup |
|---|---|
| description | Look up library and framework documentation. Use when the user asks about API docs, library usage, framework features, or mentions specific libraries/packages by name. |
Documentation Lookup
When to activate:
- User says "check the docs"
- User needs API documentation or code examples
- User mentions a library/framework name
- Source code of a library is not available locally
Two-step process:
Step 1: Find the library ID
Search for the library to get its context7 ID:
curl -s "https://context7.com/api/v2/search?query={library_name}" | jq '.results[:3]'
Example - searching for "react":
curl -s "https://context7.com/api/v2/search?query=react" | jq '.results[:3] | .[] | {id, title}'
This returns matching libraries. Use the id field (e.g., /facebook/react or /websites/react_dev).
Step 2: Fetch documentation
Use the library ID from step 1:
curl -s "https://context7.com/api/v2/docs/code{library_id}?topic={topic}&page=1"
Example - fetching React hooks docs:
curl -s "https://context7.com/api/v2/docs/code/facebook/react?topic=hooks&page=1"
Parameters:
topic- Focus area (e.g.,hooks,routing,authentication)page- Pagination (1-10), use if first page doesn't have enough info
Response: Returns markdown-formatted documentation snippets with code examples.
Fallback: If context7 doesn't have the library or returns errors, use web search.