|
| 1 | +--- |
| 2 | +name: write-release-notes |
| 3 | +description: Generate engaging, high-energy release notes for a given version tag. Fetches the release from GitHub, retrieves every linked PR's title and description, then synthesizes all changes into a polished, user-facing release note with an enthusiastic tone. Use when the user asks to write, generate, or create release notes for a version (e.g. "write release notes for v1.32.0", "generate release notes for the latest release", "create changelog for v2.0"). |
| 4 | +--- |
| 5 | + |
| 6 | +# Write Release Notes |
| 7 | + |
| 8 | +Generate compelling, high-energy release notes by pulling live data from GitHub and synthesizing every PR into a cohesive narrative. |
| 9 | + |
| 10 | +## Workflow |
| 11 | + |
| 12 | +### 1. Fetch Release Data |
| 13 | + |
| 14 | +Run the bundled script to pull the release metadata and all linked PR details in one shot: |
| 15 | + |
| 16 | +```bash |
| 17 | +bash .forge/skills/write-release-notes/scripts/fetch-release-data.sh <version> [owner/repo] |
| 18 | +``` |
| 19 | + |
| 20 | +- `<version>`: The release tag (e.g. `v1.32.0`) |
| 21 | +- `[owner/repo]`: Optional. Defaults to the current repo detected via `gh repo view`. |
| 22 | + |
| 23 | +The script outputs two sections: |
| 24 | +- `### RELEASE METADATA ###` — tag name, publish date, release name, raw body |
| 25 | +- `### PR DETAILS ###` — one JSON object per PR with: `number`, `title`, `body`, `labels`, `author`, `mergedAt`, `url` |
| 26 | + |
| 27 | +### 2. Categorize Changes |
| 28 | + |
| 29 | +Group PRs by their conventional commit prefix or label: |
| 30 | + |
| 31 | +| Category | Prefixes / Labels | |
| 32 | +|---|---| |
| 33 | +| Features | `feat`, `type: feature` | |
| 34 | +| Bug Fixes | `fix`, `type: fix` | |
| 35 | +| Performance | `perf` | |
| 36 | +| Refactors | `refactor` | |
| 37 | +| Maintenance | `chore`, `docs`, `ci`, `build`, `deps` | |
| 38 | + |
| 39 | +Dependency bumps (e.g. Dependabot PRs) go into Maintenance. Skip PRs with `error: "not found"`. |
| 40 | + |
| 41 | +### 3. Write the Release Notes |
| 42 | + |
| 43 | +Produce a Markdown document with the following structure. Keep the tone **exciting, punchy, and developer-friendly** — celebrate wins, highlight impact, and make readers feel the momentum. |
| 44 | + |
| 45 | +```markdown |
| 46 | +# [Product Name] [Version] — [Punchy Tagline] |
| 47 | + |
| 48 | +> One-sentence hook that captures the spirit of this release. |
| 49 | +
|
| 50 | +## What's New |
| 51 | + |
| 52 | +[2-4 sentence narrative that weaves together the biggest features and fixes. |
| 53 | +Speak to impact, not implementation. Use active voice. Be enthusiastic.] |
| 54 | + |
| 55 | +## Highlights |
| 56 | + |
| 57 | +### [Feature/Fix Category] |
| 58 | +**[PR Title rephrased as user benefit]** ([#NNN](url)) |
| 59 | +[1-2 sentences expanding on the PR description. Focus on what the user gains. |
| 60 | +If the PR body has useful context, distill it. If empty, infer from the title.] |
| 61 | + |
| 62 | +[Repeat for each significant PR — skip pure chores/dep bumps unless noteworthy] |
| 63 | + |
| 64 | +## Bug Fixes & Reliability |
| 65 | + |
| 66 | +[Bullet list of fixes, each with a brief impact statement and PR link] |
| 67 | + |
| 68 | +## Under the Hood |
| 69 | + |
| 70 | +[Brief paragraph or bullet list covering refactors, maintenance, and dep updates — |
| 71 | +keep it light, acknowledge the work without boring the reader] |
| 72 | + |
| 73 | +## Contributors |
| 74 | + |
| 75 | +A huge thank you to everyone who made this release happen: [list @handles] |
| 76 | + |
| 77 | +--- |
| 78 | +**Full changelog**: [GitHub Release link] |
| 79 | +``` |
| 80 | + |
| 81 | +### 4. Tone & Style Guidelines |
| 82 | + |
| 83 | +- **Lead with value**: "You can now..." beats "We added..." |
| 84 | +- **Be specific**: Name the feature, not just the category |
| 85 | +- **Use energy words**: "blazing", "seamless", "rock-solid", "powerful", "finally" |
| 86 | +- **Short paragraphs**: Max 3 sentences per block |
| 87 | +- **Skip internal jargon**: Translate crate names and internal concepts into plain language |
| 88 | +- **Celebrate contributors**: Name them enthusiastically |
| 89 | +- **Tagline formula**: `[Version] — [Adjective] [Theme]` (e.g. "v1.32.0 — Smarter Config, Smoother Workflows") |
| 90 | + |
| 91 | +### 5. Output |
| 92 | + |
| 93 | +Print the final release notes directly in the chat. Do not write to a file unless the user explicitly asks. |
| 94 | + |
| 95 | +## Notes |
| 96 | + |
| 97 | +- The script handles ANSI color codes injected by `gh` CLI automatically. |
| 98 | +- PRs not found (closed without merge, private, etc.) are silently skipped. |
| 99 | +- If the release has no linked PRs in its body, fall back to listing commits between tags: |
| 100 | + ```bash |
| 101 | + gh api repos/<owner>/<repo>/compare/<prev_tag>...<version> --jq '.commits[].commit.message' |
| 102 | + ``` |
0 commit comments