Diagram Design
cathrynlavery/diagram-design
Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.
“文档自动生成”
$ npx skills add shenjingnan/xiaozhi-client --skill api-docs -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install shenjingnan/xiaozhi-client api-docs --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/api-docs .claude/skills/api-docs && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "api-docs" agent skill from https://github.com/shenjingnan/xiaozhi-client/tree/main/.agents/skills/api-docs into .claude/skills/api-docs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-docs", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/shenjingnan/xiaozhi-client/tree/main/.agents/skills/api-docsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add shenjingnan/xiaozhi-client --skill api-docs -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install shenjingnan/xiaozhi-client api-docs --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/api-docs .agents/skills/api-docs && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "api-docs" agent skill from https://github.com/shenjingnan/xiaozhi-client/tree/main/.agents/skills/api-docs into .agents/skills/api-docs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-docs", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add shenjingnan/xiaozhi-client --skill api-docs -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install shenjingnan/xiaozhi-client api-docs --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/api-docs .cursor/skills/api-docs && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "api-docs" agent skill from https://github.com/shenjingnan/xiaozhi-client/tree/main/.agents/skills/api-docs into .cursor/skills/api-docs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-docs", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/shenjingnan/xiaozhi-client.git --path .agents/skills/api-docs--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add shenjingnan/xiaozhi-client --skill api-docs -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install shenjingnan/xiaozhi-client api-docs --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/api-docs .gemini/skills/api-docs && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "api-docs" agent skill from https://github.com/shenjingnan/xiaozhi-client/tree/main/.agents/skills/api-docs into .gemini/skills/api-docs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-docs", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install shenjingnan/xiaozhi-client api-docsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add shenjingnan/xiaozhi-client --skill api-docs -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/api-docs .github/skills/api-docs && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "api-docs" agent skill from https://github.com/shenjingnan/xiaozhi-client/tree/main/.agents/skills/api-docs into .github/skills/api-docs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-docs", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add shenjingnan/xiaozhi-client --skill api-docs -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install shenjingnan/xiaozhi-client api-docs --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/api-docs .opencode/skills/api-docs && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "api-docs" agent skill from https://github.com/shenjingnan/xiaozhi-client/tree/main/.agents/skills/api-docs into .opencode/skills/api-docs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-docs", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
api-docsAPI Docs is a skill in shenjingnan/xiaozhi-client (341 stars). Its SKILL.md is about 2.4k tokens. Licence: MIT.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit fe3c382. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript, yaml, mdx, handlebars, bash and json).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
API Docs loads about 2.4k tokens when it runs. Until then it costs about 4 tokens; SKILL.md has 160 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from shenjingnan/xiaozhi-client at commit fe3c382, republished under its MIT licence (© shenjingnan). 160 words, ~2,413 tokens.
.claude/skills/api-docs/SKILL.md (or your agent's skills folder).我是 API 文档自动生成技能,专门从 xiaozhi-client 项目的源代码中提取 API 信息,生成符合 Nextra (Next.js) 标准的 MDX 文档,同时遵循务实开发理念。
深度解析 TypeScript/JavaScript 源代码,提取 API 相关信息:
@Tool 装饰器的方法@Param 装饰器的参数定义// 示例源代码
@Tool("控制灯光设备 - 支持通过名称控制灯光设备的开关、亮度和色温")
public async LightControl(
@Param(z.string().describe("灯光设备名称"))
name: string,
@Param(z.enum(["turn_on", "turn_off"]).describe("控制动作"))
action: "turn_on" | "turn_off",
@Param(z.number().min(1).max(100).optional().describe("亮度百分比"))
brightnessPct?: number
) {
// 实现逻辑...
}
// 提取的信息
{
name: "LightControl",
description: "控制灯光设备 - 支持通过名称控制灯光设备的开关、亮度和色温",
parameters: [
{
name: "name",
type: "string",
description: "灯光设备名称",
required: true
},
{
name: "action",
type: "turn_on | turn_off",
description: "控制动作",
required: true
},
{
name: "brightnessPct",
type: "number",
description: "亮度百分比",
required: false,
constraints: { min: 1, max: 100 }
}
]
}基于提取的信息生成符合 xiaozhi-client 项目标准的 Nextra MDX 文档。
# {ToolName}
## 工具介绍
{工具描述}
## 参数定义
| 参数 | 类型 | 范围 | 说明 |
|------|------|------|------|
{参数表格}
## 使用示例
### 基础用法
{基础示例代码}
### 高级功能
{高级示例代码}
## 错误信息
| 错误类型 | 错误信息 | 处理建议 |
|----------|----------|----------|
{错误表格}
## 返回值格式
### 成功响应
{成功响应示例}
### 错误响应
{错误响应示例}从类型定义文件中提取相关类型信息,增强文档的完整性。
// 源类型定义
export interface LightControlParams {
entity_id: string;
action: LightActionType;
brightness?: number;
transition?: number;
}
export type LightActionType = "turn_on" | "turn_off" | "toggle";
// 生成的类型文档
### LightControlParams
灯光控制参数接口
| 属性 | 类型 | 必需 | 说明 |
|------|------|------|------|
| entity_id | string | 是 | 灯光设备实体ID |
| action | LightActionType | 是 | 控制动作类型 |
| brightness | number | 否 | 亮度百分比 (1-100) |
| transition | number | 否 | 渐变时间(秒) |
### LightActionType
灯光控制动作类型
**可选值:**
- `"turn_on"` - 开灯
- `"turn_off"` - 关灯
- `"toggle"` - 切换开关状态基于 API 定义生成实际可运行的示例代码。
// 基础示例
// 开启客厅主灯
LightControl("客厅主灯", "turn_on");
// 高级示例
// 开启灯光并设置亮度和渐变效果
LightControl("客厅主灯", "turn_on", 80, undefined, 2);
// 错误处理示例
try {
const result = await LightControl("不存在的设备", "turn_on");
console.log("操作成功:", result);
} catch (error) {
console.error("操作失败:", error.message);
}// @Tool 装饰器解析
@Tool(description: string)
// 提取:工具描述信息
// @Param 装饰器解析
@Param(zSchema, description: string)
// 提取:参数类型、验证规则、描述信息/**
* 通过名称控制灯光设备
* @param name 灯光设备名称
* @param action 控制动作 枚举值:turn_on | turn_off
* @param brightnessPct 亮度百分比 (1-100),可选参数
* @returns Promise<LightControlResult> 控制结果
* @example
* ```typescript
* LightControl("书房小灯", "turn_on", 80);
* ```
*/
// 提取:功能描述、参数说明、返回值、使用示例// 支持 xiaozhi-client 项目的复杂路径别名系统
import { UnifiedMCPServer } from "@core/unified-server";
import { StartCommand } from "@cli/commands/start";
import { WebSocketAdapter } from "@transports/websocket";
import type { XiaozhiConfig } from "@/types";
// 提取:模块路径信息,用于生成导航和链接
// 支持:@cli/*, @core/*, @transports/*, @managers/*, @services/*, @types/*, @utils/*// 接口定义
export interface LightControlResult {
success: boolean;
entity_id: string;
action: string;
changed_states?: HassState[];
errors?: string[];
}
// 枚举定义
export enum LightActionType {
TURN_ON = "turn_on",
TURN_OFF = "turn_off"
}
// 类型别名
export type DeviceState = "on" | "off" | "unavailable";
// 提取:完整的类型信息和文档interface ScanOptions {
include: string[]; // 包含的文件模式
exclude: string[]; // 排除的文件模式
tools: boolean; // 是否扫描工具方法
types: boolean; // 是否扫描类型定义
examples: boolean; // 是否生成示例
}
const scanResult = scanSourceCode(options);interface ExtractedInfo {
tools: ToolInfo[];
types: TypeInfo[];
examples: ExampleInfo[];
relationships: RelationshipInfo[];
}
const extractedInfo = extractApiInfo(scanResult);interface GenerationOptions {
template: string; // 文档模板路径
output: string; // 输出目录
format: 'mdx' | 'md'; // 输出格式
navigation: boolean; // 是否更新导航
}
const generatedDocs = generateDocumentation(extractedInfo, options);// 自动更新 meta.json 文件(Nextra 导航配置)
function updateNavigation(docs: GeneratedDoc[]): void {
const metaJsonPath = 'docs/meta.json';
const currentConfig = readFileSync(metaJsonPath, 'utf8');
const updatedConfig = insertIntoNavigation(currentConfig, docs);
writeFileSync(metaJsonPath, updatedConfig);
}
function insertIntoNavigation(config: string, docs: GeneratedDoc[]): string {
const parsed = JSON.parse(config);
// 根据文档类型插入到合适的导航位置
// MCP 工具文档 -> 使用指南,API 参考 -> 开发指南
return JSON.stringify(parsed, null, 2);
}# {{toolName}}
## 工具介绍
{{description}}
## 参数定义
| 参数 | 类型 | 范围 | 说明 |
|------|------|------|------|
{{#each parameters}}
| {{name}} | {{type}} | {{constraints}} | {{description}} |
{{/each}}
## 使用示例
{{#each examples}}
### {{title}}
```typescript
{{code}}{{/each}}
{{#if errors}}
| 错误类型 | 错误信息 | 处理建议 |
|---|---|---|
| {{#each errors}} | ||
| {{type}} | {{message}} | {{suggestion}} |
| {{/each}} | ||
| {{/if}} |
### 2. 类型文档模板
```handlebars
## {{typeName}}
{{description}}
{{#if properties}}
### 属性
| 属性 | 类型 | 必需 | 说明 |
|------|------|------|------|
{{#each properties}}
| {{name}} | {{type}} | {{required}} | {{description}} |
{{/each}}
{{/if}}
{{#if values}}
### 可选值
{{#each values}}
- `{{value}}` - {{description}}
{{/each}}
{{/if}}// 基础用法示例
function generateBasicExample(tool: ToolInfo): string {
const requiredParams = tool.parameters.filter(p => p.required);
const paramValues = requiredParams.map(p => getExampleValue(p));
return `${tool.name}(${paramValues.join(', ')});`;
}
// 完整功能示例
function generateAdvancedExample(tool: ToolInfo): string {
const allParams = tool.parameters;
const paramValues = allParams.map(p => getExampleValue(p));
return `const result = await ${tool.name}(${paramValues.join(', ')});\n` +
`console.log('操作结果:', result);`;
}interface ApiDocConfig {
input: {
sourceDir: string; // 源码目录
patterns: string[]; // 文件匹配模式
};
output: {
docsDir: string; // 文档输出目录
format: 'mdx' | 'md'; // 输出格式
templateDir?: string; // 自定义模板目录
};
generation: {
includeExamples: boolean; // 是否生成示例
includeTypes: boolean; // 是否包含类型文档
updateNavigation: boolean; // 是否更新导航
};
formatting: {
codeTheme: string; // 代码主题
tableStyle: 'github' | 'gitlab'; // 表格样式
useEmojis: boolean; // 是否使用表情符号
};
}interface ToolConfig {
name: string;
category: string;
tags: string[];
examples: ExampleConfig[];
relatedTools: string[];
deprecated?: boolean;
experimental?: boolean;
}interface ValidationResult {
valid: boolean;
errors: ValidationError[];
warnings: ValidationWarning[];
score: number; // 0-100 文档质量评分
}
function validateDocumentation(docs: GeneratedDoc[]): ValidationResult {
// 检查文档完整性
// 验证链接有效性
// 检查代码示例正确性
// 评估文档质量
}// 测试生成的示例代码
async function testExamples(examples: CodeExample[]): Promise<TestResult[]> {
const results = [];
for (const example of examples) {
try {
const result = await executeExample(example);
results.push({ example, success: true, result });
} catch (error) {
results.push({ example, success: false, error });
}
}
return results;
}// 监听源码变化,自动更新文档
function setupDocumentationSync(): void {
watch(sourceFiles, (filePath) => {
const changes = detectChanges(filePath);
if (changes.affectsApi) {
regenerateDocumentation(changes);
}
});
}# 生成所有API文档
api-docs generate
# 生成特定工具的文档
api-docs generate --tool LightControl
# 监听模式,自动更新
api-docs generate --watch
# 验证文档质量
api-docs validate
# 生成覆盖率报告
api-docs coverage{
"scripts": {
"docs:generate": "api-docs generate",
"docs:validate": "api-docs validate",
"docs:watch": "api-docs generate --watch"
}
}# GitHub Actions 示例
- name: Generate API Documentation
run: |
api-docs generate
api-docs validate
- name: Deploy Documentation
run: |
# 部署生成的文档到文档站点通过这个技能,可以确保 xiaozhi-client 项目的 API 文档始终保持最新、准确和高质量,提升开发者体验和项目可维护性。特别适配 Nextra (Next.js) 文档系统和项目的复杂路径别名结构。
docs/meta.json 管理文档导航结构docs/content/guides/mcp-tools/*.mdxdocs/content/api/reference/*.mdxdocs/content/development/*.mdx---
title: 工具名称
description: 工具描述
---© shenjingnan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/api-docs of shenjingnan/xiaozhi-client.
Open the folder on GitHubat commit fe3c382
API Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| API Docs this skillshenjingnan/xiaozhi-client | 341 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Diagram Designcathrynlavery/diagram-design | 45k | 1 repos | ~7.5k | Automated safety check: Pass | MIT | |
| Simple Englishmoeru-ai/airi | 50k | 2 repos | ~4.6k | Automated safety check: Pass | MIT | |
| Get API Docs with chubandrewyng/context-hub | 14k | 2 repos | ~775 | Automated safety check: Pass | MIT | |
| Doc SyncJetBrains/ideavim | 10k | 2 repos | ~2.6k | Automated safety check: Pass | MIT | |
| Mailspring App ScreenshotsFoundry376/Mailspring | 18k | — | ~1.5k | Automated safety check: Pass | GPL-3.0 |
cathrynlavery/diagram-design
Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.
moeru-ai/airi
Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.
andrewyng/context-hub
Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.
JetBrains/ideavim
Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.
Foundry376/Mailspring
Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.
Agents365-ai/drawio-skill
Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.
shenjingnan/xiaozhi-client
分析当前分支 git 改动,检查 e2e 测试用例覆盖情况,并可补充缺失的测试用例. An agent skill from shenjingnan/xiaozhi-client.
shenjingnan/xiaozhi-client
GitHub 评论修复技能,用于获取 PR 的 Copilot 评论并分析修复问题. An agent skill from shenjingnan/xiaozhi-client.
shenjingnan/xiaozhi-client
CI检查验证和质量保障
shenjingnan/xiaozhi-client
生成代码评审友好的 commit 信息
shenjingnan/xiaozhi-client
开发流程检查技能,确保代码修改后执行必要的质量检查
shenjingnan/xiaozhi-client
文档创建技能,用于创建标准化的项目文档
Categories
Run `npx skills add shenjingnan/xiaozhi-client --skill api-docs -a claude-code`. Or copy the skill folder (.agents/skills/api-docs in shenjingnan/xiaozhi-client) into .claude/skills/api-docs in your project. Claude Code loads it when a task matches its description.
Run `npx skills add shenjingnan/xiaozhi-client --skill api-docs -a codex`. Or copy the skill folder (.agents/skills/api-docs in shenjingnan/xiaozhi-client) into .agents/skills/api-docs in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shenjingnan/xiaozhi-client --skill api-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-docs, .gemini/skills/api-docs, .github/skills/api-docs and .opencode/skills/api-docs in your project.
SKILL.md names no scripts, command-line tools or credentials: API Docs is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
API Docs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with API Docs: Diagram Design (cathrynlavery/diagram-design, 45k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
shenjingnan (a GitHub user) maintains it in shenjingnan/xiaozhi-client, which has 341 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 3, 2026.
Source: shenjingnan/xiaozhi-client on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.