changelog

Use when generating a changelog, release notes, or summarizing what changed between tags, versions, or date ranges.

Changelog Generator

Generate structured changelog from git history.

Arguments

  • /changelog — latest tag to HEAD
  • /changelog v1.0..v2.0 — between tags
  • /changelog --since 2024-01-01 — since date
  • /changelog --output <file> — write to file
  • /changelog --prepend — prepend to existing CHANGELOG.md
  • /changelog --format compact — one-liner per change

Workflow

Step 1: Determine Range

  1. git tag --sort=-version:refname — list recent tags
  2. Default: from latest tag to HEAD
  3. Between tags or since date if specified

Step 2: Collect Commits

git log <range> --pretty=format:"%H|%s|%an|%ad" --date=short

Step 3: Parse & Classify

PrefixSection
feat:Features
fix:Bug Fixes
perf:Performance
refactor:Refactoring
docs:Documentation
test:Tests
chore:Maintenance
BREAKING CHANGEBreaking Changes

Extract scope, PR references (#123), issue references fixes #456.

Step 4: Enrich (optional)

If gh CLI available: fetch PR titles for merge commits, get authors and labels.

Step 5: Generate Output

# Changelog

## [v1.3.0] - 2024-03-15

### Breaking Changes
- **auth**: Remove deprecated OAuth1 support (#234)

### Features
- **api**: Add batch processing endpoint (#220)

### Bug Fixes
- **db**: Fix connection pool leak under load (#228)

Rules

  • Deduplicate identical commit messages
  • Skip merge commits (use PR title instead)
  • If no conventional commits found, fall back to plain list by date
  • Breaking changes always go first
  • One line per change