Context7 Mcp

upstash/context7/packages/opencode/skills/context7-mcp

作者 upstashfeef1b2f6078ac8a33acd38d76817000af001373無授權條款62K 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫今天更新

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.

AI 產生的概覽

透過 Context7 MCP 工具取得最新的函式庫與框架文件,用來回答 API 與設定問題。

功能
此技能引導代理使用 Context7 MCP 工具取得函式庫與框架的最新文件,而不是依賴訓練資料。它會先從使用者問題中解析出函式庫 ID,挑選最佳符合項目,再依概念查詢文件。取得的內容會整合進回覆,包含相關程式碼範例與版本引用。
適用情境
當使用者詢問函式庫或框架的安裝、設定、API 參考,或涉及 React、Vue、Next.js、Prisma、Supabase 等特定函式庫的程式碼範例時使用。使用者提到版本且需要特定版本文件時也適用。
執行需求
需要代理可用的 Context7 MCP 伺服器及其 resolve-library-id 與 query-docs 工具,並需要網路存取以取得文件。不含指令碼,僅為指示。

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 Next.js middleware?")
  • 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 15", "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

來源與署名

來源:upstash/context7位於packages/opencode/skills/context7-mcp提交feef1b2

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 upstash/context7 的技能

Context7 Mcp

upstash

透過 Context7 MCP 工具取得最新的函式庫與框架文件,用來回答 API 與程式碼問題。

Software Development62K今天更新

Context7 Mcp

upstash

透過 Context7 MCP 工具取得最新的函式庫與框架文件,而非依賴訓練資料。

AI & Agents62K今天更新

Context7 Mcp

upstash

透過 Context7 MCP 工具取得最新的函式庫與框架文件,而非依賴訓練資料。

Software Development62K今天更新

Context7 Mcp

upstash

透過 Context7 MCP 工具取得最新的函式庫與框架文件,而非依賴訓練資料。

Software Development62K今天更新

Context7 Mcp

upstash

透過 Context7 MCP 工具取得最新的函式庫與框架文件,而不是依賴訓練資料。

Software Development62K今天更新

Find Docs

upstash

Retrieves up-to-date documentation, API references, and code examples for any developer technology. Use this skill whenever the user asks about a specific library, framework, SDK, CLI tool, or cloud service — even for well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot. Your training data may not reflect recent API changes or version updates. Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage. Use even when you think you know the answer — do not rely on training data for API details, signatures, or configuration options as they are frequently outdated. Always verify against current docs. Prefer this over web search for library documentation and API details.

待分類62K今天更新