Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/cy-wwyy/tech_doc_mcp/add-docsnpx skills add cy-wwyy/tech_doc_mcp --skill add-docsgit clone --depth 1 https://github.com/cy-wwyy/tech_doc_mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cy-wwyy/tech_doc_mcp/add-docs)<a href="https://agentmods.dev/skills/cy-wwyy/tech_doc_mcp/add-docs"><img src="https://agentmods.dev/badge/skills/cy-wwyy/tech_doc_mcp/add-docs.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00042 | $0.01133 |
| Opus 5 | $0.00021 | $0.00566 |
| Sonnet 5 | $0.00008 | $0.00227 |
| Haiku 4.5 | $0.00004 | $0.00113 |
Grade A, and why
add-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/add-docs — 文档数据获取
输入
收到用户请求后,按以下优先级判断:
| 优先级 | 用户输入特征 | 行为 | 示例 |
|---|---|---|---|
| 1 | 包含 URL | 直接用该 URL 爬取 | /add-docs https://react.dev |
| 2 | 包含明确的框架/工具名称 | 用 Claude 自身知识推断官网 URL | /add-docs fastapi → 推断为 https://fastapi.tiangolo.com |
模糊输入必须二次确认:
以下情况必须追问用户,不允许猜测:
- 框架名拼写错漏(如 "fastPI"、"reactt")→ 追问:"你是指 FastAPI 还是其他?"
- 名称有歧义(如 "react" 可能指 react.dev 或 reactnative.dev)→ 追问:"你指的是 React 还是 React Native?"
- 无法判断是框架名还是路径(如 "docs")→ 追问
- 完全不知道是什么 → 追问:"请提供该框架的文档官网 URL"
工作流
阶段 1: 分析站点 + 过滤非技术页面
Claude 做的事情(2-3 次请求):
-
获取
sitemap.xml或解析首页导航,得到完整页面列表 -
分析 URL 路径,判断页面类型,过滤掉对编码参考价值不大的内容:
保留(技术参考) 跳过(社区/运营/历史) /tutorial//guide//docs//learn/等教学类/help//sponsor//donate//reference//api//modules/等 API 参考类/newsletter//blog//changelog//advanced//deep-dive//cookbook/等进阶类/release-notes//releases//versions//deployment//config//cli/等实操类/about//team//history//getting-started//quickstart//install/等入门类/benchmarks//alternatives//comparison//how-to//examples//recipes/等示例类/contributing//code-of-conduct//concepts//core//basics/等概念类/community//showcase//testimonials/原则:保留开发者写代码时可能参考的内容,跳过运营推广类页面。
如果不确定某类页面的价值,宁可保留——后续 LLM 清洗时还会二次筛选。
-
访问 2-3 个代表性页面,分析 HTML 结构:
- 哪个 CSS 选择器包含正文?
- 需要跳过哪些元素(导航/侧边/页脚)?
- 站点类型?(MkDocs / Docusaurus / Sphinx / 自定义)
-
输出:过滤后的 URL 列表 + CSS 选择器 + 排除元素列表
阶段 2: 生成爬虫脚本
Claude 生成一个独立脚本,在终端运行(不进 Claude 上下文):
脚本保存到 scripts/crawlers/{name}.py,做这些事:
httpx.AsyncClient并发爬取所有页面 HTML(并发 5,间隔 1s+)- 用阶段 1 确定的选择器提取正文 HTML
- 移除导航/侧边栏/页脚等元素
- 保存提取后的原始内容到
docs/{name}/raw/ - 打印进度(✅ 第 N 页, ⚠ 跳过某个页面)
关键:这个脚本在终端运行,不在 Claude 上下文中。
阶段 3: 验证
- 抽样检查 2-3 个
raw/文件的提取质量 - 报告:站点总页面数 → 过滤后保留数 → 爬取成功/失败数
约束
- Claude 只做分析 + 生成脚本,不做重复体力活
- 爬虫脚本并发 ≤5,间隔 ≥1 秒(友好爬取)
- 提取结果保存到
docs/{name}/raw/,原始数据不丢 - 如果用户未指定
--name,从 URL 域名或框架名推断
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 80 lines · 42 tokens per session scan A d277fc8c6cc6
add-docs is a skill published in the GitHub repository cy-wwyy/tech_doc_mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 1,133 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…