Skip to content
Skillpedia
General coding64k · #3164

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.md

Copy 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

Use this skill to help me: https://github.com/upstash/context7/blob/master/packages/opencode/skills/context7-mcp/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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 question
  • query: 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-docs calls — 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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills