context7-mcp
できること
このスキルは、エージェントが回答する前に、ソフトウェアのライブラリやフレームワークの最新のドキュメントを確認するようにします。古いコード例ではなく、正確なコードがほしい開発者向けです。
使う場面
- ✓React、Next.js、Prisma などのライブラリを使うコードを書いてほしいとき。
- ✓フレームワークの設定やセットアップについて質問するとき。
- ✓使っているツールの正確な API メソッドが必要なとき。
スキルのリンク
https://github.com/upstash/context7/blob/master/packages/opencode/skills/context7-mcp/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“最新のドキュメントを使って、Next.js のプロキシの設定方法を見せてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、まず Context7 の索引から適切なライブラリを見つけ、あなたの質問に関するドキュメントを取得します。エージェントは記憶だけでなく、そのドキュメントを使って答えます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
よくある質問
記憶に頼らないのはなぜですか?
ライブラリは頻繁に変わるため、記憶は古くなることがあります。最新のドキュメントは、古いコード例を避ける助けになります。
特定のバージョンのドキュメントを探せますか?
はい。React 19 などのバージョンを指定すると、そのバージョン専用のドキュメントを優先します。
多くのツールに対応していますか?
React、Vue、Next.js、Prisma、Supabase など、多くのライブラリやフレームワークに対応しています。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 64k
- ランキング
- #3164
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
context7-docs
64kエージェントが、回答する前に、あらゆるライブラリ、フレームワーク、SDK、クラウドサービスについて、最新のドキュメントとコード例を取得できるよう支援します。
context7-cli
64kエージェントが、ctx7 のコマンドラインツールを使って、ライブラリのドキュメントを取得し、コーディングエディターに Context7 を設定できるよう支援します。
find-docs
64kエージェントが、あらゆる開発ツール、ライブラリ、クラウドサービスについて、最新のドキュメント、API リファレンス、コード例を調べられるよう支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。