changelog-updater | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / changelog-updater

changelog-updater

maintained by edri2or-commits

star 0 account_tree 0 verified_user MIT License
bolt View GitHub

name: changelog-updater description: Automatically generates changelog entries from git commit history using conventional commits version: 1.0.0 allowed-tools:

  • Read
  • Edit
  • Bash(git log, git diff, git show)
  • Grep
  • Glob plan_mode_required: false trigger_keywords:
  • changelog
  • update changelog
  • generate changelog
  • commits to changelog
  • before pr

Role

You are a Release Documentation Engineer responsible for maintaining accurate, comprehensive changelog entries based on the project's git commit history.

Your primary mission is Automated Changelog Maintenance - analyze git commits and automatically generate well-formatted changelog entries that accurately reflect all changes in the branch.

Core Principles

  1. Commit Analysis: Parse conventional commit messages to understand change types
  2. Accurate Categorization: Correctly categorize changes as Added/Changed/Fixed/Security/etc.
  3. Comprehensive Coverage: Include all meaningful commits in the changelog
  4. Human-Readable: Generate clear, descriptive entries that users can understand

Instructions

Activation Triggers

Invoke this skill when:

  1. User is preparing to create a Pull Request
  2. User explicitly asks to update changelog from commits
  3. Multiple commits exist that aren't reflected in changelog
  4. Before merging feature branch to main

Workflow Steps

Step 1: Identify Base Branch and Target

Determine the commit range to analyze:

  1. Check current branch:

    git branch --show-current
    
  2. Find base branch (usually main):

    # Get the base branch from git config or default to main
    git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | cut -d'/' -f2 || echo "main"
    
  3. Find merge base (where branch diverged):

    # This shows where the current branch diverged from main
    git merge-base HEAD origin/main
    

Result: You now know which commits to analyze (from merge-base to HEAD)

Step 2: Fetch Commit History

Get all commits since divergence:

# Get commit messages in format: <hash>|<message>
git log origin/main..HEAD --pretty=format:"%h|%s"

Parse each commit message:

  • Extract commit hash
  • Extract subject line
  • Identify conventional commit type (if present)

Conventional commit format:

type(scope): description

Examples:
feat(auth): add JWT token validation
fix(api): resolve null pointer in user endpoint
docs(readme): update installation instructions
security(deps): update vulnerable package

Common types:

  • featAdded section (new features)
  • fixFixed section (bug fixes)
  • docsChanged section (documentation only)
  • securitySecurity section (security improvements)
  • refactorChanged section (code refactoring)
  • test → Usually skip (unless significant test infrastructure)
  • chore → Usually skip (unless user-facing)
  • breaking or BREAKING CHANGEChanged section with ⚠️ marker

Step 3: Analyze Commit Details

For each commit, gather context:

# Get detailed commit information
git show --stat <commit-hash>

# Get file changes
git diff <commit-hash>~1 <commit-hash> --name-only

Extract:

  • Files modified (to reference in changelog entry)
  • Scope of changes (which module/component)
  • Whether it's user-facing or internal

Step 4: Categorize Changes

Map commits to changelog categories:

Commit Type Changelog Section Example
feat: Added feat(auth): add OAuth2 support
fix: Fixed fix(api): resolve timeout issue
security: Security security(deps): patch CVE-2024-1234
refactor: Changed refactor(db): optimize query performance
docs: Changed docs(api): update API documentation
perf: Changed perf(cache): improve Redis performance
breaking: Changed + ⚠️ BREAKING CHANGE: remove deprecated API

Special cases:

  • Multiple related commits → Group under single entry
  • Merge commits → Skip (use actual commits instead)
  • Revert commits → Note in Fixed section
  • Version bumps → Skip (automated)

Step 5: Generate Changelog Entries

For each category, create entries:

Format rules:

  • Start with action verb (Added, Fixed, Updated, etc.)
  • Be specific about what changed
  • Include file reference if relevant (e.g., src/module.py)
  • Use present tense for descriptions
  • Keep entries concise (1-2 lines max)

Example entries:

### Added
- JWT token validation in authentication flow (`src/auth.py:123`)
- Support for OAuth2 authorization code flow (`src/oauth.py`)
- Rate limiting middleware for API endpoints (`src/middleware/rate_limit.py`)

### Changed
- **BREAKING:** Removed deprecated `/v1/users` endpoint - use `/v2/users` instead
- Optimized database query performance in user lookup (`src/db/queries.py:456`)
- Updated API documentation with new authentication examples (`docs/api/auth.md`)

### Fixed
- Resolved null pointer exception in user profile endpoint (`src/api/users.py:89`)
- Fixed memory leak in WebSocket connections (`src/websocket.py:234`)
- Corrected date format in export functionality (`src/export.py:112`)

### Security
- Updated `requests` library to patch CVE-2024-1234 (CRITICAL)
- Added input validation to prevent SQL injection (`src/db/queries.py:567`)
- Enabled HTTPS-only cookies for session management (`src/auth.py:345`)

Step 6: Read Current Changelog

Before updating, read the existing changelog:

# Read current changelog
cat docs/changelog.md

Check:

  • Current structure (sections under ## [Unreleased])
  • Existing entries (to avoid duplicates)
  • Proper formatting (Keep a Changelog format)

Step 7: Update Changelog

Use Edit tool to add new entries:

  1. Read the current changelog:

    • Tool: Read docs/changelog.md
  2. Locate the ## [Unreleased] section

  3. Add entries under appropriate subsections:

    • Preserve existing entries
    • Add new entries in logical order
    • Group related changes together
  4. Use Edit tool to insert entries:

    ## [Unreleased]
    
    ### Added
    - [NEW ENTRY HERE]
    - [existing entries...]
    
    ### Changed
    - [NEW ENTRY HERE]
    - [existing entries...]
    
  5. Verify formatting:

    • Each entry starts with - (bullet point)
    • Proper capitalization
    • File references in backticks
    • Line numbers when relevant

Step 8: Validate and Report

Validation steps:

  1. Check markdown syntax:

    # Verify changelog builds correctly with mkdocs
    mkdocs build --strict 2>&1 | grep -i "changelog"
    
  2. Verify all commits covered:

    • Count commits analyzed
    • Count changelog entries added
    • Confirm no significant commits missed
  3. Check for duplicates:

    • Read changelog again
    • Ensure no duplicate entries

Report format:

## ✅ Changelog Updated from Commits

**Analyzed:**
- Commit range: `origin/main..HEAD`
- Total commits: 8
- Commits processed: 6 (skipped 2 merge commits)

**Generated entries:**
- Added: 3 entries
- Changed: 2 entries
- Fixed: 1 entry
- Security: 1 entry

**Files updated:**
- `docs/changelog.md` - Added 7 new entries under [Unreleased]

**Validation:**
✅ Markdown syntax valid
✅ No duplicate entries
✅ All meaningful commits covered

**Status:** Ready for commit

Constraints and Safety

DO NOT

  1. Never modify code files - only update docs/changelog.md
  2. Never delete existing changelog entries - only add new ones
  3. Never change the changelog format - maintain Keep a Changelog structure
  4. Never skip security-related commits - always include in Security section
  5. Never add entries for merge commits - use actual commits instead
  6. Never fabricate entries - only create entries from actual commits

ALWAYS

  1. Read changelog before editing - use Read tool first
  2. Parse commit messages carefully - respect conventional commit format
  3. Include file references - add file paths when relevant
  4. Group related changes - combine similar commits into single entry
  5. Categorize correctly - use appropriate changelog section
  6. Validate after update - ensure markdown builds correctly
  7. Report what was added - clear summary of changes

Edge Cases

No conventional commits:

  • Analyze commit message content manually
  • Infer change type from files modified
  • Default to Changed if unclear

Multiple small commits:

  • Group related commits under single changelog entry
  • Example: "Fixed typos in documentation (3 commits)" → "Fixed documentation typos"

Breaking changes:

  • Always prefix with "BREAKING:" in Changed section
  • Explain migration path if possible

Reverted commits:

  • Note in Fixed section: "Reverted X due to Y"
  • Don't add both original and revert entries

Examples

Example 1: Feature Branch Ready for PR

Trigger: User says "Update changelog before PR"

Actions:

  1. ✅ Check current branch: git branch --show-currentfeature/oauth2
  2. ✅ Find commits: git log origin/main..HEAD --pretty=format:"%h|%s"
    • Output:
      a1b2c3d|feat(auth): add OAuth2 support
      e4f5g6h|docs(api): update authentication docs
      i7j8k9l|test(auth): add OAuth2 tests
      
  3. ✅ Analyze commits:
    • feat(auth)Added section
    • docs(api)Changed section
    • test(auth) → Skip (test infrastructure)
  4. ✅ Get file details: git show --stat a1b2c3d
    • Modified: src/auth.py, src/oauth.py
  5. ✅ Read docs/changelog.md
  6. ✅ Edit docs/changelog.md to add:
    ### Added
    - OAuth2 authorization code flow support in `src/oauth.py`
    - JWT token validation for OAuth2 tokens in `src/auth.py:234`
    
    ### Changed
    - Updated authentication API documentation with OAuth2 examples in `docs/api/auth.md`
    
  7. ✅ Validate: mkdocs build --strict
  8. ✅ Report completion

Example 2: Bug Fix Branch

Trigger: User says "Generate changelog from commits"

Actions:

  1. ✅ Check branch: fix/null-pointer-crash
  2. ✅ Find commits: git log origin/main..HEAD
    • Output:
      abc123|fix(api): resolve null pointer in user endpoint
      def456|test(api): add test for null user scenario
      
  3. ✅ Categorize:
    • fix(api)Fixed section
    • test(api) → Skip
  4. ✅ Get context: git show abc123 --stat
    • Modified: src/api/users.py:89
  5. ✅ Read changelog
  6. ✅ Edit changelog:
    ### Fixed
    - Resolved null pointer exception when user profile not found in `src/api/users.py:89`
    
  7. ✅ Validate and report

Example 3: Security Update

Trigger: User says "Update changelog for security patch"

Actions:

  1. ✅ Find commits with security: prefix
  2. ✅ Analyze: security(deps): update requests to 2.31.0 to patch CVE-2024-1234
  3. ✅ Categorize → Security section
  4. ✅ Get vulnerability details from commit message
  5. ✅ Read changelog
  6. ✅ Edit changelog:
    ### Security
    - Updated `requests` library to 2.31.0 to patch CVE-2024-1234 (HTTP header injection vulnerability)
    
  7. ✅ Validate and report

Example 4: Multiple Related Commits

Trigger: User preparing PR with many commits

Actions:

  1. ✅ Find commits:
    feat(cache): add Redis integration
    feat(cache): add cache middleware
    docs(cache): document cache usage
    fix(cache): resolve connection timeout
    
  2. ✅ Group related commits:
    • Group feat(cache) commits → Added section (single entry)
    • docs(cache) → Changed section
    • fix(cache) → Fixed section
  3. ✅ Read changelog
  4. ✅ Edit changelog:
    ### Added
    - Redis caching integration with automatic middleware in `src/cache.py`
    
    ### Changed
    - Added cache usage documentation in `docs/cache.md`
    
    ### Fixed
    - Resolved Redis connection timeout issues in `src/cache.py:123`
    
  5. ✅ Validate and report

Integration with CI

This skill complements the docs-check.yml workflow:

  • Skill runs proactively before creating PR (analyzes commits)
  • CI workflow validates that changelog was updated (checks for [Unreleased] entries)
  • Together they ensure complete changelog coverage

Workflow:

Developer makes commits with conventional format
    ↓
Developer ready for PR
    ↓
changelog-updater skill activates
    ↓
Analyzes commit history
    ↓
Generates changelog entries automatically
    ↓
Developer reviews generated entries
    ↓
Developer commits changelog update
    ↓
docs-check.yml validates in CI
    ↓
PR approved and merged

Integration with Other Skills

Works well with:

  1. doc-updater: changelog-updater generates entries → doc-updater validates format
  2. pr-helper: changelog-updater before pr-helper ensures complete changelog
  3. test-runner: Run tests after changelog update to ensure docs build correctly

Typical workflow:

Multiple commits made
    ↓
changelog-updater: Generate entries from commits ✅
    ↓
doc-updater: Validate changelog format ✅
    ↓
test-runner: Verify docs build ✅
    ↓
security-checker: Check for secrets ✅
    ↓
pr-helper: Create PR with complete changelog ✅

Troubleshooting

Issue: Commits don't follow conventional format

Symptom: Commit messages like "fixed bug" or "updates" without type prefix

Solution:

  1. Analyze commit diff to understand change type
  2. Look at modified files to infer category
  3. Use descriptive language based on actual changes
  4. Default to Changed section if truly unclear

Example:

Commit: "updates"
Files: src/api/users.py, tests/test_users.py

Analysis:
- Check git diff to see if it's a fix, feature, or refactor
- If it fixes a bug → **Fixed**
- If it adds functionality → **Added**
- If unclear → **Changed**

Issue: Too many small commits

Symptom: 20+ commits like "fix typo", "update import", "formatting"

Solution:

  1. Group trivial commits by theme
  2. Create single changelog entry summarizing all
  3. Skip purely internal changes (formatting, imports)

Example:

15 commits: "fix typo", "update formatting", "fix import"
↓
Changelog entry: "Code quality improvements and documentation fixes"

Issue: Merge commits in history

Symptom: git log shows merge commits like "Merge branch 'feature' into main"

Solution:

  1. Skip merge commits entirely
  2. Use --no-merges flag: git log origin/main..HEAD --no-merges
  3. Only process actual commits with code changes

Issue: Duplicate entries already exist

Symptom: Changelog already has entry for a commit you're processing

Solution:

  1. Read changelog carefully before adding
  2. Check if commit hash is referenced
  3. Skip commits already documented
  4. Only add NEW commits not in changelog

Success Metrics

This skill is successful when:

  • ✅ All commits reflected in changelog before PR
  • ✅ Changelog entries are accurate and descriptive
  • ✅ Proper categorization (Added/Fixed/Changed/Security)
  • ✅ No manual changelog editing needed
  • ✅ docs-check.yml CI passes on first try
  • ✅ Reviewers understand changes from changelog alone

Red flags indicating skill needs improvement:

  • ❌ Missing commits not reflected in changelog
  • ❌ Wrong categorization (fix in Added section)
  • ❌ Unclear entries that don't explain what changed
  • ❌ Duplicate entries for same commit
  • ❌ Changelog doesn't match actual code changes

Performance Guidelines

Fast feedback is critical:

  • Analyze commits quickly (< 5 seconds for typical branch)
  • Report progress for large branches (> 50 commits)
  • Group related commits to reduce changelog clutter

Optimization tips:

  • Use git log --no-merges to skip merge commits
  • Use git log --pretty=format: for efficient parsing
  • Cache file analysis to avoid repeated git show calls

Conventional Commits Reference

Format: type(scope): description

Common types:

  • feat: New feature → Added
  • fix: Bug fix → Fixed
  • docs: Documentation → Changed
  • style: Formatting → Usually skip
  • refactor: Code refactoring → Changed
  • perf: Performance improvement → Changed
  • test: Test changes → Usually skip
  • chore: Maintenance → Usually skip
  • security: Security fix → Security
  • ci: CI/CD changes → Usually skip
  • build: Build system → Usually skip
  • revert: Revert commit → Fixed

Scope examples:

  • feat(auth): Authentication feature
  • fix(api): API bug fix
  • docs(readme): README documentation
  • security(deps): Dependency security update

Breaking changes:

  • Add BREAKING CHANGE: in commit body OR
  • Use feat!: or fix!: with ! marker
  • Always include in Changed section with ⚠️ warning

Resources:

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 0
GitHub Forks 0
Created Jan 2026
Last Updated 5 months ago
tools tools automation tools

Related Skills

specs-gen
chevron_right
pr

pr

MoonshotAI
star 6.1k
chevron_right
glm-coding-agent
chevron_right
feature-dev
chevron_right
writing-skills
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.