Changelog Generator
Automated changelog generation following semantic versioning (SemVer) and Keep a Changelog standards. This skill guides agents through reviewing staged changes, determining appropriate version bumps, and updating both
and
files consistently.
Overview
The Changelog Generator skill automates the process of:
- Analyzing staged git changes to determine change types
- Calculating appropriate semantic version bumps (MAJOR.MINOR.PATCH)
- Updating the version in
- Generating properly formatted changelog entries in
- Ensuring consistency between version numbers and changelog entries
This skill follows the
Semantic Versioning 2.0.0 specification and the
Keep a Changelog format standards.
When to Apply
Reference this skill when:
- User requests to "update changelog" or "generate changelog"
- User asks to "bump version" or "create release"
- Preparing for a new release
- Need to document changes in a standardized format
- Ensuring version numbers follow semantic versioning
- Maintaining consistent changelog formatting
Preconditions:
- Git repository with staged changes
- Existing file with a field
- Existing file following Keep a Changelog format
- Access to git commands (, )
Workflow
The changelog generation process follows these 7 steps:
Step 1: Review All Staged Changes
Objective: Understand what changes have been staged and categorize them.
Actions:
-
Check git status to see what's staged:
-
Review all staged changes:
-
Analyze the changes to identify:
- Breaking changes: API changes, removed features, incompatible changes
- New features: Added functionality, new APIs, new components
- Bug fixes: Fixes to existing functionality
- Documentation: README updates, doc changes (usually don't affect version)
- Refactoring: Code improvements without behavior changes (usually PATCH)
-
Review commit messages if available:
bash
git log --oneline --cached
Categorization Guidelines:
- Breaking changes → MAJOR version bump
- New features → MINOR version bump
- Bug fixes → PATCH version bump
- Documentation only → Usually no version bump (or PATCH if significant)
- Refactoring → Usually PATCH version bump
Output: List of categorized changes ready for changelog entry.
Step 2: Determine the Appropriate Version Bump
Objective: Calculate the new version number based on semantic versioning rules.
Actions:
-
Read current version from
:
bash
# Read the version field
cat package.json | grep '"version"'
-
Apply semantic versioning rules:
-
MAJOR (X.0.0): Increment when you make incompatible API changes
- Breaking API changes
- Removed features
- Changed behavior that breaks existing code
- Example: →
-
MINOR (0.X.0): Increment when you add functionality in a backward-compatible manner
- New features
- New APIs (backward compatible)
- Deprecated features (still functional)
- Example: →
-
PATCH (0.0.X): Increment when you make backward-compatible bug fixes
- Bug fixes
- Security patches
- Performance improvements
- Documentation updates (if versioned)
- Example: →
-
Priority order: If multiple change types exist, use the highest:
- MAJOR > MINOR > PATCH
- If any breaking changes exist → MAJOR
- Else if any new features exist → MINOR
- Else → PATCH
Decision Tree:
Are there breaking changes?
├─ Yes → MAJOR version bump (X.0.0)
└─ No → Are there new features?
├─ Yes → MINOR version bump (0.X.0)
└─ No → PATCH version bump (0.0.X)
Output: New version number (e.g.,
).
Step 3: Update @package.json Version Accordingly
Objective: Update the version field in the root
file.
Actions:
- Read the current file
- Locate the field (usually near the top)
- Update the version number to the new version determined in Step 2
- Preserve all formatting:
- Keep the same indentation (spaces or tabs)
- Maintain the same JSON structure
- Don't modify other fields
- Don't reorder fields
- Keep trailing commas if they exist
Example:
json
// Before
{
"name": "qa-skills",
"version": "0.4.0",
"private": true,
...
}
// After (PATCH bump)
{
"name": "qa-skills",
"version": "0.4.1",
"private": true,
...
}
Important:
- Only update the field
- Don't change any other content
- Maintain JSON validity
- Preserve file formatting and style
Output: Updated
with new version number.
Step 4: Update @CHANGELOG.md with a New Version Block
Objective: Add a new version section to
following Keep a Changelog format.
Actions:
- Read the current file
- Locate the section (should be at the top)
- Insert a new version block after and before the previous version
- Use the format:
- is the new version number
- is the current date (see Step 5)
Example Structure:
markdown
# Changelog
## [Unreleased]
## [0.4.1] - 2026-01-25
### Added
- New feature description
## [0.4.0] - 2026-01-25
...
Important:
- Place new version block between and the previous release
- Use exact format:
- Maintain consistent spacing with existing entries
- Don't modify existing version entries
Output: with new version header added.
Step 5: Add the Version and the Date
Objective: Ensure the version block has the correct version number and current date.
Actions:
-
Get the current date in YYYY-MM-DD format
- Use system date/time information
- Never assume or hardcode dates
- Format: (e.g., )
-
Verify the version number matches Step 2 and Step 3
- Version in changelog header must match version
- Format: where X, Y, Z are numbers
-
Update the version block header if needed:
Date Format Rules:
- Always use format
- Use 4-digit year
- Use 2-digit month (01-12)
- Use 2-digit day (01-31)
- Match the format of existing changelog entries
Example:
Output: Version block with correct version number and date.
Step 6: Add the Changelog Data
Objective: Populate the version block with categorized change entries.
Actions:
-
Organize changes from Step 1 into appropriate sections
-
Use the standard Keep a Changelog sections:
- - New features
- - Changes in existing functionality
- - Soon-to-be removed features
- - Removed features
- - Bug fixes
- - Security vulnerabilities
-
Format each entry:
- Use bullet points with prefix
- Start with a capital letter
- End without a period (unless it's a full sentence)
- Be concise and descriptive
- Focus on user-facing changes
-
Section Guidelines:
- Added: New features, new APIs, new components, new capabilities
- Changed: Modified behavior, API changes (non-breaking), improvements
- Deprecated: Features marked for removal in future versions
- Removed: Features that were removed (usually indicates MAJOR bump)
- Fixed: Bug fixes, corrections, patches
- Security: Security-related fixes and improvements
-
Only include sections that have changes
-
Order sections: Added, Changed, Deprecated, Removed, Fixed, Security
Example:
markdown
## [0.4.1] - 2026-01-25
### Added
- New changelog generator skill for cursor agents
- Support for semantic versioning automation
### Fixed
- Corrected version bump logic for patch releases
- Fixed date formatting in changelog entries
### Changed
- Improved changelog entry categorization
Writing Guidelines:
- Write from the user's perspective
- Use present tense ("Adds feature" not "Added feature")
- Be specific but concise
- Group related changes together
- Avoid technical jargon when possible
- Focus on what changed, not how it was implemented
Output: Complete version block with all categorized changes.
Step 7: One Final Review
Objective: Verify everything is correct and consistent before completion.
Checklist:
-
Version Consistency:
-
Date Format:
-
Changelog Content:
-
Formatting:
-
Semantic Versioning:
-
File Integrity:
If any issues are found:
- Fix them before completing
- Re-verify the checklist
- Ensure consistency across all files
Output: Verified and consistent changelog and version updates.
File References
This skill references files using the
syntax convention:
-
: The root
file in the repository
- Contains the field that needs updating
- Located at the repository root
-
: The changelog file following Keep a Changelog format
- Contains version history and change documentation
- Located at the repository root
- Format: Markdown with version blocks
Usage in skill:
When the skill mentions
or
, it refers to these specific files at the repository root. Always read these files before making changes and verify their current state.
Semantic Versioning Rules
Version Format: MAJOR.MINOR.PATCH
-
MAJOR version (X.0.0): Increment when you make incompatible API changes
- Breaking changes to public APIs
- Removed features or functionality
- Changed behavior that breaks existing code
- Example: →
-
MINOR version (0.X.0): Increment when you add functionality in a backward-compatible manner
- New features added
- New APIs (backward compatible)
- Deprecated features (still functional)
- Example: →
-
PATCH version (0.0.X): Increment when you make backward-compatible bug fixes
- Bug fixes
- Security patches
- Performance improvements
- Documentation updates (if versioned)
- Example: →
Pre-release and Build Metadata
- Pre-release versions: , ,
- Build metadata:
For standard releases, use the three-part version number (X.Y.Z).
Decision Priority
When multiple change types exist:
- Any breaking changes → MAJOR bump
- Any new features (without breaking changes) → MINOR bump
- Only bug fixes → PATCH bump
Keep a Changelog Format
Follow the
Keep a Changelog format standards:
Structure
markdown
# Changelog
## [Unreleased]
## [X.Y.Z] - YYYY-MM-DD
### Added
- New features
### Changed
- Changes in existing functionality
### Deprecated
- Soon-to-be removed features
### Removed
- Removed features
### Fixed
- Bug fixes
### Security
- Security vulnerabilities
Section Guidelines
- Added: New features, capabilities, or functionality
- Changed: Modifications to existing functionality
- Deprecated: Features that will be removed in a future version
- Removed: Features that have been removed
- Fixed: Bug fixes and corrections
- Security: Security-related fixes and improvements
Formatting Rules
- Use for version headers:
- Use for change type sections:
- Use for bullet points
- Date format:
- Only include sections that have changes
- Order: Added, Changed, Deprecated, Removed, Fixed, Security
Best Practices
- Write from the user's perspective
- Be clear and concise
- Group related changes
- Use present tense
- Focus on what changed, not implementation details
- Keep section for future changes
Quick Reference
Git Commands
bash
# Check staging status
git status
# Review staged changes
git diff --cached
# View commit history
git log --oneline --cached
Version Bump Examples
bash
# Current: 1.2.3
# Breaking change → 2.0.0
# New feature → 1.3.0
# Bug fix → 1.2.4
Changelog Entry Template
markdown
## [X.Y.Z] - YYYY-MM-DD
### Added
- Description of new feature
### Changed
- Description of change
### Fixed
- Description of fix
Common Patterns
Pattern: Feature Release
- Changes: New features, no breaking changes
- Version: MINOR bump (0.X.0)
- Sections: , possibly
Pattern: Bug Fix Release
- Changes: Only bug fixes
- Version: PATCH bump (0.0.X)
- Sections:
Pattern: Major Release
- Changes: Breaking changes
- Version: MAJOR bump (X.0.0)
- Sections: , , possibly
Pattern: Security Release
- Changes: Security fixes
- Version: PATCH bump (usually) or MAJOR (if breaking)
- Sections: ,
Troubleshooting
Issue: Version mismatch between files
Solution: Ensure Step 3 and Step 4 use the same version number. Re-check both files.
Issue: Can't determine version bump type
Solution: Review Step 1 changes carefully. Use priority: MAJOR > MINOR > PATCH.
Issue: Changelog format doesn't match existing
Solution: Review existing
entries and match their style exactly.
Issue: Missing changes in changelog
Solution: Re-run Step 1 to ensure all staged changes are reviewed and categorized.
References