context7-mcp
What it does
This skill makes your agent check current documentation for software libraries and frameworks before it answers. It is for developers who want accurate code instead of outdated examples.
When to use it
- ✓When you ask your agent to write code that uses a library such as React, Next.js, or Prisma.
- ✓When you ask a setup or configuration question about a framework.
- ✓When you need the exact API methods for a tool you are using.
Skill link
https://github.com/upstash/context7/blob/master/packages/opencode/skills/context7-mcp/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Show me how to set up a Next.js proxy using the latest documentation.”
5 new skills a week. 1 minute to read.
How it works
The skill first finds the right library in Context7's index, then fetches the documentation for your question. The agent answers using that documentation rather than memory alone.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
When the user asks about libraries, frameworks, or needs code examples, use Context7 to fetch current documentation instead of relying on training data.
When to Use This Skill
Activate this skill when the user:
- Asks setup or configuration questions ("How do I configure a Next.js proxy?")
- Requests code involving libraries ("Write a Prisma query for...")
- Needs API references ("What are the Supabase auth methods?")
- Mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.)
How to Fetch Documentation
Step 1: Resolve the Library ID
Call resolve-library-id with:
libraryName: The library name extracted from the user's questionquery: What to look up in the library's documentation (improves relevance ranking)
Step 2: Select the Best Match
From the resolution results, choose based on:
- Exact or closest name match to what the user asked for
- Higher benchmark scores indicate better documentation quality
- If the user mentioned a version (e.g., "React 19"), prefer version-specific IDs
Step 3: Fetch the Documentation
Call query-docs with:
libraryId: The selected Context7 library ID (e.g.,/vercel/next.js)query: What to look up in the library's documentation, scoped to a single concept
If the user's question spans multiple distinct concepts (e.g. routing and auth and caching), make a separate query-docs call per concept with the same library ID, unless the question is about how the concepts interact — combined queries dilute ranking and return shallow results for each topic.
Step 4: Use the Documentation
Incorporate the fetched documentation into your response:
- Answer the user's question using current, accurate information
- Include relevant code examples from the docs
- Cite the library version when relevant
Guidelines
- Be specific: Describe what to look up in the library's documentation, but keep each query to a single concept
- One topic per query: Split multi-topic questions into separate
query-docscalls — resolve the library ID once, then query per concept, unless the question is about how the concepts interact - Version awareness: When users mention versions ("Next.js 16", "React 19"), use version-specific library IDs if available from the resolution step
- Prefer official sources: When multiple matches exist, prefer official/primary packages over community forks
FAQ
Why not rely on the agent's memory?
Libraries change often, so memory may be outdated. Current documentation helps avoid old code examples.
Can it find docs for a specific version?
Yes, if you name a version such as React 19, the skill prefers version-specific documentation.
Does it work for many tools?
It works for many libraries and frameworks, such as React, Vue, Next.js, Prisma, and Supabase.
Details
Original description by the author
This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.
repo: upstash/context7
Popularity
- GitHub stars
- 64k
- Ranking position
- #3164
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
context7-docs
64kLets your agent fetch up-to-date docs and code examples for any library, framework, SDK, or cloud service before it answers.
context7-cli
64kLets your agent use the ctx7 command-line tool to fetch library documentation and set up Context7 for your coding editor.
find-docs
64kLets your agent look up current docs, API references, and code examples for any developer tool, library, or cloud service.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.