Skip to content
Skills Library
Programming · Writing

phx-document

/phx-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.

Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author 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.

How it works

  1. Usage
  2. Iron Laws
  3. What Gets Documented
  4. Workflow
  5. When to Generate ADRs
  6. Integration with Workflow
  7. References
Original SKILL.md headings · 73 lines, 394 words
SKILL.md preview
---
name: phx-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.'
---

# 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

```text
phx-plan → phx-work → phx-review
       ↓
phx-document  ← YOU ARE HERE (optional, suggested after review passes)
```

## References

- `references/doc-templates.md` — @moduledoc, @doc, README, ADR templates
- `references/output-format.md` — Documentation report format
- `references/doc-best-practices.md` — Elixir documentation best practices
- `references/documentation-patterns.md` — Detailed documentation patterns
Files in this package (5)
  • SKILL.md 3 KB
  • references/doc-best-practices.md 1 KB
  • references/doc-templates.md 1 KB
  • references/documentation-patterns.md 7 KB
  • references/output-format.md 1 KB

Versions

RepositoryScoreLicence
This page · oliver-kriska/claude-elixir-phoenix100MIT
oliver-kriska/claude-elixir-phoenix100MIT
oliver-kriska/claude-elixir-phoenix100MIT

Database snapshot: 13.11.2026 · package version c18f6d5c5131 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100document
    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.
  • 100elixir-writing-docs
    Guides writing Elixir documentation with @moduledoc, @doc, @typedoc, doctests, cross-references, and metadata. Use when adding or improving documentation in .ex files.
  • 100elixir-docs-review
    Reviews Elixir documentation for completeness, quality, and ExDoc best practices. Use when auditing @moduledoc, @doc, @spec coverage, doctest correctness, and cross-reference usage in .ex files.
  • 100phx-help
    Recommend the right $elixir-phoenix:phx-* workflow. Use when choosing a plugin skill, not for Codex /help.
  • 90doc-writer-readme
    Authors or updates a project README — overview, quick-start, installation, usage, badges, contributing pointer, license section. Reads existing README conventions and repo type before writing. Pulled by the `doc-writer` specialist. TRIGGER: \"write a README for this project\",…
  • 100docs-from-code
    Generates and updates README.md and API reference docs by reading your codebase's functions, routes, types, schemas, and architecture. Uses graphify to build a knowledge graph first, then writes accurate docs from it. Use when asked to write docs, generate a README, document an…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.