doxy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGenerate Skills from Documentation
从文档生成Skill
Transform any documentation website into agent-ready skills.
将任意文档网站转换为可用于Agent的Skill。
Input
输入
Provide a documentation URL:
Create skills from https://docs.example.com提供文档URL:
Create skills from https://docs.example.comProcess
流程
Step 1: Extract Library Name and Navigation
步骤1:提取库名称与导航结构
Use WebFetch on the documentation URL with this prompt:
Extract two things from this documentation page:
1. LIBRARY NAME: The name of the library, framework, or technology being documented.
Return as lowercase kebab-case (e.g., 'webgl', 'react', 'express-js').
2. NAVIGATION: The sidebar/navigation structure as a JSON array:
[
{"title": "Page Title", "url": "/path/to/page"},
{"title": "Another Page", "url": "/path/to/another"}
]
Format response as:
LIBRARY: [library-name]
NAVIGATION: [json-array]
Include ALL navigation links from the sidebar. Return relative URLs. Skip external links.使用WebFetch工具访问文档URL,并传入以下提示词:
从该文档页面提取两项内容:
1. 库名称(LIBRARY NAME):文档所介绍的库、框架或技术的名称。
以小写短横线分隔格式返回(例如:'webgl', 'react', 'express-js')。
2. 导航结构(NAVIGATION):侧边栏/导航结构的JSON数组:
[
{"title": "页面标题", "url": "/path/to/page"},
{"title": "另一页面", "url": "/path/to/another"}
]
返回格式如下:
LIBRARY: [library-name]
NAVIGATION: [json-array]
包含侧边栏中的所有导航链接,返回相对URL,跳过外部链接。Step 2: Create Output Directory
步骤2:创建输出目录
Create the skills folder:
.claude/skills/[library-name]/Create a manifest file :
doxy-manifest.jsonjson
{
"name": "[library-name]",
"source_url": "[documentation-url]",
"created_at": "[ISO 8601 timestamp]",
"last_updated": "[ISO 8601 timestamp]"
}创建Skill文件夹:
.claude/skills/[library-name]/创建清单文件:
doxy-manifest.jsonjson
{
"name": "[library-name]",
"source_url": "[documentation-url]",
"created_at": "[ISO 8601 timestamp]",
"last_updated": "[ISO 8601 timestamp]"
}Step 3: Process Each Page
步骤3:处理每个页面
For each navigation item:
-
Fetch content using WebFetch with prompt:
Extract the main documentation content. Return: 1. The page title 2. A concise summary (1-2 sentences) 3. Key concepts, APIs, or instructions as markdown Focus on technical content. Skip navigation, footers, ads. -
Create skill at
.claude/skills/[library-name]/[page-name]/SKILL.md
针对每个导航项:
-
获取内容:使用WebFetch工具并传入以下提示词:
提取文档的主要内容,返回: 1. 页面标题 2. 简洁摘要(1-2句话) 3. 关键概念、API或操作指南(以Markdown格式呈现) 聚焦技术内容,跳过导航栏、页脚、广告。 -
创建Skill:在路径下创建Skill文件。
.claude/skills/[library-name]/[page-name]/SKILL.md
Step 4: Write SKILL.md Files
步骤4:编写SKILL.md文件
Use this format for each skill:
markdown
---
name: [library-name]-[topic]
description: Use when working with [topic] in [library-name]. Covers [key concepts].
---每个Skill遵循以下格式:
markdown
---
name: [library-name]-[topic]
description: Use when working with [topic] in [library-name]. Covers [key concepts].
---[Page Title]
[Page Title]
[Extracted content formatted as clear instructions]
**Skill naming:**
- Derive from URL path (e.g., `/docs/api/methods` → `api-methods`)
- Use kebab-case
- Remove common prefixes (`docs/`, `guide/`, `reference/`)
**Directory structure example:**.claude/skills/webgl/
├── doxy-manifest.json
├── getting-started/
│ └── SKILL.md
├── best-practices/
│ └── SKILL.md
└── shaders/
└── SKILL.md
undefined[提取的内容整理为清晰的操作指南]
**Skill命名规则:**
- 从URL路径衍生(例如:`/docs/api/methods` → `api-methods`)
- 使用小写短横线分隔格式
- 移除常见前缀(`docs/`, `guide/`, `reference/`)
**目录结构示例:**.claude/skills/webgl/
├── doxy-manifest.json
├── getting-started/
│ └── SKILL.md
├── best-practices/
│ └── SKILL.md
└── shaders/
└── SKILL.md
undefinedStep 5: Report Results
步骤5:结果报告
After processing, report:
- Folder created:
.claude/skills/[library-name]/ - Number of skills generated
- List of skill names with purposes
- Any pages that failed to process
处理完成后,报告以下内容:
- 创建的文件夹:
.claude/skills/[library-name]/ - 生成的Skill数量
- Skill名称及用途列表
- 处理失败的页面(如有)
Quality Rules
质量规则
- Keep each SKILL.md under 200 lines
- If content exceeds limit, create subdirectory with detailed files
references/ - Use imperative voice ("Configure X" not "This explains how to configure X")
- Include code examples from the documentation
- Focus on actionable guidance
- 每个SKILL.md文件不超过200行
- 若内容超出限制,创建子目录存放详细文件
references/ - 使用祈使语气(例如:“配置X”而非“本文介绍如何配置X”)
- 包含文档中的代码示例
- 聚焦可操作的指导内容
Error Handling
错误处理
| Issue | Action |
|---|---|
| WebFetch fails for a page | Log error, continue with remaining pages |
| Empty navigation | Report issue, suggest checking URL structure |
| Content too minimal | Create stub skill noting limited content |
| Folder already exists | Report existing skills, suggest update or different name |
| 问题 | 处理方式 |
|---|---|
| WebFetch获取页面失败 | 记录错误,继续处理剩余页面 |
| 导航结构为空 | 报告问题,建议检查URL结构 |
| 内容过于简略 | 创建占位Skill并标注内容有限 |
| 文件夹已存在 | 报告已存在的Skill,建议更新或使用不同名称 |
Output Format Reference
输出格式参考
See for complete SKILL.md specification.
references/skill-format.mdNote: Claude Code users can install the full plugin for slash commands:
/doxy/plugin davidosemwegie/doxy完整的SKILL.md规范请查看。
references/skill-format.md注意: Claude Code用户可以安装完整插件以使用斜杠命令:
/doxy/plugin davidosemwegie/doxy