Skip to main content
command

add-changelog — Claude Code command: what it does, how to install

Generates and maintains CHANGELOG.md using the Keep a Changelog format. Reads recent commits and git tags to structure release notes.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command deployment/add-changelog
Open on GitHub

What add-changelog does

This command manages your CHANGELOG.md file. It invokes bash tools to read the last ten git commits, checks the latest version tag, and inspects package.json along with any existing changelog.

Entries follow the Keep a Changelog structure and Semantic Versioning. Changes fall into categories such as Added, Changed, Deprecated, Removed, Fixed, and Security. It also works with conventional commit prefixes like feat or fix to organize work.

Without a local git history, the command fails when running git commands.

What it helps with

  • maintain CHANGELOG.md using Keep a Changelog structure
  • categorize changes under Added, Fixed, and Security
  • prepare release notes from the latest git commits
  • sync release versions with git tags and package.json

Example prompts for the agent

  • /add-changelog 1.2.0
  • /add-changelog Added export functionality for reports
  • /add-changelog create a release entry from recent git commits

How to install add-changelog

1claude-code-templates

npx claude-code-templates@latest --command deployment/add-changelog

2Manually: put the files in place

.claude/commands/add-changelog.md

Call it with /add-changelog. For all projects use ~/.claude/commands/

Questions about add-changelog

How to install add-changelog in Claude Code?

Run npx claude-code-templates@latest --command deployment/add-changelog in your terminal. This creates .claude/commands/add-changelog.md.

What formatting standard does add-changelog follow?

It formats entries according to Keep a Changelog and Semantic Versioning, sorting notes into sections like Added, Fixed, and Security under unreleased or versioned headers.

Where does the command source change data?

It inspects @CHANGELOG.md, runs git log --oneline -10, queries git tags, and checks @package.json.

Source text

add-changelog.md · MIT
---
allowed-tools: Read, Edit, Write, Bash
argument-hint: "[version] | [entry-type] [description]"
description: Generate and maintain project changelog with Keep a Changelog format
---

# Add Changelog Entry

Generate and maintain project changelog: $ARGUMENTS

## Current State

- Existing changelog: @CHANGELOG.md (if exists)
- Recent commits: !`git log --oneline -10`
- Current version: !`git describe --tags --abbrev=0 2>/dev/null || echo "No tags found"`
- Package version: @package.json (if exists)

## Task

1. **Changelog Format (Keep a Changelog)**
   ```markdown
   # Changelog
   
   All notable changes to this project will be documented in this file.
   
   The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
   and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
   
   ## [Unreleased]
   ### Added
   - New features
   
   ### Changed
   - Changes in existing functionality
   
   ### Deprecated
   - Soon-to-be removed features
   
   ### Removed
   - Removed features
   
   ### Fixed
   - Bug fixes
   
   ### Security
   - Security improvements
   ```

2. **Version Entries**
   ```markdown
   ## [1.2.3] - 2024-01-15
   ### Added
   - User authentication system
   - Dark mode toggle
   - Export functionality for reports
   
   ### Fixed
   - Memory leak in background tasks
   - Timezone handling issues
   ```

3. **Automation Tools**
   ```bash
   # Generate changelog from git commits
   npm install -D conventional-changelog-cli
   npx conventional-changelog -p angular -i CHANGELOG.md -s
   
   # Auto-changelog
   npm install -D auto-changelog
   npx auto-changelog
   ```

4. **Commit Convention**
   ```bash
   # Conventional commits for auto-generation
   feat: add user authentication
   fix: resolve memory leak in tasks
   docs: update API documentation
   style: format code with prettier
   refactor: reorganize user service
   test: add unit tests for auth
   chore: update dependencies
   ```

5. **Integration with Releases**
   - Update changelog before each release
   - Include in release notes
   - Link to GitHub releases
   - Tag versions consistently

Remember to keep entries clear, categorized, and focused on user-facing changes.

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Git and GitHub →

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor