mcpbeat

Document

oliver-kriska/document

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.

3k tokens
context cost
the whole folder, loaded on every use
5
files
instructions only
0
copies elsewhere
how many repositories repackaged it
514
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill document

What comes with it

9 577 bytes besides the instruction
references/doc-best-practices.md
references/doc-templates.md
references/documentation-patterns.md
references/output-format.md

The instruction itself

9 sections, as written by the author

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

  • Never remove existing documentation — Existing docs may reflect design intent that isn't obvious from code alone; update rather than replace
  • @moduledoc on every public module — Undocumented modules accumulate quickly and create onboarding friction for new team members
  • ADRs capture the "why", not the "what" — Code shows what was built; ADRs explain why this approach was chosen over alternatives
  • Match @doc to function's public API — Document parameters, return values, and edge cases; callers shouldn't need to read the implementation
  • 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).

  • Identify new modules from recent commits or plan file
  • Check documentation coverage (@moduledoc, @doc)
  • Generate missing docs using templates
  • Add README section if user-facing feature
  • Create ADR if architectural decision was made
  • 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

How to use it

Copy the folder

Take oliver-kriska/document from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.