changelog
npx skills add https://github.com/costa-marcello/skillkit --skill changelog
Agent 安装分布
Skill 文档
Changelog
Generates human-readable changelogs from git commit history following Keep a Changelog format and Conventional Commits conventions.
Capabilities
- Generate changelog from git commits (date range, tag range, or since last release)
- Update existing changelog by adding new entries to the Unreleased section
- Create new changelog with proper structure and initial content
- Translate commits from developer language to user-friendly descriptions
Auto-Detection Workflow
When invoked without arguments, automatically detect and execute:
/changelog (no args)
|
+-- Check: Does CHANGELOG.md exist?
| |
| +-- NO --> Create New Changelog (full git history)
| |
| +-- YES --> Check: Are there new commits since last entry?
| |
| +-- YES --> Update Unreleased section
| +-- NO --> Report "Changelog is up to date"
|
/changelog [version] --> Convert Unreleased to version release
/changelog [date range] --> Generate entries for specific period
Default behavior requires zero input â just run /changelog and the right thing happens.
Creating a New Changelog
- Verify no CHANGELOG.md exists at project root
- Detect git remote URL for footer links:
git remote get-url origin - Get all tags:
git tag --sort=-v:refname - Analyze git history to gather commits
- Categorize commits using Conventional Commits mapping (see references/changelog_format.md)
- Generate CHANGELOG.md with:
- Header explaining the format
- Unreleased section with categorized changes
- Version sections for each existing tag (if any)
- Footer links to GitHub comparisons
- Verify: Count entries match expected categorized commits
- Write CHANGELOG.md to project root
Updating an Existing Changelog
- Read existing CHANGELOG.md
- Identify last documented version from existing content (look for
## [x.y.z]headers) - Get corresponding tag:
git tag --sort=-v:refname | head -1 - Gather commits since that point:
git log --oneline <last-tag>..HEAD - If no new commits: report “Changelog is up to date” and exit
- Categorize new commits using Conventional Commits mapping
- Add entries to Unreleased section (create section if missing)
- Preserve all existing content exactly
- Verify: New entry count matches new commit count (minus filtered)
- Write updated CHANGELOG.md
Generating a Release Entry
- Gather commits for the release range
- Group by change type (Added, Changed, Fixed, etc.)
- Filter noise (merge commits, CI/CD changes, refactors unless significant)
- Translate technical commits to user-friendly descriptions
- Format as new version section with ISO 8601 date
Git Analysis Commands
# All commits since last tag
git log --oneline $(git describe --tags --abbrev=0 2>/dev/null || echo "")..HEAD
# Commits between tags
git log --oneline v1.0.0..v1.1.0
# Commits in date range
git log --oneline --since="2024-01-01" --until="2024-01-31"
# Get current tags
git tag --sort=-v:refname | head -10
Commit Categorization
Map Conventional Commits prefixes to Keep a Changelog sections. See references/changelog_format.md for the full type-to-section mapping, writing style guidelines, and anti-patterns.
Quick reference:
| Commit Prefix | Changelog Section |
|---|---|
feat: |
Added |
fix: |
Fixed |
refactor: (user-visible) |
Changed |
security: |
Security |
docs:, test:, ci:, chore: |
Filter out |
Always include: features, user-facing bug fixes, breaking changes, security fixes. Always filter: merge commits, internal refactors, test changes, CI config, typos.
Translate technical commits to user-friendly language:
fix(auth): resolve JWT expiry edge case-> “Fixed session timeout issues for long-running sessions”feat(api): add /users endpoint-> “Added user management API endpoints”
Output Format
Generate changelog following this structure:
# Changelog
All notable changes to this project will be documented in this file.
## [Unreleased]
### Added
- New feature description
### Changed
- Modified behavior description
### Fixed
- Bug fix description
## [1.0.0] - YYYY-MM-DD
### Added
- Initial release features
[Unreleased]: https://github.com/owner/repo/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/owner/repo/releases/tag/v1.0.0
Examples
References
| File | Content |
|---|---|
references/changelog_format.md |
Full Keep a Changelog spec, Conventional Commits mapping, writing style guide, anti-patterns, complete example |