{"slug":"phx-document","title":"phx-document","summary":"'Use when asked to document Elixir code: add or fill in @moduledoc and","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-04T15:14:25.229931Z","repo":{"url":"https://github.com/oliver-kriska/claude-elixir-phoenix","stars":560,"forks":44,"license":"MIT","updatedAt":"2026-10-02T04:11:38Z"},"bodyHtml":"<hr>\n<h2>name: phx-document\ndescription: 'Use when asked to document Elixir code: add or fill in @moduledoc and\n@doc for modules and functions. Documents tested code only; may add a README section\nor ADR. Not for docs lookup or audits.'</h2>\n<h1>Document</h1>\n<p>Generate documentation for newly implemented features.</p>\n<h2>Usage</h2>\n<pre><code>phx-document .claude/plans/magic-link-auth/plan.md\nphx-document magic link authentication\nphx-document  # Auto-detect from recent plan\n</code></pre>\n<h2>Iron Laws</h2>\n<ol>\n<li><strong>Never remove existing documentation</strong> — Existing docs may reflect design intent that isn't obvious from code alone; update rather than replace</li>\n<li><strong>@moduledoc on every public module</strong> — Undocumented modules accumulate quickly and create onboarding friction for new team members</li>\n<li><strong>ADRs capture the \"why\", not the \"what\"</strong> — Code shows what was built; ADRs explain why this approach was chosen over alternatives</li>\n<li><strong>Match @doc to function's public API</strong> — Document parameters, return values, and edge cases; callers shouldn't need to read the implementation</li>\n<li><strong>DO NOT add @doc to untested code</strong> — documentation implies a stable contract; document only after tests confirm the function behaves as described</li>\n</ol>\n<h2>What Gets Documented</h2>\n<table>\n<thead>\n<tr>\n<th>Output</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>@moduledoc</code></td>\n<td>For new modules missing documentation</td>\n</tr>\n<tr>\n<td><code>@doc</code></td>\n<td>For public functions without docs</td>\n</tr>\n<tr>\n<td>README section</td>\n<td>For user-facing features</td>\n</tr>\n<tr>\n<td>ADR</td>\n<td>For significant architectural decisions</td>\n</tr>\n</tbody>\n</table>\n<h2>Workflow</h2>\n<h3>Step 0: Pre-check (avoid no-op runs)</h3>\n<p>Run <code>git diff --name-only HEAD~5 | grep '\\.ex$' | head -20</code> to check for new <code>.ex</code> files.</p>\n<p>If no new <code>.ex</code> files were added (only modifications), skip the full\naudit and report: \"No new modules — documentation coverage unchanged.\"\nA full audit of unchanged coverage produces nothing to add.</p>\n<ol>\n<li><strong>Identify</strong> new modules from recent commits or plan file</li>\n<li><strong>Check</strong> documentation coverage (<code>@moduledoc</code>, <code>@doc</code>)</li>\n<li><strong>Generate</strong> missing docs using templates</li>\n<li><strong>Add</strong> README section if user-facing feature</li>\n<li><strong>Create</strong> ADR if architectural decision was made</li>\n<li><strong>Write</strong> report to <code>.claude/plans/{slug}/reviews/{feature}-docs.md</code></li>\n</ol>\n<h2>When to Generate ADRs</h2>\n<table>\n<thead>\n<tr>\n<th>Trigger</th>\n<th>Create ADR</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>New external dependency</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td>New database table</td>\n<td>Maybe (if schema non-obvious)</td>\n</tr>\n<tr>\n<td>New OTP process</td>\n<td>Yes (explain why process needed)</td>\n</tr>\n<tr>\n<td>New context</td>\n<td>Maybe (if boundaries non-obvious)</td>\n</tr>\n<tr>\n<td>New auth mechanism</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td>Performance optimization</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n<h2>Integration with Workflow</h2>\n<pre><code>phx-plan → phx-work → phx-review\n       ↓\nphx-document  ← YOU ARE HERE (optional, suggested after review passes)\n</code></pre>\n<h2>References</h2>\n<ul>\n<li><code>references/doc-templates.md</code> — @moduledoc, @doc, README, ADR templates</li>\n<li><code>references/output-format.md</code> — Documentation report format</li>\n<li><code>references/doc-best-practices.md</code> — Elixir documentation best practices</li>\n<li><code>references/documentation-patterns.md</code> — Detailed documentation patterns</li>\n</ul>\n","files":[{"path":"references/doc-best-practices.md","sizeBytes":600,"isText":true},{"path":"references/doc-templates.md","sizeBytes":1159,"isText":true},{"path":"references/documentation-patterns.md","sizeBytes":7015,"isText":true},{"path":"references/output-format.md","sizeBytes":803,"isText":true},{"path":"SKILL.md","sizeBytes":2978,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-04T15:16:43.500691Z","sha256":"6813015634C4550A19FFB2050FA41C45A021B773A9EE271696FADCE5081A9A0D","sizeBytes":6215},"review":null,"source":{"repositoryUrl":"https://github.com/oliver-kriska/claude-elixir-phoenix","path":"targets/amp/skills/phx-document","license":"MIT","commit":"9767a82d24ddddad553e85f88efc2869a7fd7d88","subtreeSha":"2F9AF4D36D63CB97FAFBA9B1E857788BC60F085A915AC49062FFE95A2A8F58C3","lastSyncedAt":"2026-10-04T15:14:09.139242Z"},"reviewedAt":"2026-10-04T15:20:37.882926Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/targets/amp/skills/phx-document"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install oliver-kriska-claude-elixir-phoenix@llmmart"},{"target":"git","command":"git clone https://github.com/oliver-kriska/claude-elixir-phoenix.git"}]}