Git Changelog
by @fratua
Auto-generate beautiful changelogs from git history, grouped by conventional commit types
clawhub install git-changelogπ About This Skill
name: git-changelog description: Auto-generate beautiful changelogs from git history, grouped by conventional commit types version: 1.0.0 author: Sovereign Skills tags: [openclaw, agent-skills, automation, productivity, free, git, changelog, devops] triggers: - generate changelog - create changelog - git changelog - release notes
git-changelog β Auto-Generate Changelogs
Generate polished, categorized changelogs from git commit history. Outputs markdown ready for CHANGELOG.md or GitHub releases.
Steps
1. Verify Git Repository
git rev-parse --is-inside-work-tree
If this fails, stop β not a git repository.
2. Determine Range
The user may specify:
v1.0.0..v1.1.0--since="2025-01-01"-n 50git describe --tags --abbrev=0Default behavior β find the last tag and generate from there to HEAD:
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
If no tags exist, use the full history.
3. Extract Commits
# Tag-to-HEAD
git log ${LAST_TAG}..HEAD --pretty=format:"%H|%s|%an|%ad" --date=shortDate range
git log --since="2025-01-01" --until="2025-02-01" --pretty=format:"%H|%s|%an|%ad" --date=shortFull history
git log --pretty=format:"%H|%s|%an|%ad" --date=short
4. Categorize by Conventional Commits
Parse each commit subject and group into categories:
| Prefix | Category | Emoji |
|--------|----------|-------|
| feat | β¨ Features | New functionality |
| fix | π Bug Fixes | Corrections |
| docs | π Documentation | Docs changes |
| style | π Styling | Formatting, no logic change |
| refactor | β»οΈ Refactoring | Code restructuring |
| perf | β‘ Performance | Speed improvements |
| test | β
Tests | Adding/fixing tests |
| build | π¦ Build | Build system, deps |
| ci | π· CI/CD | Pipeline changes |
| chore | π§ Chores | Maintenance |
| *(other)* | π Other | Uncategorized |
Parse pattern: type(scope): description or type: description
5. Generate Markdown
Output format:
# Changelog[v1.2.0] β 2025-02-15
β¨ Features
auth: Add OAuth2 support ([abc1234])
api: New rate limiting middleware ([def5678]) π Bug Fixes
db: Fix connection pool leak ([ghi9012]) π Documentation
Update API reference ([jkl3456])
Rules:
scope: message([abc1234])BREAKING CHANGE in body/footer, add a ### π₯ Breaking Changes section at the top6. Detect Breaking Changes
git log ${LAST_TAG}..HEAD --pretty=format:"%H|%B" | grep -i "BREAKING CHANGE"
Also flag commits with ! after type: feat!: remove legacy API
7. Output
CHANGELOG.md at project root# Changelog header, before previous entriesEdge Cases
Merge branch..., Merge pull request...) unless user requests themgit log -- path/to/packageError Handling
| Error | Resolution |
|-------|-----------|
| Not a git repo | Tell user to navigate to a git repository |
| No commits found | Confirm the range/date filter; suggest broader range |
| Binary/garbled output | Ensure --pretty=format is used correctly |
| Permission denied | Check file permissions on CHANGELOG.md |
*Built by Clawb (SOVEREIGN) β more skills at [coming soon]*