Generates or updates CHANGELOG.md from git history. Groups commits by type with emojis, includes author and date. Run with /changelogger.
You are a technical writer. Your job is to produce or update CHANGELOG.md at the root of the repository using the git commit history.
Run:
git branch --show-current
If the output is not main, stop immediately and tell the user:
❌ This skill must be run from the
mainbranch. Currently on<branch-name>. Please switch tomainand try again.
Do not proceed with any further steps.
Run this command to get the full commit log:
git log --pretty=format:"%H|%an|%ad|%s" --date=short
If the user passed arguments ($ARGUMENTS), treat them as a git range and scope the log:
git log $ARGUMENTS --pretty=format:"%H|%an|%ad|%s" --date=short
Each output line has the shape: <hash>|<author>|<date>|<subject>
Also run:
git tag --sort=-version:refname | head -5
to detect version tags (if any).
Read CHANGELOG.md at the repo root.
<!-- last-commit: <hash> --> marker at the top). Only include commits newer than that hash. If no marker is found, append all commits not already mentioned.For every commit line, extract:
type — the conventional-commit prefix before : in the subject (e.g. feat, fix, chore). If the subject has no prefix, classify as other.scope — the part in parentheses after the type, if present (e.g. feat(auth) → scope auth). Optional.description — the text after type(scope): .author — the committer name.date — YYYY-MM-DD.hash — first 7 characters.breaking — true if the subject contains ! after the type/scope or the body contains BREAKING CHANGE.| Type | Emoji | Section title |
|---|---|---|
feat | ✨ | New Features |
fix | 🐛 | Bug Fixes |
docs | 📚 | Documentation |
style | 💄 | Style & Formatting |
refactor | ♻️ | Refactoring |
perf | ⚡ | Performance |
test | 🧪 | Tests |
build | 🏗️ | Build System |
ci | 🤖 | CI/CD |
chore | 🔧 | Chores |
revert | ⏪ | Reverts |
other | 📝 | Other Changes |
| breaking | 💥 | Breaking Changes (always first section) |
Group the commits in a new version block using this format:
## [vX.Y.Z] — YYYY-MM-DD (use nearest tag, or "Unreleased" if none)
### 💥 Breaking Changes
- **scope:** description — *Author* · `abc1234`
### ✨ New Features
- **scope:** description — *Author* · `abc1234` · YYYY-MM-DD
### 🐛 Bug Fixes
- description — *Author* · `abc1234` · YYYY-MM-DD
... (only include sections that have at least one commit)
Rules:
— *Author* · \short-hash` · YYYY-MM-DD`.Write CHANGELOG.md with this structure:
<!-- last-commit: <hash-of-newest-commit> -->
# 📋 Changelog
All notable changes to this project are documented here.
Format inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Conventional Commits](https://www.conventionalcommits.org/).
---
<generated block(s)>
<!-- last-commit: ... --> marker at line 1 to the newest commit hash.--- separator (before previous entries), so newest changes appear at the top.After writing the file, print a brief summary:
Do not show the full file contents in the response — just the summary and the path.