Skip to content
Skills Library
Documents & office · Conversion & formats

docs-generator

/docs-generator

[UDS] 从项目源文件生成使用文档(速查表、参考手册、使用指南)。 Use when: 从 CLI 与 Skill 定义产出速查表或功能参考手册、命令变更后重新生成文档、确认生成的文档是否为最新。 Not for: 决定项目需要哪些文档或手写叙述性内容——请用 /documentation-guide;变更日志条目——请用 /changelog。 Keywords: docgen, usage docs, cheatsheet, feature reference, generated documentation, 使用文档, 速查表, 文档生成, 参考手册.

Licence
MIT
Last repository change
27.10.2026

Assessment and security

84/ 100Class: good
Format9 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

[UDS] 从项目源文件生成使用文档(速查表、参考手册、使用指南)。 Use when: 从 CLI 与 Skill 定义产出速查表或功能参考手册、命令变更后重新生成文档、确认生成的文档是否为最新。 Not for: 决定项目需要哪些文档或手写叙述性内容——请用 /documentation-guide;变更日志条目——请用 /changelog。 Keywords: docgen, usage docs, cheatsheet, feature reference, generated documentation, 使用文档, 速查表, 文档生成, 参考手册.

Original author description

[UDS] 从项目源文件生成使用文档(速查表、参考手册、使用指南)。 Use when: 从 CLI 与 Skill 定义产出速查表或功能参考手册、命令变更后重新生成文档、确认生成的文档是否为最新。 Not for: 决定项目需要哪些文档或手写叙述性内容——请用 /documentation-guide;变更日志条目——请用 /changelog。 Keywords: docgen, usage docs, cheatsheet, feature reference, generated documentation, 使用文档, 速查表, 文档生成, 参考手册.

How it works

  1. 工作流程
  2. 配置文件格式
  3. 输出类型
  4. 使用方式
  5. 检查模式
  6. 生成示例
  7. 下一步引导
  8. 参考
Original SKILL.md headings · 90 lines, 190 words
SKILL.md preview
---
source: ../../../../skills/docs-generator/SKILL.md
source_version: 1.0.0
translation_version: 1.1.0
last_synced: 2026-10-11
source_hash: ebe4f6398ca1
status: current
description: |
  [UDS] 从项目源文件生成使用文档(速查表、参考手册、使用指南)。
  Use when: 从 CLI 与 Skill 定义产出速查表或功能参考手册、命令变更后重新生成文档、确认生成的文档是否为最新。
  Not for: 决定项目需要哪些文档或手写叙述性内容——请用 /documentation-guide;变更日志条目——请用 /changelog。
  Keywords: docgen, usage docs, cheatsheet, feature reference, generated documentation, 使用文档, 速查表, 文档生成, 参考手册.
---

# 文档生成器

> **语言**: [English](../../../../skills/docs-generator/SKILL.md) | 简体中文

从项目源文件生成使用文档(速查表、参考手册、使用指南)。

## 工作流程

1. **读取配置** - 加载 `.usage-docs.yaml`(或指定的配置文件)
2. **扫描来源** - 读取源代码文件、命令和技能定义
3. **提取内容** - 从源代码解析描述、选项、示例
4. **生成文档** - 以配置的格式生成输出
5. **写入输出** - 将生成的文件保存到配置的输出目录

## 配置文件格式

```yaml
# .usage-docs.yaml
output_dir: docs/generated/
formats:
  - cheatsheet
  - reference
sources:
  - path: skills/commands/
    type: commands
  - path: cli/src/commands/
    type: cli
language: [en, zh-TW]
```

## 输出类型

| 类型 | 说明 |
|------|------|
| **cheatsheet** | 速查表,包含命令和快捷键 |
| **reference** | 完整功能参考手册,包含所有选项 |
| **usage-guide** | 新手入门使用指南 |

## 使用方式

- `/docgen` - 使用默认的 `.usage-docs.yaml` 生成文档
- `/docgen .usage-docs.yaml` - 从指定的配置文件生成文档
- `/docgen --format cheatsheet` - 仅生成速查表

## 检查模式

验证生成的文档是否与源文件保持同步。

**使用方式:**

```bash
# 检查生成的文档是否同步
./scripts/check-usage-docs-sync.sh

# 自动修复不同步的文档
./scripts/check-usage-docs-sync.sh --fix
```

- **检查模式**(默认):报告源文件与生成文档之间的差异。若不同步则以非零状态退出。
- **修复模式**(`--fix`):自动重新生成过期的文档文件。

> **注意**:此检查已整合至 `pre-release-check.sh` 的步骤 8(使用文档同步检查)。

## 生成示例

```markdown
# UDS Command Cheatsheet

| Command    | Description               |
|------------|---------------------------|
| /commit    | Generate commit message    |
| /code-review    | Run code review            |
| /sdd       | Create SDD specification   |
| /discover  | Assess project health      |
```

## 下一步引导

`/docgen` 完成后,AI 助手应建议:

> **文档已生成。建议下一步:**
> - 审查生成的文档内容是否完整
> - 执行 `/commit` 提交文档变更 ⭐ **推荐**
> - 执行 `/code-review` 审查文档品质

## 参考

- 详细指南:[guide.md](./guide.md)
Files in this package (2)
  • SKILL.md 3 KB
  • guide.md 8 KB

Versions

RepositoryScoreLicence
This page · AsiaOstrich/universal-dev-standards84MIT
AsiaOstrich/universal-dev-standards100MIT

Database snapshot: 13.11.2026 · package version 02ea5ae68d30 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95docgen
    [UDS] 從專案原始檔產生使用文件(速查表、參考手冊、使用指南)。 Use when: 從 CLI 與 Skill 定義產出速查表或功能參考手冊、指令變更後重新產生文件、確認產生的文件是否為最新。 Not for: 決定專案需要哪些文件或手寫敘述性內容——請用 /documentation-guide;變更日誌條目——請用 /changelog。 Keywords: docgen, usage docs, cheatsheet, feature reference, generated documentation, 使用文件, 速查表, 文件產生, 參考手冊.
  • 95docgen
    [UDS] Generate usage documentation (cheatsheets, references, guides) from project sources. Use when: producing a cheatsheet or feature reference from CLI and skill definitions, regenerating docs after commands change, checking generated docs are current. Not for: deciding what…
  • 100quickstart-guide-generator
    Generate quickstart guide generator operations. Auto-activating skill for Technical Documentation. Triggers on: quickstart guide generator, quickstart guide generator Part of the Technical Documentation skill category. Use when working with quickstart guide generator…
  • 100technical-documentation
    Audit, write, and improve developer documentation using Google''s Developer Documentation Style Guide and Technical Writing courses. Use this skill for any documentation work, even when the user names no style guide: "audit our docs", "review this README", "write a README",…
  • 100configuration-reference-generator
    Generate configuration reference generator operations. Auto-activating skill for Technical Documentation. Triggers on: configuration reference generator, configuration reference generator Part of the Technical Documentation skill category. Use when configuring systems or…
  • 100tech-documentation
    Technical documentation writing skill covering API docs, architecture documentation, deployment guides, and various technical writing best practices. Use this skill when creating technical documentation, writing API documentation, creating architecture design documents, or need…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.