GitHub Release Note
Goal
Generate release notes following the project's standard, using only real project
information. Compare the current version against the previous version.
Inputs you must collect before starting
- Project (short name)
- New version (e.g.: v2.4.0)
- Comparison base (e.g.: v2.3.1)
- Repository URL (if you cannot infer it)
If the user does not provide the comparison base, use the tag immediately before the
new version. If there is no previous tag, use v0.0.0. If the user does not provide the
new version, auto-detect it by running step 0 (git tag discovery), then show the
detected latest tag to the user and confirm before proceeding.
[!IMPORTANT]
Never trust tag values remembered from earlier in the session or from prior
conversations. Tags can be created, deleted, or pushed at any moment — including
mid-session. Step 0 is mandatory on every invocation, even if you already saw
the "latest tag" minutes ago. Treat any tag value not freshly read from git in
this turn as unknown.
Procedure
Discover real tags first (mandatory, always re-run, hard gate) — before
assuming any version, run these commands and show their full output to the
user:
git remote -v
git fetch --tags --force --prune origin 2>&1
git tag --sort=-version:refname | head -10
git describe --tags --abbrev=0 2>/dev/null || echo "(no local tags)"
gh release view --json tagName,name,publishedAt 2>&1 || echo "(gh release view failed)"
gh release list --limit 5 2>&1 || echo "(gh release list failed)"
Mandatory cross-checks:
a. Fetch must succeed. If git fetch prints any error (auth, network, no
remote), STOP and report the exact error to the user. Do not continue with
stale local tags unless the user explicitly says "use local only".
b. Compare local vs. remote. If gh release view returns a tag that is
newer than git tag --sort=-version:refname | head -1, the local clone is
out of date even after fetch — STOP and tell the user the remote latest
release tag verbatim. Ask whether they want to (i) pull the tag and retry,
or (ii) generate notes for a different range.
c. Hard assertion on the chosen new version. Whatever version you are
about to use as <NEW> MUST appear in the output of
git tag --sort=-version:refname from this turn. If it does not appear,
STOP — do not run any git rev-list, git log, git diff --stat, or
validation commands against that version. Tell the user the tag is missing
locally and list the tags that DO exist.
d. Forbidden inference sources for <NEW>. Do not pick the new version
from any of these — they are not source of truth:
- The
v2.4.0 / v2.3.1 examples in this skill file (SKILL.md, EXAMPLE.md).
- Filenames of existing
release-v*.md files in the working directory.
- Versions in
package.json, Cargo.toml, pyproject.toml, go.mod.
- Tag values remembered from earlier in the session or prior conversations.
The only authoritative sources are:
git tag output (post-fetch) and
gh release output, both produced in the current turn.
e. Always print and confirm. After running the commands, print this block
verbatim and wait for explicit user confirmation before continuing:
Detected:
- Local latest tag: <from git tag>
- Remote latest tag: <from gh release view, or "unknown">
- Proposed NEW: <value>
- Proposed BASE: <value>
Confirm to proceed (yes / change).
Also look for the most recent release-v*.md file in the current directory
and detect the language it was written in (for language detection only, per
the Language rule below). The release-note filename is not a source of
truth for the latest tag.
Validate that the tags or commits exist in the repository.
Collect range metrics: commits, files changed, lines added and removed.
Read commits and relevant changes, grouping by topic.
Build the final text with an executive summary and sections: New Features, Performance, Refactors, Bug Fixes, Security, Tests, Infrastructure.
If there are relevant dependency changes, list them in a table with final versions.
List documentation changes (files in docs/ or equivalent).
Include contributors extracted from git log.
Generate a compare link in GitHub format: /compare/<BASE>...<NEW>.
Write the final release note to a file named release-<NEW>.md in the current
directory (e.g.: release-v2.4.0.md). Use the Write tool to create the file.
Constraints
- Do not invent features, metrics, or numbers.
- If there is no evidence in git, do not mention it.
Language rule
- Detect the language of the most recent
release-v*.md file found in the
current directory. Write all descriptive content (summaries, bullet text,
table values, contributor lines) in that same language.
- If no previous release file exists, default to English.
- Section titles and topic headings (e.g.
Executive summary, New Features,
Bug Fixes, Performance, Refactors, Security, Tests, Infrastructure,
Dependencies, Documentation, Contributors, Breaking changes) must always
remain in English, regardless of the content language.
Output format
Follow exactly the template in EXAMPLE.md (same directory as this skill), adapting
all content to the current project range.
Adaptation rules:
- If a section has no content in the range (e.g.: no Security changes), omit it
entirely — do not include an empty section.
- Keep the section order as shown in the example.
- Replace the fictional project with the real project name.
- Replace fictional metrics with the real metrics collected in step 2 of the
procedure.
- Use the same writing style: user-centered language, concise bullets, concrete
numbers where available.
Example request
"Create release notes for nexus-api v2.4.0 comparing with v2.3.1"
1---2name: github-release-note3description: Generate GitHub Release notes / changelog from tag range. Triggers: 'release notes', 'changelog', 'version notes'.4---56# GitHub Release Note78## Goal910Generate release notes following the project's standard, using only real project11information. Compare the current version against the previous version.1213## Inputs you must collect before starting1415- Project (short name)16- New version (e.g.: v2.4.0)17- Comparison base (e.g.: v2.3.1)18- Repository URL (if you cannot infer it)1920**If the user does not provide the comparison base, use the tag immediately before the21new version. If there is no previous tag, use v0.0.0. If the user does not provide the22new version, auto-detect it by running step 0 (git tag discovery), then show the23detected latest tag to the user and confirm before proceeding.**2425> [!IMPORTANT]26> **Never trust tag values remembered from earlier in the session or from prior27> conversations.** Tags can be created, deleted, or pushed at any moment — including28> mid-session. Step 0 is mandatory on **every** invocation, even if you already saw29> the "latest tag" minutes ago. Treat any tag value not freshly read from `git` in30> this turn as unknown.3132## Procedure33340. **Discover real tags first (mandatory, always re-run, hard gate)** — before35 assuming any version, run these commands **and show their full output to the36 user**:3738 ```39 git remote -v40 git fetch --tags --force --prune origin 2>&141 git tag --sort=-version:refname | head -1042 git describe --tags --abbrev=0 2>/dev/null || echo "(no local tags)"43 gh release view --json tagName,name,publishedAt 2>&1 || echo "(gh release view failed)"44 gh release list --limit 5 2>&1 || echo "(gh release list failed)"45 ```4647 **Mandatory cross-checks:**4849 a. **Fetch must succeed.** If `git fetch` prints any error (auth, network, no50 remote), STOP and report the exact error to the user. Do not continue with51 stale local tags unless the user explicitly says "use local only".5253 b. **Compare local vs. remote.** If `gh release view` returns a tag that is54 newer than `git tag --sort=-version:refname | head -1`, the local clone is55 out of date even after fetch — STOP and tell the user the remote latest56 release tag verbatim. Ask whether they want to (i) pull the tag and retry,57 or (ii) generate notes for a different range.5859 c. **Hard assertion on the chosen new version.** Whatever version you are60 about to use as `<NEW>` MUST appear in the output of61 `git tag --sort=-version:refname` from this turn. If it does not appear,62 STOP — do not run any `git rev-list`, `git log`, `git diff --stat`, or63 validation commands against that version. Tell the user the tag is missing64 locally and list the tags that DO exist.6566 d. **Forbidden inference sources for `<NEW>`.** Do not pick the new version67 from any of these — they are not source of truth:68 - The `v2.4.0` / `v2.3.1` examples in this skill file (`SKILL.md`, `EXAMPLE.md`).69 - Filenames of existing `release-v*.md` files in the working directory.70 - Versions in `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`.71 - Tag values remembered from earlier in the session or prior conversations.72 The only authoritative sources are: `git tag` output (post-fetch) and73 `gh release` output, both produced in the current turn.7475 e. **Always print and confirm.** After running the commands, print this block76 verbatim and wait for explicit user confirmation before continuing:7778 ```79 Detected:80 - Local latest tag: <from git tag>81 - Remote latest tag: <from gh release view, or "unknown">82 - Proposed NEW: <value>83 - Proposed BASE: <value>84 Confirm to proceed (yes / change).85 ```8687 Also look for the most recent `release-v*.md` file in the current directory88 and detect the language it was written in (for language detection only, per89 the Language rule below). The release-note filename is **not** a source of90 truth for the latest tag.91921. Validate that the tags or commits exist in the repository.932. Collect range metrics: commits, files changed, lines added and removed.943. Read commits and relevant changes, grouping by topic.954. Build the final text with an executive summary and sections: New Features, Performance, Refactors, Bug Fixes, Security, Tests, Infrastructure.965. If there are relevant dependency changes, list them in a table with final versions.976. List documentation changes (files in docs/ or equivalent).987. Include contributors extracted from git log.998. Generate a compare link in GitHub format: `/compare/<BASE>...<NEW>`.1009. Write the final release note to a file named `release-<NEW>.md` in the current101 directory (e.g.: `release-v2.4.0.md`). Use the Write tool to create the file.102103## Constraints104105- Do not invent features, metrics, or numbers.106- If there is no evidence in git, do not mention it.107108## Language rule109110- Detect the language of the most recent `release-v*.md` file found in the111 current directory. Write all descriptive content (summaries, bullet text,112 table values, contributor lines) in that same language.113- If no previous release file exists, default to English.114- **Section titles and topic headings** (e.g. `Executive summary`, `New Features`,115 `Bug Fixes`, `Performance`, `Refactors`, `Security`, `Tests`, `Infrastructure`,116 `Dependencies`, `Documentation`, `Contributors`, `Breaking changes`) must always117 remain in English, regardless of the content language.118119## Output format120121Follow exactly the template in `EXAMPLE.md` (same directory as this skill), adapting122all content to the current project range.123124Adaptation rules:125126- If a section has no content in the range (e.g.: no Security changes), **omit it**127 entirely — do not include an empty section.128- Keep the section order as shown in the example.129- Replace the fictional project with the real project name.130- Replace fictional metrics with the real metrics collected in step 2 of the131 procedure.132- Use the same writing style: user-centered language, concise bullets, concrete133 numbers where available.134135## Example request136137"Create release notes for nexus-api v2.4.0 comparing with v2.3.1"