Claude Code · Slash command

/add-to-changelog

Add a properly formatted entry to CHANGELOG.md — Keep a Changelog style, correct section, no manual formatting.

Documentation & changelogs·MITSource: berrydev-ai (blockdoc-python)

3★ · a small, focused open-source Python library — proof this doesn't need to come from a huge project to be genuinely useful

What this actually does for you

You give it three words — version, type of change, what changed — and it writes a properly formatted CHANGELOG.md entry in the right section, instead of you hand-editing a file you probably forget to update half the time.

Try it for: Make it part of your release habit, not just an afterthought: run it the moment you decide something's "done", so the changelog is always current instead of reconstructed from git log at release time.

The command file

# Update Changelog

This command adds a new entry to the project's CHANGELOG.md file.

## Usage

```
/add-to-changelog <version> <change_type> <message>
```

Where:
- `<version>` is the version number (e.g., "1.1.0")
- `<change_type>` is one of: "added", "changed", "deprecated", "removed", "fixed", "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:

1. Check if a CHANGELOG.md file exists and create one if needed
2. 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
3. Format the entry according to Keep a Changelog conventions
4. 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:

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

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

The last line ("update the package version in __init__.py and setup.py") is Python-specific — drop or adapt it for your stack.

How to add it

01

Copy the command file below.

02

Save it as .claude/commands/<name>.md in your project (create the folder if it doesn't exist).

03

Adjust anything project-specific (see the note below, if there is one).

04

Run the command in Claude Code by typing its name, e.g. it will appear in your / menu.

The linked repo is the source of truth — if the author updates it, the repo link stays current.

Want a whole automation, not just one command? Grab a working n8n template.