context7

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

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/TranVanTienDat/Milkyway --skill context7-tranvantiendat
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context7
Source: https://github.com/TranVanTienDat/Milkyway/tree/main/apps/storefront/.agents/skills/context7
Command: npx skills add https://github.com/TranVanTienDat/Milkyway --skill context7-tranvantiendat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI training data becomes outdated, so answers about library APIs, frameworks, and components may be wrong or stale. This Skill retrieves current documentation directly from the Context7 API using curl, so you get accurate, up-to-date references instead of relying on memorized knowledge. ## Core Features & Use Cases - Library Search: Query the Context7 search endpoint to find the correct library ID for any framework or package (React, Next.js, FastAPI, etc.). - Documentation Retrieval: Fetch topic-specific documentation snippets in plain text or JSON format using the library ID. - Use Case: You need to verify the correct usage of React's useState hook. The Skill searches Context7 for the React library ID, then pulls current documentation on useState so the answer reflects the latest API rather than outdated training data. ## Quick Start Use the context7 skill to fetch the latest documentation for Next.js app router routing.

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 the 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 code examples for a specific API or framework feature?▼

Search Context7 with the library name and a descriptive query about the feature, then fetch documentation using the returned library ID. Being specific with the query parameter improves relevance ranking of the returned snippets.

Does the Context7 API require an API key?▼

No API key is needed for basic usage of the Context7 API. However, unauthenticated requests are rate-limited, so frequent queries may be throttled.

What response formats does the Context7 context endpoint support?▼

The context endpoint supports json (the default) and txt formats. Use type=txt for plain text output that is easier to read, and pipe JSON responses through jq to filter and format results.

What if the Context7 search returns the wrong library?▼

Check the additional results in the search response array instead of only the first entry. Refining the query parameter with a more specific topic description also improves ranking accuracy.