gen-docs
- Repo stars 5,436
- License MIT
- Author updated Live
- Author repo ccg-workflow
- Domain
- Design
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 94 / 100 · audit passed
- Author / version / license
- @fengshao1227 · MIT
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- macOS · Linux · Windows
- Runtime requirements
- Node.js · Python
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: gen-docs
description: node scripts/doc_generator.js <模块路径> 自动生成的 README.md 包含: 自动生成的 DESIGN.md 包含: runs entirely local…
category: design
runtime: Node.js / Python
---
# gen-docs output preview
## PART A: Task fit
- Use case: node scripts/doc_generator.js <模块路径> 自动生成的 README.md 包含: 自动生成的 DESIGN.md 包含: runs entirely locally; runs on Node.js. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “核心原则 / 自动生成 / 生成内容” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “node scripts/doc_generator.js <模块路径> 自动生成的 README.md 包含: 自动生成的 DESIGN.md 包含: runs entirely locally; runs on Node.js. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “核心原则 / 自动生成 / 生成内容” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source mentions slash commands such as `/verify-module`; use them first when your agent supports command triggers.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “核心原则 / 自动生成 / 生成内容”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: gen-docs
description: node scripts/doc_generator.js <模块路径> 自动生成的 README.md 包含: 自动生成的 DESIGN.md 包含: runs entirely local…
category: design
source: fengshao1227/ccg-workflow
---
# gen-docs
## When to use
- node scripts/doc_generator.js <模块路径> 自动生成的 README.md 包含: 自动生成的 DESIGN.md 包含:; runs on Node.js. 自动生成的 README.md 包含: 模块名…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “核心原则 / 自动生成 / 生成内容” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "gen-docs" {
input -> user goal + target files + boundaries + acceptance criteria
context -> 核心原则 / 自动生成 / 生成内容
rules -> SKILL.md triggers / order / output contract
runtime -> Node.js / Python | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 📝 造典关卡 · 文档生成器
核心原则
无文档不成模块
文档是模块的身份证
没有身份证的模块不允许上线
自动生成
运行文档生成脚本(跨平台):
# 在 skill 目录下运行
node scripts/doc_generator.js <模块路径>
node scripts/doc_generator.js <模块路径> --force # 强制覆盖已存在的文档
node scripts/doc_generator.js <模块路径> --json # JSON 输出
生成内容
README.md 骨架
自动生成的 README.md 包含:
- 模块名称 — 从目录名提取
- 描述 — 从代码文档字符串提取(如有)
- 特性列表 — 待填充
- 依赖 — 从 requirements.txt/pyproject.toml 提取
- 使用方法 — 基础模板
- API 概览 — 从代码提取类和函数列表
- 目录结构 — 自动扫描生成
DESIGN.md 骨架
自动生成的 DESIGN.md 包含:
- 设计概述 — 目标与非目标模板
- 架构设计 — 架构图占位符
- 核心组件 — 从代码提取类列表
- 设计决策 — 决策记录表格模板
- 技术选型 — 自动检测语言和依赖
- 权衡取舍 — 已知限制和技术债务模板
- 安全考量 — 威胁模型和安全措施模板
- 变更历史 — 初始版本记录
智能分析
支持的语言
| 语言 | 分析能力 |
|---|---|
| Python | 类、函数、文档字符串、依赖 |
| Go | 目录结构、依赖 |
| TypeScript | 目录结构、依赖 |
| Rust | 目录结构、依赖 |
| 其他 | 基础目录结构 |
提取的信息
- 模块名称(目录名)
- 主要编程语言
- 代码文件列表
- 类和函数定义(Python)
- 文档字符串(Python)
- 依赖列表
- 入口点文件
自动触发时机
| 场景 | 触发条件 |
|---|---|
| 新建模块 | 模块创建开始时 |
| 缺失文档 | 检测到模块缺少文档时 |
使用流程
1. 运行 doc_generator.js 生成骨架
2. 填充 TODO 标记的内容
3. 补充设计决策和理由
4. 添加使用示例
5. 运行 /verify-module 校验完整性
生成后检查清单
README.md
- 填充模块描述
- 补充特性列表
- 添加使用示例
- 确认依赖完整
DESIGN.md
- 明确设计目标
- 记录设计决策
- 说明技术选型理由
- 列出已知限制
Decide Fit First
Design Intent
How To Use It
Boundaries And Review