context7-auto-research
通过 Context7 获取库/框架最新文档。优先使用已有知识,仅在以下场景触发:(1) 用户显式调用本 skill,(2) 使用库/框架时已有知识无法解决问题(接口不存在、参数错误、缺少解决方案、知识可能过时),主动查询最新文档。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
通过 Context7 获取库/框架最新文档。优先使用已有知识,仅在以下场景触发:(1) 用户显式调用本 skill,(2) 使用库/框架时已有知识无法解决问题(接口不存在、参数错误、缺少解决方案、知识可能过时),主动查询最新文档。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Claude 与 Codex 双视角 Code Review。并行执行 Claude review 和 Codex review(通过 codex exec CLI),对比分析后输出综合报告到 `.ai_docs/review/`。适用场景:(1) 用户要求双 agent 协作 review,(2) 用户手动明确触发该 skill。codex 永远不使用本 skill。
Claude 与 Codex CLI 协作编程模式。Claude 负责调研、规划、编写 prompt,所有代码编辑通过 Codex exec 执行。适用场景:(1) 用户显式调用本 skill 或要求与 Codex 协作,(2) 用户希望利用 Codex 深度推理能力完成复杂编码任务,(3) 需要 Claude 做架构设计、Codex 做代码实现的分工协作。进入后持续运行,直到用户明确退出。
旧版 PR 走读(HTML 输出),已被飞书版 pr-walkthrough 取代。仅在用户明确点名 legacy 版本或明确要求 HTML 报告时使用;常规的 PR / 分支解读请求一律走 pr-walkthrough。产出自包含的 HTML 走读报告——旅程式叙事、真实代码片段逐跳走读、排查路标(只做理解,不做 code review)。
PR / 分支变更深度解读。全量精读 diff 后在飞书文档中产出一份走查文档——旅程式叙事、画板图解、真实代码片段、排查路标,帮助项目 owner 重建对代码的理解与掌控(只做理解,不做 code review)。硬依赖 lark-cli 与 lark-doc / lark-whiteboard skill。适用场景:(1) 用户要求解读、理解某个 PR、分支或本地 diff 做了什么,(2) 用户给出 GitHub PR 链接或编号要求分析其设计与影响,(3) 大型变更(含 agent 代写的代码)合并前需要系统性摸清关键设计与流程。
Claude 与 Codex 双视角 Spec Review(代码驱动)。并行审查需求/设计产出物(proposal、specs、design、tasks 等),各自独立探索项目代码以验证 spec 的可行性和完整性,对比分析后输出综合报告到 `.ai_docs/review/`。适用场景:(1) 用户在 opsx:ff 后要求审查 spec 质量,(2) 用户要求双 agent 协作审查需求或设计文档,(3) 用户手动明确触发该 skill 并传入目标目录。codex 永远不使用本 skill。
文件驱动的结构化脑暴。只在用户直接触发时使用。适用场景:(1) 用户手动调用本 skill 并给出脑暴主题,(2) 用户要求对某个问题进行发散讨论和方案收敛。作为有立场的思维伙伴,通过逐个问题与用户碰撞观点,结论实时回写到脑暴文档。
| name | context7-auto-research |
| description | 通过 Context7 获取库/框架最新文档。优先使用已有知识,仅在以下场景触发:(1) 用户显式调用本 skill,(2) 使用库/框架时已有知识无法解决问题(接口不存在、参数错误、缺少解决方案、知识可能过时),主动查询最新文档。 |
通过 Context7 API 获取库/框架最新文档。 优先使用已有知识解决问题,不要因为用户提到了某个库就触发查询。
已有知识优先。 只在确实卡住时才查询 Context7。
用户通过 /context7-auto-research 或明确要求查询最新文档时触发。
使用库/框架过程中遇到以下情况时,主动触发查询:
不触发的情况:
从用户查询中识别:
通过 Task tool 调用 general-purpose subagent,在子 agent 内部完成搜索和选择,只回传精炼结果:
Task parameters:
- subagent_type: general-purpose
- description: "Search Context7 for <library-name>"
- prompt: |
Run this command to search for a library on Context7:
node <skill-dir>/scripts/context7-api.js search "<library-name>" "<rewritten-query>"
The API returns JSON with a `results` array. Each result has these key fields:
- id: library identifier (e.g. "/charmbracelet/bubbletea")
- title: display name
- description: one-line summary
- trustScore: reliability score (0-10)
- stars: GitHub stars (-1 if N/A)
- versions: available version tags
- verified: whether the source is verified
From the results, select the BEST matching library using these criteria (in priority order):
1. Title/name closely matches "<library-name>"
2. Highest trust score among matches
3. Version matches "<user-specified-version>" if the user specified one
4. Prefer verified and official packages over community forks
Return ONLY the following (plain text, not JSON):
- Selected library id
- Title
- Description (one line)
- Available versions (if any)
- Why this was selected (one sentence)
If no results found or all results are irrelevant, return "NO_RESULTS".
其中 <skill-dir> 为本 skill 的安装目录路径。
<rewritten-query> 为重写后的关键词查询(见下方 Query 重写规则)。
<user-specified-version> 为用户指定的版本号(如未指定则省略版本匹配条件)。
通过 Task tool 调用 general-purpose subagent,在子 agent 内部获取文档并按用户问题筛选,只回传相关内容:
Task parameters:
- subagent_type: general-purpose
- description: "Fetch <library-name> docs from Context7"
- prompt: |
Run this command to fetch documentation from Context7:
node <skill-dir>/scripts/context7-api.js context "<library-id>" "<rewritten-query>"
The user's question/intent is: <user-question-summary>
The API returns JSON with:
- codeSnippets: array of code examples, each containing:
- codeTitle: snippet title
- codeDescription: what the code does
- codeLanguage: programming language
- codeList: array of { language, code } with actual source code
- infoSnippets: array of text-based documentation
Process the results and return ONLY content relevant to the user's question:
- Preserve actual code from codeList VERBATIM (do not summarize code)
- Include brief descriptions for context
- SKIP snippets that are not relevant to the user's question
- If many snippets are relevant, prioritize the most directly useful ones (3-5 max)
- Format as a clean, readable summary — not raw JSON
If the API returns empty results or fails, return "NO_DOCS_FOUND".
其中 <user-question-summary> 为用户问题的简要概括,帮助子 agent 判断哪些文档片段与用户需求相关。
使用子 agent 返回的筛选后文档:
scripts/context7-api.js 提供两个命令:
# 搜索库
node scripts/context7-api.js search <libraryName> <query>
# 获取文档
node scripts/context7-api.js context <libraryId> <query>
支持两种方式:
.env 文件:在 skill 目录创建 .env,参考 .env.exampleexport CONTEXT7_API_KEY="your-api-key"优先级:环境变量 > .env 文件。未设置时使用公共速率限制(配额较低)。
获取 API Key:访问 context7.com/dashboard 注册。
不要直接使用用户原始问题作为 query。将用户意图提炼为简洁的英文关键词短语:
示例:
| 触发场景 | 重写后的 query |
|---|---|
| 用户调用:查 Next.js 15 中间件配置 | middleware configuration |
不确定 useFormStatus 参数 | useFormStatus hook API |
Prisma createMany 是否支持嵌套 | createMany nested writes |
| 不确定 Tailwind v4 的 dark mode 写法 | dark mode configuration |
/vercel/next.js/v15.1.8)用户: "/context7-auto-research Next.js 15 middleware"
middleware configuration/vercel/next.js/v15.1.8"场景: 用户要求用 React 19 的 useFormStatus 实现表单提交状态,
但对该 Hook 的参数和返回值不确定。
useFormStatus 是 React 19 新增 API,训练数据可能不完整useFormStatus hook API/facebook/react/v19.0.0"场景: 用户使用 Prisma 遇到复杂的嵌套写入问题, 已有知识中的写法在新版本中可能已变更。
createMany 是否支持嵌套createMany nested writes/prisma/prisma"