agentleFS
telagodtelagod/code-abyss/skills/generating-docs/SKILL.md

generating-docs

Skill242 starsChanged 5 months agoMITView on GitHub

Generates README.md and DESIGN.md scaffolds by analyzing module structure. Use when creating documentation templates for new modules. Automatically triggered at module creation.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

造典关卡 · 文档生成器

生成的是骨架,不是答案。填决策理由是人的工作,工具不能代劳。

何时使用

场景跑理由
新模块创建后第一时间✅趁记忆新鲜填决策
verifying-modules 报「缺 README/DESIGN」✅直接补救
重构后边界变化⚠看是否要重生成或手动改;不要 --force 覆盖已有内容
已有完整文档❌不要破坏人工写的内容

生成内容

README.md(自动可填部分)

字段自动来源待人补
模块名目录名是否有更好的展示名
描述顶级 docstring(Python)「存在理由」必须人写
特性TODO(占位)列 3–5 个核心能力
依赖requirements.txt / package.json / Cargo.toml 等是否有运行时假设
使用方法TODO(占位)5 分钟跑通示例
API 概览公开类/函数签名调用顺序、生命周期
目录结构tree 输出—

DESIGN.md(骨架占位)

字段自动待人补(最重要)
设计目标 / 非目标TODO核心决策驱动力
架构TODO含一张图最好
核心组件公开类/函数列表各组件的协作关系
决策表TODO方案对比 + 选择理由
技术选型依赖列表选 X 不选 Y 的理由
权衡TODO牺牲了什么
安全考量TODO信任边界、威胁模型

语言支持

语言提取深度
Python类、函数、docstring、依赖(最完整)
Go / TypeScript / Rust目录结构 + 依赖
其他基础目录结构

流程

doc_generator.js 生成骨架
        ↓
人工填 TODO(决策理由、使用示例、非目标)
        ↓
verify-module 校验完整性
        ↓
通过则提交

何时不要 --force

  • 目标文件已有人工内容 —— --force 会无差别覆盖。先 diff 旧版,手动合并。
  • CI 环境 —— 生成应在开发机做,CI 只校验,不生成。

与其他 skill 联动

  • 跑完后 → 必跑 verifying-modules
  • 大模块 → 拆分前先 designing-architectures 想清楚边界

使用

node scripts/doc_generator.js <模块路径>
node scripts/doc_generator.js <模块路径> --force   # 强制覆盖(慎用)
node scripts/doc_generator.js <模块路径> --json    # CI 用

收口

工具给骨架,TODO 不补完不算交付。生成后 5 分钟内人工填决策;超过 1 天会忘原因,文档质量陡降。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.