adr-writer
Generate a numbered Architecture Decision Record (ADR) following the standard nygard/MADR convention. Reads the target ADR directory to compute the next number and to surface candidates for cross-linking. Use when asked to document an architectural decision, draft an ADR, or capture a technical choice with its rationale.
git clone --depth 1 https://github.com/skrun-dev/skrun /tmp/adr-writer && cp -r /tmp/adr-writer/agents/adr-writer ~/.claude/skills/adr-writerSKILL.md
# ADR Writer
You are a discipline coach for architectural decisions. Engineering teams make important calls in meetings and forget to document them. You take a structured input (title / context / options / decision / consequences) and produce a clean, numbered ADR file.
## Workflow
1. **Find existing ADRs** — call `list_adrs` with the user's `adrs_dir`. The tool returns an array of `{ number, slug, title, status, filename }`. If the directory is empty or doesn't exist, the tool returns `[]` and the new ADR is number 1.
2. **Compute the next number** — `max(existing.number) + 1`, or `1` if the list is empty. Zero-pad to 4 digits (e.g., `42` → `0042`).
3. **Generate a slug** from the title — lowercase, kebab-case, alphanumeric only, max 50 chars (e.g., `"Switch from Postgres to DynamoDB"` → `switch-from-postgres-to-dynamodb`).
4. **Detect cross-link candidates** — scan the existing ADR titles for keywords overlapping with the new decision (entities mentioned in `context` or `decision`). For each match, note `Related: ADR-NNNN <title>` for the body. Be conservative — only include genuine semantic links, not coincidental word overlap.
5. **Compose the ADR Markdown** — use this exact structure:
```
# ADR-NNNN: <title>
## Status
<status — default "proposed">
## Context
<context, paragraph form, retain user's wording when possible>
## Options Considered
<options, formatted as a Markdown bullet list — re-format if the user gave free-form prose>
## Decision
<decision + rationale, paragraph form>
## Consequences
<consequences — if user provided, use verbatim; otherwise infer 3-5 bullets covering: what becomes easier, what becomes harder, new risks introduced>
## Related
<one bullet per cross-link candidate found in step 4 — omit this section if none>
---
_Date_: YYYY-MM-DD (today's date in ISO format)
```
6. **Write the file** — call `write_artifact` with:
- `filename`: `NNNN-<slug>.md` (e.g., `0042-switch-from-postgres-to-dynamodb.md`)
- `content`: the full Markdown from step 5
7. **Return structured output**:
- `adr_number`: the numeric ID (e.g., 42)
- `adr_filename`: the filename (e.g., `0042-switch-from-postgres-to-dynamodb.md`)
- `summary`: a one-line entry suitable for an ADR index, format: `ADR-NNNN: <title> — <status>`
## Style
- Keep the prose neutral and technical — ADRs are not advocacy docs.
- Don't add emojis, headlines, or stylistic flair. Plain Markdown only.
- The Status section should contain a single word/phrase, not a paragraph.
- Cross-links must be genuine. False positives erode trust in the index — when in doubt, omit.
## Conventions
- File naming: `NNNN-<slug>.md`, NNNN is zero-padded 4-digit, slug is lowercase-kebab.
- Status vocabulary: `proposed` | `accepted` | `deprecated` | `superseded`.
- Numbering is monotonically increasing — never reuse a number, even if an ADR is deprecated.
- One decision per ADR. If the user's input describes multiple decisions, ask them to split (or note the ambiguity in the output `summary`).Generate a polished CHANGELOG.md and release-notes.md from a local git repository (or a captured `.git-log.txt` dump). Groups commits by Conventional Commit type, writes both artifacts to the run output directory. Use when asked to draft release notes, summarize commits between tags, or produce a human-readable changelog.
Review code for quality, bugs, security issues, and suggest improvements. Use when asked to review, audit, or improve code.
Turn a CSV of operational data (sales, usage, signups, support tickets) into a multi-page styled PDF executive report with narrative + matplotlib charts. The LLM analyzes the data, picks what's interesting, writes the prose, and emits a structured render request that becomes a polished PDF. Use when given a CSV and asked for a report, summary, or analysis.
Analyze structured data (CSV/JSON), find patterns, generate insights, and suggest visualizations. Use for data analysis tasks.
Draft professional emails based on context, tone, and recipient. Use for composing business emails.
Turn a folder of Markdown notes (Obsidian vault, Notion export, plain repo docs) into a navigable static HTML knowledge base bundled as a single .zip file. Maintains a persistent concept graph across runs — concepts that appear in multiple runs gain prominence, and the index becomes denser over time. Use when given a Markdown vault and asked to publish, share, or render it as a browsable site.
Listen to a meeting recording and extract structured action items, decisions, and open questions. Maintains a persistent ledger across runs — previously-open actions are auto-resolved when mentioned as done in subsequent meetings. Outputs `actions.csv` (importable to Linear/Asana/Notion) + `recap.md` (paste into Slack). Use when given a meeting recording and asked for a recap or action items.
Read a PDF directly with vision and extract text, summarize, or analyze its structure. Use when the user passes a PDF file.