context7

Retrieve up-to-date library documentation and code examples via the Context7 API.

3|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/wopal-cn/wopal-space-ontology --skill context7-wopal-cn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context7
Source: https://github.com/wopal-cn/wopal-space-ontology/tree/main/skills/context7
Command: npx skills add https://github.com/wopal-cn/wopal-space-ontology --skill context7-wopal-cn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI training data becomes outdated, so answers about library APIs, frameworks, and code examples may be stale or incorrect. This Skill queries the Context7 API to fetch current documentation for any programming library on demand. ## Core Features & Use Cases - Library Search: Find the correct Context7 library ID by searching with a library name and topic via the search endpoint. - Documentation Retrieval: Fetch topic-specific documentation snippets in JSON or plain text format using the library ID. - Use Case: When writing React code and unsure about the latest useState API, query Context7 for current React hooks documentation instead of relying on potentially outdated knowledge. ## Quick Start Ask the AI to look up the latest documentation for a library topic, such as "use Context7 to find current Next.js app router documentation".

Frequently Asked Questions about context7

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get up-to-date library documentation with Context7?

Query the Context7 search endpoint with a library name and topic to get a library ID, then call the context endpoint with that ID and your topic. Both steps use simple curl requests and return documentation snippets.

How to find the Context7 library ID for a framework?

Send a GET request to the Context7 search API with libraryName and query parameters, then read the id field from the first result. Use jq to filter the JSON response, for example extracting results[0].id.

Does Context7 require an API key?

No API key is required for basic usage of the Context7 API, though requests are rate-limited. You can query both the search and context endpoints directly with curl without authentication.

What output formats does the Context7 API support?

The context endpoint supports JSON as the default format and plain text via the type=txt parameter. Plain text output is more readable for direct consumption, while JSON suits programmatic processing.

Why does Context7 search return the wrong library?

The first search result may not match your intended library when names are ambiguous. Inspect additional results in the response array and make your query parameter more specific to improve relevance ranking.