‹ 首页

document

@oliver-kriska · 收录于 4 天前 · 上游提交 4 天前

Generate @moduledoc/@doc for tested Elixir features; may update their README section or ADR. Not for docs lookup, documentation audits/reviews, or capturing standalone decisions.

适合你,如果需要在测试通过的Elixir功能上快速生成@moduledoc和@doc

/ 通过 npx 安装 校验哈希
npx oh-my-skill add oliver-kriska/claude-elixir-phoenix/document
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- oliver-kriska/claude-elixir-phoenix/document
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify oliver-kriska/claude-elixir-phoenix/document
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
503GitHub stars
~654最小装载
~654含声明引用
~2.5K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 88c1194 · 表述以原文为准
它做什么

自动为 Elixir 模块生成缺失的 @moduledoc 和 @doc 文档注释,也可能更新 README 或创建架构决策记录(ADR)。

什么时候触发

当你使用 /phx:document 命令并指定计划文件或功能名称时触发;也可自动检测最近的计划。

装好后可以这样说
根据功能名称生成文档。
自动检测最近的计划并生成文档。
技能原文 SKILL.md作者撰写 · MIT · 88c1194

Document

Generate documentation for newly implemented features.

Usage
/phx:document .claude/plans/magic-link-auth/plan.md
/phx:document magic link authentication
/phx:document  # Auto-detect from recent plan
Iron Laws
  1. Never remove existing documentation — Existing docs may reflect design intent that isn't obvious from code alone; update rather than replace
  2. @moduledoc on every public module — Undocumented modules accumulate quickly and create onboarding friction for new team members
  3. ADRs capture the "why", not the "what" — Code shows what was built; ADRs explain why this approach was chosen over alternatives
  4. Match @doc to function's public API — Document parameters, return values, and edge cases; callers shouldn't need to read the implementation
  5. DO NOT add @doc to untested code — documentation implies a stable contract; document only after tests confirm the function behaves as described
What Gets Documented

| Output | Description | |--------|-------------| | @moduledoc | For new modules missing documentation | | @doc | For public functions without docs | | README section | For user-facing features | | ADR | For significant architectural decisions |

Workflow
Step 0: Pre-check (avoid no-op runs)

Run git diff --name-only HEAD~5 | grep '\.ex$' | head -20 to check for new .ex files.

If NO new .ex files were added (only modifications), skip the full audit and report: "No new modules — documentation coverage unchanged." This prevents 35-message analysis sessions that conclude "PASS" with zero output (confirmed: session bb0a0454 wasted ~2K tokens on no-op).

  1. Identify new modules from recent commits or plan file
  2. Check documentation coverage (@moduledoc, @doc)
  3. Generate missing docs using templates
  4. Add README section if user-facing feature
  5. Create ADR if architectural decision was made
  6. Write report to .claude/plans/{slug}/reviews/{feature}-docs.md
When to Generate ADRs

| Trigger | Create ADR | |---------|-----------| | New external dependency | Yes | | New database table | Maybe (if schema non-obvious) | | New OTP process | Yes (explain why process needed) | | New context | Maybe (if boundaries non-obvious) | | New auth mechanism | Yes | | Performance optimization | Yes |

Integration with Workflow
/phx:plan → /phx:work → /phx:review
       ↓
/phx:document  ← YOU ARE HERE (optional, suggested after review passes)
References
  • ${CLAUDE_SKILL_DIR}/references/doc-templates.md — @moduledoc, @doc, README, ADR templates
  • ${CLAUDE_SKILL_DIR}/references/output-format.md — Documentation report format
  • ${CLAUDE_SKILL_DIR}/references/doc-best-practices.md — Elixir documentation best practices
  • ${CLAUDE_SKILL_DIR}/references/documentation-patterns.md — Detailed documentation patterns
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。