Back to Commands

/add_to_changelog

📝Documentation & Changelogs

Add a new entry to the project's CHANGELOG.md file following Keep a Changelog format

Arguments: <version> <change_type> <message>
Allowed Tools: Read, Edit

Quick Actions

Installation

Option A: Install as User Command (available in all projects)

macOS/Linux:

cp add-to-changelog.md ~/.claude/commands/

Windows:

copy add-to-changelog.md %USERPROFILE%\.claude\commands\

Option B: Install as Project Command (current project only)

macOS/Linux:

mkdir -p .claude/commands && cp add-to-changelog.md .claude/commands/

Windows:

mkdir .claude\commands 2>nul && copy add-to-changelog.md .claude\commands\

Note: After installation, restart Claude Code to load the new command.

Usage

Slash command:

/add_to_changelog <version> <change_type> <message>

Command Instructions


Update Changelog


Add a new entry to the project's CHANGELOG.md file based on the provided arguments.


Parse Arguments


Parse $ARGUMENTS to extract:

  • Version number (e.g., "1.1.0")
  • Change type: "added", "changed", "deprecated", "removed", "fixed", or "security"
  • `<message>` is the description of the change

  • Examples


    ```

    /add-to-changelog 1.1.0 added "New markdown to BlockDoc conversion feature"

    ```

    ```

    /add-to-changelog 1.0.2 fixed "Bug in HTML renderer causing incorrect output"

    ```

    Description


    This command will:


  • Check if a CHANGELOG.md file exists and create one if needed
  • Look for an existing section for the specified version
  • - If found, add the new entry under the appropriate change type section

    - If not found, create a new version section with today's date

  • Format the entry according to Keep a Changelog conventions
  • Commit the changes if requested

  • The CHANGELOG follows the [Keep a Changelog](https://keepachangelog.com/) format and [Semantic Versioning](https://semver.org/).


    Implementation


    The command should:


  • Parse the arguments to extract version, change type, and message
  • Read the existing CHANGELOG.md file if it exists
  • If the file doesn't exist, create a new one with standard header
  • Check if the version section already exists
  • Add the new entry in the appropriate section
  • Write the updated content back to the file
  • Suggest committing the changes

  • Remember to update the package version in __init__.py and setup.py if this is a new version.