Documentation v1.0.2

git-changelog-git-changelog

Generate changelogs and release notes from git commit history with conventional commit parsing.

git-changelog 更新于 2026-11-23 1 浏览
下载 SKILL

技能说明

Generate changelogs and release notes from git commit history with conventional commit parsing.

使用场景

Auto-generate changelogs from git commit history.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/git-changelog-git-changelog
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 17 kB
SKILL.md text/markdown
---
description: Generate changelogs and release notes from git commit history with conventional commit parsing.
---

# Git Changelog

Auto-generate changelogs from git commit history.

**Use when** creating release notes, changelogs, or summarizing git history between versions.

## Requirements

- Git repository with commit history
- No API keys needed

## Instructions

1. **Detect version range**:
   ```bash
   # Latest tag
   git tag --sort=-version:refname | head -1
   # Commits since last tag
   git log $(git describe --tags --abbrev=0)..HEAD --oneline
   # If no tags: last 50 commits
   git log -50 --oneline
   ```

2. **Fetch commit history**:
   ```bash
   git log <range> --pretty=format:"%H|%s|%an|%ai" --no-merges
   ```

3. **Parse and categorize** using Conventional Commits:
   | Prefix | Category |
   |--------|----------|
   | `feat:` | ✨ Features |
   | `fix:` | 🐛 Bug Fixes |
   | `docs:` | 📝 Documentation |
   | `refactor:` | ♻️ Refactoring |
   | `perf:` | ⚡ Performance |
   | `test:` | ✅ Tests |
   | `chore:` | 🔧 Chores |
   | `BREAKING CHANGE` | 💥 Breaking Changes |

   Non-conventional commits go under **📦 Other Changes**.

4. **Generate commit links** if remote exists:
   ```bash
   git remote get-url origin  # → extract GitHub/GitLab URL
   # Link format: [abc1234](https://github.com/user/repo/commit/abc1234)
   ```

5. **Output format**:
   ```markdown
   # Changelog

   ## [1.2.0] — 2025-01-15

   ### 💥 Breaking Changes
   - Removed deprecated `oldAPI()` method ([abc1234])

   ### ✨ Features
   - Add user authentication flow ([def5678])

   ### 🐛 Bug Fixes
   - Fix memory leak in connection pool ([ghi9012])
   ```

6. **Write to file** if requested: append to top of `CHANGELOG.md` (preserve existing content).

## Edge Cases

- **No conventional commits**: Group by date instead, use full commit messages.
- **Monorepo**: Filter by path with `git log -- path/to/package`.
- **Custom date range**: `git log --since="2025-01-01" --until="2025-02-01"`.
- **Empty range**: Report "No changes since last release."
- **Squash merges**: Check `--first-parent` for cleaner history.

## Troubleshooting

- `fatal: No names found`: No tags exist — fall back to commit count.
- Garbled author names: Check `git config` encoding settings.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。