Skip to content
Development
Skill

/document

Use when asked to document Elixir code: add or fill in @moduledoc and @doc for modules and functions. Documents tested code only; may add a README section or ADR. Not for docs lookup or audits.

From plugin
claude-elixir-phoenix
574106 skills37 agents2 commands

Claude Code

$ npx -y skills add oliver-kriska/claude-elixir-phoenix --skill document --agent claude-code

SKILL.md

document.SKILL.md
name: document
description: "Use when asked to document Elixir code: add or fill in @moduledoc and @doc for modules and functions. Documents tested code only; may add a README section or ADR. Not for docs lookup or audits."
effort: low
argument-hint: "[plan-file OR feature-name]"

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." A full audit of unchanged coverage produces nothing to add.

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
Read more
@oliver-kriska
Ships withclaude-elixir-phoenix

Docs: phxagents.dev -- install guides per runtime, the runtime compatibility matrix, all 26 Iron Laws, and a browsable skill and agent catalog. Claude Code is great.

574106 skills37 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
574
Star history of oliver-kriska/claude-elixir-phoenix on GitHub, a chart by star-history.com

Other skills on claude-elixir-phoenix.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about document.

Which coding agents can use document?
document installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.