generating-release-notes
GitHub根据合并的PR自动生成发布说明,通过插件适配不同仓库格式,按阶段解析版本范围、收集PR信息及贡献者。
Trigger Scenarios
Install
npx skills add karmada-io/karmada --skill generating-release-notes -g -y
SKILL.md
Frontmatter
{
"name": "generating-release-notes",
"description": "Use when preparing changelogs or release notes from merged pull requests for a patch, minor, or preview release.",
"argument-hint": "Target release version, for example v1.14.5 or v1.15.0-rc.0"
}
Generating Release Notes
Overview
Generate release notes from merged pull requests. Complete each gate in order; do not draft content until the target version, comparison range, and format plugin are resolved.
Inputs
Require a target version. If it is absent or ambiguous, ask for it and stop. Do not infer "the next release."
Derive these values only after the target is known:
- Release type: patch, minor, or preview.
- Previous version or preview tag.
- Comparison branch.
- Output changelog path.
The selected format plugin defines repository-specific derivation rules.
Select a Format Plugin
- Determine the Git repository root directory name with
basename "$(git rev-parse --show-toplevel)". - Inspect Markdown files under references. Select a plugin whose
Repository Matchincludes that directory name. - If exactly one plugin matches, load it and follow it as authoritative.
- If multiple plugins match, ask the user to choose.
- If no plugin matches, stop and report the directory name. Ask for a new repository format plugin. Never silently use another repository's format.
Repository format plugins are pluggable. Add <repository>-release-note-format.md under references/ with these sections:
Repository MatchUpstream Data SourceVersion ResolutionOutput LocationDocument StructureEntry Format and ClassificationLanguage and StyleValidation
Mandatory Workflow
Gate 1: Resolve the Release Range
- Classify the target as patch, minor, or preview using the selected plugin.
- Resolve the previous tag and head branch using the plugin's rules.
- Verify the target, previous tag, branch, and output path against the user-visible task context.
- Stop on any ambiguity. Do not substitute a different tag or branch without confirmation.
Do not continue until Gate 1 passes.
Gate 2: Collect Merged Pull Requests
-
Verify that
python3and the bundled fetch_pr_info.py exist. -
Verify that
GITHUB_TOKENis set, but do not verify its scopes. If it is not set, ask the user to set a token with thepublic_reposcope in their environment. Never ask the user to send a token through chat. -
From the repository root, run the bundled script with the base tag and head branch resolved in Gate 1 and the
owner/repositoryvalue declared under the plugin'sUpstream Data Source:python3 .claude/skills/generating-release-notes/scripts/fetch_pr_info.py <base-tag> <head-branch> --repo <owner/repository> -
Use only the
SUMMARY OF PRS WITH USER-FACING CHANGESsection. Ignore diagnostic and non-user-facing PR output. -
Preserve PR number, title, author, kind, and every user-facing change. Split multiple user-facing changes into separate candidate entries.
Do not continue if collection fails or credentials are invalid.
Gate 3: Collect Contributors
Run this gate only when the selected format plugin requires a Contributors section.
-
Reuse the same base tag and head branch resolved in Gate 1. Contributor collection and PR collection must use the same comparison range.
-
From the repository root, run the bundled fetch_contributors.sh with the owner and repository declared under
Upstream Data Source:.claude/skills/generating-release-notes/scripts/fetch_contributors.sh <owner> <repository> <base-tag> <head-branch> -
Treat the output as the GitHub authors of commits merged in that comparison range.
-
Keep unique GitHub handles sorted alphabetically.
Do not continue if contributor collection fails.
Gate 4: Classify and Draft
- Use the PR kind supplied by the collection script as the primary classification signal.
- Apply the plugin's category precedence rules.
- Rewrite each entry into the plugin's required tense and entry syntax without changing its technical meaning. Make the leading verb and sentence framing match the final category; moving an entry between categories requires reviewing and, when necessary, rewriting its wording.
- Group entries as required by the plugin.
- Build the complete release section using the structure for the target release type.
- Add the commit authors collected in Gate 3 when the release requires a Contributors section.
Do not invent user-facing changes or infer undocumented behavior from a PR title alone.
Gate 5: Update the Changelog
- Read the existing changelog before editing.
- Insert the new release in the ordering required by the plugin.
- Preserve existing release sections and unrelated user changes.
- Run the plugin's TOC or formatting command after content is final.
Gate 6: Validate
Verify the repository-independent requirements:
- No user-facing change is duplicated or omitted.
- Existing changelog content and unrelated user changes are preserved.
Run every check in the selected plugin's Validation section. Fix all failures before finishing.
Gate 7: Improve this skill
After the release-note generation is done, review what you learned. If you found something that would help future release-note runs — a new failure pattern, a better command, a log location not listed here, or a wrong assumption in this document — propose an update to this skill file:
- Show the user the proposed change and let them decide whether to apply it.
- Do not commit the change yourself.
Common Failures
| Failure | Required response |
|---|---|
| Target version is missing | Ask for it; do not guess. |
| No format plugin matches | Stop and request a plugin. |
| PR or contributor collection fails | Report the error and stop; do not invent or substitute data. |
Version History
- aea7b9f Current 2026-09-03 07:37


