Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Fetch up-to-date library documentation using Context7 API. Use this skill when the user asks for docs, examples, or help with a specific library/framework (e.g., "look up React docs", "context7 nextjs routing", "fetch docs for fastapi").
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -45% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 40% | 0% |
This skill fetches up-to-date documentation and code examples from libraries using the Context7 API.
Context7 requires a two-step process:
First, search for the library to get its ID:
GET https://context7.com/api/v2/libs/search?libraryName=<library>&query=<context>Parameters:
libraryName: The library name (e.g., "react", "nextjs", "fastapi")query: Search context to help find the right libraryThe response contains a results array with library objects. Use the id field from the first result.
Use the library ID to fetch relevant documentation:
GET https://context7.com/api/v2/context?libraryId=<id>&query=<question>Parameters:
libraryId: The ID from step 1 (e.g., "/vercel/next.js")query: Natural language question about the documentationThis returns ranked code snippets and documentation matching your query.
When the user asks about a library:
Fetch https://context7.com/api/v2/libs/search?libraryName=nextjs&query=routing Extract the library ID from the response (e.g., "/vercel/next.js")
Fetch https://context7.com/api/v2/context?libraryId=/vercel/next.js&query=How to setup dynamic routes
Other measured skills in the registry, with their headline benchmark lift.