Skip to content
docgen logo

文件產生器技能

docgen

從專案來源產生使用說明文件。 使用時機:「產生文件」、「建立速查表」、「使用指南」、「功能參考」、「列出所有功能」 關鍵字:documentation, usage, reference, cheatsheet, features, 功能文件, 速查表, 使用說明

SKILL.md

Full skill instructions

文件產生器技能

Language: English | 繁體中文

版本: 1.0.0 最後更新: 2026-01-26 適用範圍: Claude Code Skills


用途

自動從專案來源檔案產生完整的使用說明文件。此技能會建立:

  1. FEATURE-REFERENCE.md:包含所有細節的完整功能文件
  2. CHEATSHEET.md:單頁速查表

支援多語言(英文、繁體中文、簡體中文),並掃描各種來源:

  • CLI 指令
  • 斜線命令
  • 技能
  • 代理
  • 工作流程
  • 核心規範
  • 腳本

快速參考

產生所有文件

node scripts/​generate-usage-docs.mjs

產生特定語言

node scripts/​generate-usage-docs.mjs --lang=en       # 僅英文
node scripts/​generate-usage-docs.mjs --lang=zh-TW    # 繁體中文
node scripts/​generate-usage-docs.mjs --lang=zh-CN    # 簡體中文

產生特定格式

node scripts/​generate-usage-docs.mjs --cheatsheet    # 僅速查表
node scripts/​generate-usage-docs.mjs --reference     # 僅參考手冊

檢查同步狀態

# 檢查文件是否需要更新
node scripts/​generate-usage-docs.mjs --check

# 或使用同步檢查腳本
./​scripts/​check-usage-docs-sync.sh         # 檢查
./​scripts/​check-usage-docs-sync.sh --fix   # 需要時修復

配置

產生器使用專案根目錄的 .usage-docs.yaml 來定義:

  • 輸出路徑:文件產生位置
  • 語言:要產生的語言版本
  • 來源:要掃描的內容(CLI、技能、命令等)
  • 範本:文件結構範本

配置範例(多語言)

# .usage-docs.yaml - 完整 UDS 配置
version: "1.0"
output:
  directory: "docs/"
  formats: [reference, cheatsheet]
  languages: [en, zh-TW, zh-CN]
  paths:
    en: "docs/"
    zh-TW: "locales/​zh-TW/​docs/"
    zh-CN: "locales/​zh-CN/​docs/"

sources:
  cli:
    enabled: true
    entry: "cli/​bin/​uds.js"
  skills:
    enabled: true
    directory: "skills/"
    pattern: "**/​SKILL.md"

單語言專案

僅需要英文文件的專案:

# .usage-docs.yaml - 僅英文
version: "1.0"
output:
  directory: "docs/"
  formats: [reference, cheatsheet]
  languages:
    - en
  paths:
    en: "docs/"

sources:
  cli:
    enabled: true
    entry: "src/​cli.js"

自訂語言配置

不同語言需求的專案(例如:英文 + 日文):

# .usage-docs.yaml - 英文 + 日文
version: "1.0"
output:
  directory: "docs/"
  formats: [reference, cheatsheet]
  languages:
    - en
    - ja
  paths:
    en: "docs/"
    ja: "docs/​ja/"

templates:
  reference:
    title:
      en: "My Project Reference"
      ja: "プロジェクトリファレンス"
  cheatsheet:
    title:
      en: "My Project Cheatsheet"
      ja: "チートシート"

配置 Fallback 行為

產生器實作智慧 fallback 機制處理標題和路徑:

優先順序來源說明
1config[lang]特定語言的配置值
2config.en配置中的英文 fallback
3內建預設值支援語言的硬編碼預設值

內建支援的語言:en、zh-TW、zh-CN

對於不支援的語言,您必須在 templates 區塊中提供自訂標題。

輸出檔案

語言FEATURE-REFERENCECHEATSHEET
Englishdocs/​FEATURE-REFERENCE.mddocs/​CHEATSHEET.md
繁體中文locales/​zh-TW/​docs/​FEATURE-REFERENCE.mdlocales/​zh-TW/​docs/​CHEATSHEET.md
简体中文locales/​zh-CN/​docs/​FEATURE-REFERENCE.mdlocales/​zh-CN/​docs/​CHEATSHEET.md

整合到發布前檢查

將使用說明文件同步檢查加入 pre-release-check.sh:

# 檢查使用說明文件同步
echo "Checking usage documentation sync..."
./​scripts/​check-usage-docs-sync.sh

工作流程

┌─────────────────────────────────────────────────────────┐
│                      文件產生器                          │
├─────────────────────────────────────────────────────────┤
│                                                          │
│  1. 載入配置 (.usage-docs.yaml)                         │
│           │                                              │
│           ▼                                              │
│  2. 掃描來源                                             │
│     ├─ CLI 指令 (uds.js)                                │
│     ├─ 技能 (SKILL.md 檔案)                             │
│     ├─ 命令 (斜線命令)                                   │
│     ├─ 代理 (代理定義)                                   │
│     ├─ 工作流程 (工作流程檔案)                           │
│     ├─ 核心規範 (core/​*.md)                             │
│     └─ 腳本 (scripts/​*.sh)                              │
│           │                                              │
│           ▼                                              │
│  3. 產生文件                                             │
│     ├─ FEATURE-REFERENCE.md(詳細版)                   │
│     └─ CHEATSHEET.md(速查表)                          │
│           │                                              │
│           ▼                                              │
│  4. 輸出各語言版本                                       │
│     ├─ 英文 (docs/)                                      │
│     ├─ 繁體中文 (locales/​zh-TW/​docs/)                   │
│     └─ 簡體中文 (locales/​zh-CN/​docs/)                   │
│                                                          │
└─────────────────────────────────────────────────────────┘

在其他專案使用

此技能設計為可重用。在你的專案中使用:

  1. 複製配置範本:

    cp .usage-docs.yaml your-project/​.usage-docs.yaml
    
  2. 修改為你的專案結構:

    • 更新來源目錄
    • 調整檔案命名模式
    • 配置輸出路徑
  3. 複製產生器腳本:

    cp scripts/​generate-usage-docs.mjs your-project/​scripts/
    
  4. 執行產生器:

    node scripts/​generate-usage-docs.mjs
    

相關規範

版本歷史

版本日期變更
1.0.02026-01-26初始發布,支援多語言

授權

此技能以 CC BY 4.0 授權釋出。

來源: universal-dev-standards

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
Any Summary logo
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View