/install git-changelog
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:
- Tag-to-tag:
v1.0.0..v1.1.0 - Since date:
--since="2025-01-01" - Last N commits:
-n 50 - Since last tag: auto-detect with
git describe --tags --abbrev=0
Default 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=short
# Date range
git log --since="2025-01-01" --until="2025-02-01" --pretty=format:"%H|%s|%an|%ad" --date=short
# Full 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:
- Include scope in bold if present:
**scope**: message - Include short hash as reference:
([abc1234]) - Sort categories: Features → Fixes → everything else
- Omit empty categories
- If commits include
BREAKING CHANGEin body/footer, add a### 💥 Breaking Changessection at the top
6. 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
- Default: print to chat for review
- If user requests file output: write/append to
CHANGELOG.mdat project root - When prepending to existing CHANGELOG.md, insert after the
# Changelogheader, before previous entries
Edge Cases
- No conventional commits: Fall back to listing all commits as "Other"
- Merge commits: Skip merge commits (
Merge branch...,Merge pull request...) unless user requests them - Monorepo: If user specifies a path, use
git log -- path/to/package - No tags: Use full history or ask user for a date range
- Empty range: Report "No commits found in the specified range"
Error 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]
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install git-changelog - 安装完成后,直接呼叫该 Skill 的名称或使用
/git-changelog触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Git Changelog 是什么?
Auto-generate beautiful changelogs from git history, grouped by conventional commit types. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 982 次。
如何安装 Git Changelog?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install git-changelog」即可一键安装,无需额外配置。
Git Changelog 是免费的吗?
是的,Git Changelog 完全免费(开源免费),可自由下载、安装和使用。
Git Changelog 支持哪些平台?
Git Changelog 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Git Changelog?
由 Fratua(@fratua)开发并维护,当前版本 v1.0.0。