Claude Tips mascot
Claude Tips & Tricks
Claude Code intermediate

Generate Changelogs Automatically from Git History

Have Claude read your git log and produce a clean, categorized changelog grouped by feature, fix, and breaking change.

Writing changelogs by hand is tedious. Claude can read your git history and produce one in seconds.

One-Liner

git log $(git describe --tags --abbrev=0)..HEAD --oneline | \
  claude -p "Generate a changelog from these commits. Group by: Features, Fixes, Breaking Changes. Use markdown."

In-Session

Read the git log since v2.3.0 and generate a changelog.
Group commits by type. Ignore merge commits and dependency bumps.
Follow the Keep a Changelog format.

Create a Slash Command

Save as .claude/commands/changelog.md:

Read the git log since the last tag. Generate a changelog with:
- **Added** for new features
- **Changed** for changes to existing functionality
- **Fixed** for bug fixes
- **Breaking** for breaking changes

Use the commit messages and, when unclear, read the actual diffs
to determine the correct category. Output in Keep a Changelog format.

Then just type /changelog before any release.

Tip

For better changelogs, use conventional commit messages (feat:, fix:, chore:). Claude parses these more accurately than free-form messages.

Paste into Claude Code
Read the git log since the last tag and generate a categorized changelog with sections for Features, Fixes, and Breaking Changes.