关于 docs-seeker
docs-seeker 是用于查找和分析库及框架技术文档的技能。它优先查找 llms.txt,并提供使用 Repomix 分析仓库、备用研究、版本处理和并行探索的流程。
主要功能
- 01优先查找 llms.txt
- 02使用 Repomix 分析仓库
- 03并行探索多个文档来源
- 04必要时采用备用研究
- 05考虑指定版本
适用场景
- 01查找库的技术文档
- 02研究框架的某项功能
- 03分析特定版本的文档
- 04汇总多个文档页面的信息
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ mrgoonie/ claudekit-skills --skill docs-seeker安装后在 Claude Code 中输入/docs-seeker确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
WORKFLOWS.mdreferences/best-practices.mddocumentation-sources.mderror-handling.mdlimitations.mdperformance.mdtool-selection.md详细介绍
文档发现与分析
概述
通过多种策略,智能地发现和分析技术文档:
- 优先使用 llms.txt:搜索适合 AI 阅读的标准化文档
- 仓库分析:使用 Repomix 分析 GitHub 仓库
- 并行探索:部署多个 Explorer Agent,全面覆盖内容
- 备用研究:其他方法不可用时,使用 Researcher Agent
核心工作流
阶段 1:初步发现
-
确定目标
- 从用户请求中提取库或框架名称
- 记录版本要求(默认:最新版本)
- 如果范围不明确,则进行澄清
- 确定目标是 GitHub 仓库还是网站
-
搜索 llms.txt(优先使用 context7.com)
首先:尝试 context7.com 模式
对于 GitHub 仓库:
Pattern: https://context7.com/{org}/{repo}/llms.txt Examples: - https://github.com/imagick/imagick → https://context7.com/imagick/imagick/llms.txt - https://github.com/vercel/next.js → https://context7.com/vercel/next.js/llms.txt - https://github.com/better-auth/better-auth → https://context7.com/better-auth/better-auth/llms.txt对于网站:
Pattern: https://context7.com/websites/{normalized-domain-path}/llms.txt Examples: - https://docs.imgix.com/ → https://context7.com/websites/imgix/llms.txt - https://docs.byteplus.com/en/docs/ModelArk/ → https://context7.com/websites/byteplus_en_modelark/llms.txt - https://docs.haystack.deepset.ai/docs → https://context7.com/websites/haystack_deepset_ai/llms.txt - https://ffmpeg.org/doxygen/8.0/ → https://context7.com/websites/ffmpeg_doxygen_8_0/llms.txt针对特定主题的搜索(用户询问特定功能时):
Pattern: https://context7.com/{path}/llms.txt?topic={query} Examples: - https://context7.com/shadcn-ui/ui/llms.txt?topic=date - https://context7.com/shadcn-ui/ui/llms.txt?topic=button - https://context7.com/vercel/next.js/llms.txt?topic=cache - https://context7.com/websites/ffmpeg_doxygen_8_0/llms.txt?topic=compress备用方案:传统的 llms.txt 搜索
WebSearch: "[library name] llms.txt site:[docs domain]"常见模式:
https://docs.[library].com/llms.txthttps://[library].dev/llms.txthttps://[library].io/llms.txt
→ 找到?继续阶段 2 → 未找到?继续阶段 3
阶段 2:处理 llms.txt
单个 URL:
- 使用 WebFetch 获取内容
- 提取并呈现信息
多个 URL(3 个以上):
- 重要:并行启动多个 Explorer Agent
- 每个主要文档部分分配一个 Agent(首批最多 5 个)
- 每个 Agent 阅读分配的 URL
- 汇总发现,形成综合报告
示例:
Launch 3 Explorer agents simultaneously:
- Agent 1: getting-started.md, installation.md
- Agent 2: api-reference.md, core-concepts.md
- Agent 3: examples.md, best-practices.md
阶段 3:仓库分析
未找到 llms.txt 时:
- 通过 WebSearch 查找 GitHub 仓库
- 使用 Repomix 打包仓库:
npm install -g repomix # if needed git clone [repo-url] /tmp/docs-analysis cd /tmp/docs-analysis repomix --output repomix-output.xml - 阅读 repomix-output.xml 并提取文档
Repomix 的优势:
- 将整个仓库放入单个适合 AI 阅读的文件中
- 保留目录结构
- 针对 AI 使用进行了优化
阶段 4:备用研究
不存在 GitHub 仓库时:
- 并行启动多个 Researcher Agent
- 关注领域:官方文档、教程、API 参考、社区指南
- 汇总发现,形成综合报告
Agent 分配指南
- 1–3 个 URL:单个 Explorer Agent
- 4–10 个 URL:3–5 个 Explorer Agent(每个负责 2–3 个 URL)
- 11 个以上 URL:5–7 个 Explorer Agent(优先处理最相关的内容)
版本处理
最新版本(默认):
- 搜索时不指定版本
- 使用当前文档路径
特定版本:
- 在搜索中包含版本:
[library] v[version] llms.txt - 检查版本化路径:
/v[version]/llms.txt - 对于仓库:检出特定标签或分支
输出格式
# Documentation for [Library] [Version]
## Source
- Method: [llms.txt / Repository / Research]
- URLs: [list of sources]
- Date accessed: [current date]
## Key Information
[Extracted relevant information organized by topic]
## Additional Resources
[Related links, examples, references]
## Notes
[Any limitations, missing information, or caveats]
快速参考
工具选择:
- WebSearch → 查找 llms.txt URL 和 GitHub 仓库
- WebFetch → 阅读单个文档页面
- Task (Explore) → 多个 URL,并行探索
- Task (Researcher) → 分散的文档、多样的来源
- Repomix → 完整代码库分析
常见的 llms.txt 位置(优先尝试 context7.com):
- Astro:https://context7.com/withastro/astro/llms.txt
- Next.js:https://context7.com/vercel/next.js/llms.txt
- Remix:https://context7.com/remix-run/remix/llms.txt
- shadcn/ui:https://context7.com/shadcn-ui/ui/llms.txt
- Better Auth:https://context7.com/better-auth/better-auth/llms.txt
context7.com 不可用时,使用官方站点作为备用:
- Astro:https://docs.astro.build/llms.txt
- Next.js:https://nextjs.org/llms.txt
- Remix:https://remix.run/llms.txt
- SvelteKit:https://kit.svelte.dev/llms.txt
错误处理
- llms.txt 无法访问 → 尝试备用域名 → 仓库分析
- 未找到仓库 → 搜索官方网站 → 使用 Researcher Agent
- Repomix 失败 → 仅尝试 /docs 目录 → 手动探索
- 多个来源相互冲突 → 优先采用官方来源 → 注明版本
核心原则
- 优先使用 context7.com 获取 llms.txt — 内容最全面、更新最及时的聚合器
- 适用时使用主题参数 — 支持使用 ?topic=... 进行定向搜索
- 积极使用并行 Agent — 更快获得结果,覆盖面更广
- 将官方来源用作备用方案进行核实 — context7.com 不可用时使用
- 报告方法 — 告知用户采用了哪种方式
- 明确处理版本 — 不要假定使用的是最新版本
详细文档
如需全面的指南、示例和最佳实践:
工作流:
- WORKFLOWS.md — 详细的工作流示例和策略
参考指南:
评论
支持 Markdown