Convert a book, paper, document, documentation site, or code repository into a structured, on-demand agent skill. Use when the user wants to turn a PDF, EPUB, DOCX, a URL, a docs site, or a GitHub repo into a skill they can load later — "make a skill from this book", "turn this paper into a skill", "turn these docs into a skill", "I want an agent that knows this library".
浏览器
create-docs-skill
试用Use when creating an LLM skill from a documentation website URL — component libraries, API references, framework guides, or when asked to "create a skill from docs", "scrape docs into a skill", "build a skill for this library". Covers SPA fallback, token optimization, and packaging.
它能做什么
Use when creating an LLM skill from a documentation website URL — component libraries, API references, framework guides, or when asked to "create a skill from docs", "scrape docs into a skill", "build a skill for this library". Covers SPA fallback, token optimization, and packaging.
技能文档
从文档 URL 创建技能
基于 skill-seeker MCP 工具 + 手工优化的端到端工作流,将任意文档站点转化为高性能 LLM 技能。
核心原则
第一次生成的技能一定不够好。 必须经过:抓取失败处理 → 参考文档拆分 → SKILL.md 瘦身 → 目录扁平化 → llms.txt 生成,才能达到生产级质量。
触发条件
- 用户给出文档 URL,要求"创建技能"、"生成 skill"、"抓取文档做成技能"
- 用户提到 skill-seeker + 具体文档站点
- 需要为组件库、API 参考、框架指南创建可复用的文档技能
工作流(8 步)
步骤 1:探索站点结构
目标:在生成配置前,先了解站点的真实结构。
1. 用 opencli web read 抓取首页 + 1-2 个深层页面
2. 判断站点类型:SSR / SPA(hash 路由)/ 静态
3. 检查是否有 llms.txt、sitemap.xml(可加速抓取)
4. 列出文档的 URL 模式(如 /component/xxx, /api/xxx)
5. 如果是开源项目,查 GitHub 仓库中文档源文件位置
关键产出:站点类型 + URL 模式 + 页面数量估算
步骤 2:生成并调整配置
使用 generate_config 生成初始配置,然后手动调整:
// generate_config 参数
{
"name": "项目名-docs",
"url": "https://docs.example.com",
"description": "简要描述",
"max_pages": 150,
"rate_limit": 0.5
}
必须手动调整的部分:
selectors.main_content:根据实际 DOM 结构调整(不要用默认的article)url_patterns.include:填入步骤 1 发现的 URL 模式url_patterns.exclude:排除非文档页面(changelog、release notes 等噪音)- 如果有多个文档源,在
sources数组中添加
步骤 3:验证 + 尝试抓取
1. validate_config → 确保语法正确
2. estimate_pages → 确认规模(SPA 站点可能失败,忽略)
3. install_skill 或 scrape_docs → 尝试抓取
步骤 4:SPA 站点降级处理 ⚠️
如果抓取结果为空(常见于 Vue/React SPA 站点),说明站点需要 JS 渲染,skill-seeker 无法直接抓取。
降级方案:
1. 找到项目的 GitHub 仓库
2. gh api 列出文档目录:repos/{owner}/{repo}/contents/{docs-path}
3. 批量 curl 下载每个 .md 文件
4. 合并为参考文档
判断依据:scrape_docs 输出 0 saved, 1 skipped - empty content → 触发降级
步骤 5:拆分为按需加载的独立文件
核心原则:参考文档必须拆分为独立文件,每个文件对应一个文档页面。Agent 按需加载,不一次性全读。
references/
├── index.md # 组件/页面索引(~900 tokens)
├── llms.txt # LLM 发现入口
├── components/ # 每个组件一个文件
│ ├── button.md
│ └── table.md
├── guides/ # 指南文档
└── extra-guides/ # 补充文档(设计原则、更新日志等)
拆分脚本模板:
# 用正则按 ## 标题拆分大文件
sections = re.split(r'\n(?=### 📋 完整列表见 `references/index.md`
## 📚 Quick Reference(3-4 个核心示例)
## 📖 参考文件结构 + 按需查阅示例
## 🛠 Working with This Skill(查询方法)
## 🔑 关键概念
## 🔒 安全注意事项(UI 库必须有)
步骤 7:生成 llms.txt
必须为技能生成 llms.txt,放在 references/ 下。
格式规范:
# 项目名称
> 一句话描述
## 分类 1
- [页面标题](relative-path.md): 一句话说明
要求:
- 所有文档页面都必须有链接
- 链接使用相对路径(相对于 llms.txt 所在目录)
- 按功能分类组织
步骤 8:扁平化目录 + 打包
目录深度规则:最多 3 层。
✅ skills/xxx-docs/
├── SKILL.md # 1 层
└── references/
├── index.md # 2 层
├── llms.txt # 2 层
├── components/table.md # 3 层
└── guides/install.md # 3 层
❌ skills/xxx-docs/references/documentation/xxx-docs_docs/components/table.md # 5 层
skill-seeker 默认会生成 5 层深路径,必须手动扁平化:
mv references/documentation/xxx-docs_docs/* references/
rm -rf references/documentation/
然后 package_skill 打包。
模式库(Pattern Library)
模式 1:SPA 降级抓取
症状:scrape_docs 返回 "0 saved, 1 skipped - empty content"
根因:站点纯客户端渲染,HTML 为空壳
方案:GitHub 源 markdown 降级
触发词:element.eleme.cn, vue-router hash, #/ 路由
模式 2:大文档拆分
症状:单个参考文件 > 100K tokens,agent 无法一次读取
方案:按 ## 标题拆分为独立文件,用 index.md 做索引
工具:Python re.split() + 正则匹配标题锚点
模式 3:SKILL.md 瘦身
症状:SKILL.md > 4000 tokens,触发成本过高
方案:删除内嵌索引表(→ index.md),精简示例(8→4 个)
目标:< 2500 tokens
模式 4:UI 库安全清单
任何 UI 组件库的技能都必须包含:
- 文件上传安全(客户端校验可绕过)
- XSS 防护(v-html、自定义渲染)
- 表单验证(客户端不可替代服务端)
- 敏感数据(HTTPS、日志脱敏)
- 第三方依赖审查
模式 5:合并已有技能
如果系统已有同主题技能(如 element-ui-vue2),合并而非替代:
- 保留已有技能的安全注意事项、设计指南、changelog
- 新增 llms.txt、优化目录结构
- 用新技能的精简 SKILL.md 替换旧的冗余版本
质量检查清单
打包前逐项验证:
- SKILL.md < 3000 tokens(约 300 行以内)
- 目录深度 ≤ 3 层
- 参考文档已拆分(非单一大文件)
- index.md 包含完整文档索引
- llms.txt 覆盖全部文档链接
- 触发条件分三层(关键词/场景/非触发)
- 有 3-4 个核心代码示例
- 有"按需查阅"指引
- UI 库包含安全注意事项
- 无残留旧路径引用
常见错误
| 错误 | 后果 | 修复 |
|---|---|---|
| 跳过站点探索直接生成配置 | 选择器错误,抓取为空 | 步骤 1 必须先做 |
| SPA 站点盲等 scrape_docs | 浪费时间,产出为空 | 一次失败即触发降级 |
| 参考文档保持单一大文件 | 每次触发 140K tokens | 按组件拆分为独立文件 |
| SKILL.md 内嵌完整索引表 | 多浪费 ~1000 tokens | 外置到 index.md |
| 保留 8 个代码示例 | 多浪费 ~800 tokens | 精简到 3-4 个最常用 |
| 目录 5 层深 | 路径冗长难以维护 | 扁平化到 3 层 |
| 不生成 llms.txt | agent 难以快速发现文档 | 必须生成 |
| 不检查已有技能 | 重复劳动,功能碎片化 | 先搜索本地技能目录 |
工具速查
| 阶段 | 工具 | 关键参数 |
|---|---|---|
| 探索站点 | opencli web read --url ... --stdout | wait=3-5s |
| 生成配置 | generate_config | max_pages, rate_limit |
| 验证配置 | validate_config | config_path |
| 一键安装 | install_skill | config_path, target, auto_upload=false |
| AI 增强 | enhance_skill | skill_dir, mode=local |
| 打包 | package_skill | skill_dir, target=claude |
| GitHub 文档 | gh api repos/{o}/{r}/contents/{p} | --jq '.[].name' |
| 下载文件 | curl -sL raw.githubusercontent.com/... | 批量循环 |
相关技能
Generate a beautiful, deployable HTML introduction page for any AgentSkill. Reads USAGE.md (preferred) or SKILL.md, parses name, description, and feature sec...
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
Distills technical long-form content (engineering notes, papers, project docs) into agent-callable skills with evidence indexing and temporal tracking. Use when the user wants to convert a technical article, paper, or project documentation into reusable skills that preserve engineering detail and tr
Build a NEW agent skill from scratch, end-to-end — a thin conductor dispatches fresh subagents through five gated roles (compose spec -> design structure -> red-green build -> compress -> independent attack). EXPENSIVE (large token cost): trigger ONLY on an explicit user request to author/build/create an agent skill — "build me a skill", "create a new skill", "package this repeated workflow so it triggers automatically", "$skill-creator-max". Do-NOT fire for: summarizing or writing daily/session memory or journaling (incl. Chinese "总结/记录今天的记忆"), or any generic "create/make/summarize X" that is not authoring an agent skill.
Turn your ideas into build specifications. Produces a complete, standardized build-documentation package for developers from a project's accumulated design work — a product overview (BRD-style), requirements spec (SRS-style), technical design doc (DD-style), and interface mockups.