
Context7
- 9.2k installs
- 279 repo stars
- Updated April 25, 2026
- intellectronica/agent-skills
Context7 is an agent skill that retrieves current documentation for libraries and frameworks via the Context7 API, replacing reliance on potentially outdated training data.
About
Context7 is an agent skill that fetches up-to-date documentation for software libraries, frameworks, and components by querying the Context7 API with curl. Developers use it when they need accurate API usage, code examples, or library behavior that may have changed since model training cutoff. The workflow is two steps: search for a library ID via the `/api/v2/libs/search` endpoint with `libraryName` and `query` parameters, then fetch topic-specific documentation from `/api/v2/context` using the returned `libraryId`, `query`, and optional `type=txt` for readable plain text. Examples in the skill cover React hooks, Next.js app router routing, and FastAPI dependency injection patterns. Tips recommend specific queries, jq filtering, URL-encoding spaces, and checking multiple search results when the first match is wrong. No API key is required for basic usage, though access is rate-limited on the public endpoints.
- Searches libraries via Context7 `/api/v2/libs/search` with name and topic query
- Fetches topic docs via `/api/v2/context` using the returned library ID
- Supports plain-text responses with `type=txt` for readable agent consumption
- Includes examples for React, Next.js, and FastAPI documentation lookups
- Requires no API key for basic usage with rate-limited public access
Context7 by the numbers
- 9,168 all-time installs (skills.sh)
- +211 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #48 of 1,901 Documentation skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
context7 capabilities & compatibility
- Capabilities
- search context7 for library ids by name and topi · fetch topic specific documentation snippets from · return plain text docs with `type=txt` for reada · filter and format json responses with jq · url encode query parameters containing spaces · validate search results across multiple matches
What context7 says it does
Retrieve up-to-date documentation for software libraries, frameworks, and components via the Context7 API.
Use it instead of relying on potentially outdated training data.
No API key is required for basic usage (rate-limited)
npx skills add https://github.com/intellectronica/agent-skills --skill context7Add your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 9.2k |
|---|---|
| repo stars | ★ 279 |
| Security audit | 2 / 3 scanners passed |
| Last updated | April 25, 2026 |
| Repository | intellectronica/agent-skills ↗ |
How do you verify correct library API usage and code examples when framework docs may have changed since the model was trained?
Retrieve current library and framework documentation through the Context7 API instead of relying on outdated training data.
Who is it for?
Developers implementing against React, Next.js, FastAPI, or other libraries who need live documentation during agent-assisted coding sessions.
Skip if: Skip when you need private internal docs, offline references, or full repository source analysis rather than published library documentation.
When should I use this skill?
Use when looking up documentation for any programming library or framework, finding code examples, or verifying correct function usage.
What you get
Current documentation snippets and code examples for a specific library topic, fetched live from Context7 search and context endpoints.
- Library ID from Context7 search results
- Topic-specific documentation text or JSON from the context endpoint
By the numbers
- Two-step workflow: library search endpoint then context fetch endpoint
- No API key required for basic usage with rate-limited access
Files
Context7
Overview
This skill enables retrieval of current documentation for software libraries and components by querying the Context7 API via curl. Use it instead of relying on potentially outdated training data.
Workflow
Step 1: Search for the Library
To find the Context7 library ID, query the search endpoint:
curl -s "https://context7.com/api/v2/libs/search?libraryName=LIBRARY_NAME&query=TOPIC" | jq '.results[0]'Parameters:
libraryName(required): The library name to search for (e.g., "react", "nextjs", "fastapi", "axios")query(required): A description of the topic for relevance ranking
Response fields:
id: Library identifier for the context endpoint (e.g.,/websites/react_dev_reference)title: Human-readable library namedescription: Brief description of the librarytotalSnippets: Number of documentation snippets available
Step 2: Fetch Documentation
To retrieve documentation, use the library ID from step 1:
curl -s "https://context7.com/api/v2/context?libraryId=LIBRARY_ID&query=TOPIC&type=txt"Parameters:
libraryId(required): The library ID from search resultsquery(required): The specific topic to retrieve documentation fortype(optional): Response format -json(default) ortxt(plain text, more readable)
Examples
React hooks documentation
# Find React library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=react&query=hooks" | jq '.results[0].id'
# Returns: "/websites/react_dev_reference"
# Fetch useState documentation
curl -s "https://context7.com/api/v2/context?libraryId=/websites/react_dev_reference&query=useState&type=txt"Next.js routing documentation
# Find Next.js library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=nextjs&query=routing" | jq '.results[0].id'
# Fetch app router documentation
curl -s "https://context7.com/api/v2/context?libraryId=/vercel/next.js&query=app+router&type=txt"FastAPI dependency injection
# Find FastAPI library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=fastapi&query=dependencies" | jq '.results[0].id'
# Fetch dependency injection documentation
curl -s "https://context7.com/api/v2/context?libraryId=/fastapi/fastapi&query=dependency+injection&type=txt"Tips
- Use
type=txtfor more readable output - Use
jqto filter and format JSON responses - Be specific with the
queryparameter to improve relevance ranking - If the first search result is not correct, check additional results in the array
- URL-encode query parameters containing spaces (use
+or%20) - No API key is required for basic usage (rate-limited)
Related skills
Forks & variants (1)
Context7 has 1 known copy in the catalog totaling 26 installs. They canonicalize to this original listing.
- modelscope.cn - 26 installs
How it compares
Pick context7 for live API doc lookups during coding; use deep-research skills for synthesizing unfamiliar domains from many sources.
FAQ
Who is Context7 for?
Developers using coding agents who need current library and framework documentation instead of stale training-data answers.
When should I use Context7?
When verifying API usage, fetching code examples, or checking library behavior that may have changed since training.
Is Context7 safe to install?
Review the Security Audits panel on this page before installing in production environments.