From research
A skill for retrieving the latest library documentation using Context7. Use when the user asks about how to use a library, requests code examples, or instructs to "use context7". Prevents hallucinations based on outdated training data and provides up-to-date API information.
npx claudepluginhub dotneet/claude-code-toolkit --plugin researchThis skill uses the workspace's default tool permissions.
Context7 is a service that provides LLMs with the latest library documentation. It prevents hallucinations from outdated training data or non-existent APIs, enabling retrieval of version-specific accurate documentation and code examples.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Context7 is a service that provides LLMs with the latest library documentation. It prevents hallucinations from outdated training data or non-existent APIs, enabling retrieval of version-specific accurate documentation and code examples.
Use this skill in the following cases:
First, obtain the Context7 ID for the target library.
API call:
curl "https://context7.com/api/v2/libs/search?libraryName=LIBRARY_NAME&query=CONTEXT_QUERY" \
-H "Authorization: Bearer $CONTEXT7_API_KEY"
Example:
# Search for React library
curl "https://context7.com/api/v2/libs/search?libraryName=react&query=hooks" \
-H "Authorization: Bearer $CONTEXT7_API_KEY"
Criteria for selecting from response:
trustScore: Trust score (higher is better)totalSnippets: Number of available documents (more means richer information)versions: Verify that the required version is includedUse the resolved library ID to retrieve specific documentation.
API call:
curl "https://context7.com/api/v2/context?libraryId=LIBRARY_ID&query=SPECIFIC_QUERY" \
-H "Authorization: Bearer $CONTEXT7_API_KEY"
Example:
# Retrieve information about React's useEffect
curl "https://context7.com/api/v2/context?libraryId=/facebook/react&query=useEffect cleanup function" \
-H "Authorization: Bearer $CONTEXT7_API_KEY"
Query best practices:
Respond to the user's question based on the retrieved documentation.
Information to include in the response:
User: "How do I write a cleanup function with React's useEffect?"
Execution steps:
libraryName=react, query=useEffect cleanuplibraryId=/facebook/react, query=useEffect cleanup functionUser: "Use context7 to show me how to implement authentication middleware with Next.js App Router"
Execution steps:
libraryName=next.js, query=middleware authenticationlibraryId=/vercel/next.js, query=middleware authentication route protectionUser: "How to create a button component using TailwindCSS and shadcn/ui"
Execution steps:
| Error | Solution |
|---|---|
| 404 (Not Found) | Search again with a different library name (e.g., "nextjs" → "next.js") |
| 429 (Rate Limit) | Wait a moment and retry |
| Empty response | Retry with a more general query |
For detailed API specifications, see references/api_reference.md.