Generate Release Notes

donnfelker/donnfelker-plugin-marketplace/plugins/generate-release-notes/skills/generate-release-notes

作者 donnfelker15072d7181625b3c42f0b347734ea391a6c22640無授權條款4 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫3 個月前更新

This skill should be used when the user asks to "generate release notes", "generate changelog", "create release notes", "write changelog", "what changed since last release", "prepare release notes", "update changelog", or "summarize changes from git history". Parses conventional commit messages to produce categorized, well-formatted release notes or changelog entries.

AI 產生的概覽

解析符合規範的 git 提交,產生分類整理的發行說明與變更記錄(markdown 格式)。

功能
此技能會讀取 git 日誌歷史,解析 Conventional Commits(feat、fix、docs 等),並將其歸類到功能、錯誤修正、重大變更等章節。它會依提交類型建議 SemVer 版本號升級,並將結果寫入 RELEASE_NOTES.md、CHANGELOG.md 或兩者。隨附的 shell 指令碼負責擷取結構化提交資料,參考檔案提供輸出範本。
適用情境
適用於準備發行時,需要產生發行說明或變更記錄項目,總結自上一個標籤以來或指定提交範圍內的變更。適合遵循 Conventional Commits 規範的程式碼倉庫。
執行需求
需要 git 與 shell 來執行隨附的 scripts/parse-commits.sh 指令碼。它會讀取倉庫的 git 日誌與標籤,並在工作目錄中寫入 markdown 檔案。

Release Notes Generator

Generate release notes and changelogs by parsing conventional commit messages from git log history. Commits following the Conventional Commits specification (feat:, fix:, docs:, etc.) are categorized, grouped, and formatted into professional markdown output.

Workflow

Step 1: Determine Output Type

Ask the user what they need:

  • Release Notes — a single release summary written to RELEASE_NOTES.md
  • Changelog — append to an existing CHANGELOG.md (or create one)
  • Both — generate both files

Step 2: Determine Commit Range

Identify which commits to include. Two approaches:

Since last tag (default): The parser script automatically detects the latest tag and uses <tag>..HEAD when no range is provided. To confirm the range with the user before generating, run git describe --tags --abbrev=0 to display the latest tag.

Custom range: Accept a user-specified range like v1.0.0..v2.0.0 or v1.0.0..HEAD and pass it as the first argument to the parser script.

If no tags exist, ask the user for a range or default to all commits (the script handles this automatically).

Step 3: Parse Commits

Run the parser script to extract structured commit data. The ${CLAUDE_PLUGIN_ROOT} variable is set automatically by Claude Code when the plugin is installed:

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/generate-release-notes/scripts/parse-commits.sh [<range>]

The script outputs one block per commit with fields: COMMIT, TYPE, SCOPE, BREAKING, DESCRIPTION, BODY, FOOTERS.

Step 4: Categorize and Format

Group parsed commits by type into sections using this mapping:

TypeSection Heading
featFeatures
fixBug Fixes
perfPerformance Improvements
refactorCode Refactoring
docsDocumentation
styleStyles
testTests
buildBuild System
ciContinuous Integration
choreChores
revertReverts

Ordering: List sections in the order shown above. Within each section, list entries alphabetically by scope (ungrouped entries last).

Breaking changes: Collect all commits with BREAKING:yes into a dedicated "BREAKING CHANGES" section at the top, regardless of their type. These also appear in their normal type section.

Scope grouping: When multiple commits share a scope, group them under a bold scope label.

Commits with type "other": Collect into an "Other Changes" section at the bottom. These are commits that do not follow the conventional commit format.

Step 5: Determine Version

If the user provides a version number, use it. Otherwise, suggest a version based on SemVer rules:

  • Any BREAKING:yes commit → suggest MAJOR bump
  • Any feat commit → suggest MINOR bump
  • Only fix, docs, style, etc. → suggest PATCH bump

Read the latest tag to determine the current version and calculate the next version. Present the suggestion and let the user confirm or override.

Step 6: Write Output

Release Notes → Write to RELEASE_NOTES.md (overwrite previous content).

Changelog → Prepend new version entry to CHANGELOG.md. If the file does not exist, create it with a header. Preserve all existing entries below the new one.

Consult references/formats.md for the exact output templates.

Step 7: Summary

After writing, display:

  • Version number used
  • Number of commits processed
  • Breakdown by category (e.g., "3 features, 2 bug fixes, 1 breaking change")
  • File(s) written

Handling Edge Cases

No conventional commits found: Warn the user that no parseable commits were found. Offer to list raw commit messages instead.

Mixed conventional and non-conventional: Process conventional commits normally, list non-conventional commits under "Other Changes."

Empty range: If the range produces no commits, inform the user and suggest checking the range.

Monorepo with scopes: When scopes map to packages/modules, offer to group by scope as top-level sections instead of by type.

Additional Resources

Reference Files

For detailed output format templates and examples, consult:

  • references/formats.md — Complete output templates for release notes and changelog, with examples of each section type

Scripts

  • scripts/parse-commits.sh — Parses git log into structured commit data. Accepts an optional range argument. Handles conventional commit parsing, scope extraction, breaking change detection, and footer parsing.

來源與署名

來源:donnfelker/donnfelker-plugin-marketplace位於plugins/generate-release-notes/skills/generate-release-notes提交15072d7

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架