agentleFS
abhattacherjeeabhattacherjee/claude-code-skills/changelog-keeper/SKILL.md

changelog-keeper

Skill1 starsChanged 2 months agoMITView on GitHub

Keeps CHANGELOG.md up to date by generating categorized entries from git commit history. Use when: (1) user asks to update the changelog, (2) before committing changes that should be documented, (3) preparing a release and need changelog entries, (4) user says 'update changelog' or 'what changed since last release', (5) a commit is about to be pushed and the changelog hasn't been updated.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. JayRHa/AgentSkills★ 11same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository11 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the changelog update script in these situations:

    line 37
  2. Distinctive:

    After the script generates the raw entry:

    line 60
  3. Distinctive:

    When commits don't use conventional prefixes, the script examines changed files:

    line 101
  4. Distinctive:

    When multiple scripts modify the same CHANGELOG (e.g., a sync script + a release script), they must recognize each other's entry format to …

    line 129
  5. Very specific:

    If Script A runs after Script B, it doesn't recognize [1.1.0] as "already handled" and prepends a new generic entry, burying or duplicating …

    line 136
  6. Very specific:

    When building CHANGELOG content via string concatenation, bash $() command substitution always strips trailing newlines.

    line 163

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Changelog Keeper

Generates and maintains CHANGELOG.md entries from git commit history. Categorizes changes automatically using conventional commit prefixes and file path patterns.

Quick Reference

SCRIPT=~/.claude/skills/changelog-keeper/scripts/update-changelog.sh

# Preview changelog entry (dry run)
$SCRIPT --dry-run

# Update [Unreleased] section
$SCRIPT

# Create a versioned entry
$SCRIPT --version 2.0.0

# Changes since a specific tag/commit
$SCRIPT --since v1.0.0

# For a different repo
$SCRIPT --dry-run /path/to/repo

Workflow

When to Run

Run the changelog update script in these situations:

  1. Before a commit — when the user has staged changes and is about to commit, generate a changelog entry to include in the same commit
  2. Before a release — use --version X.Y.Z to promote unreleased changes to a versioned entry
  3. On demand — when the user asks "what changed?" or "update the changelog"
  4. After multiple commits — to catch up the changelog with recent work

Step 1: Generate Changelog Entry

# Always preview first
~/.claude/skills/changelog-keeper/scripts/update-changelog.sh --dry-run

The script:

  • Auto-detects the last version tag or changelog entry as the starting point
  • Reads all commits since that point
  • Categorizes by conventional commit prefix (feat: → Added, fix: → Fixed, etc.)
  • Falls back to file-path categorization for non-conventional commits
  • Outputs a Keep-a-Changelog formatted entry

Step 2: Review and Refine

After the script generates the raw entry:

  • Consolidate related entries (e.g., multiple fix commits for the same issue → one bullet)
  • Improve wording — commit messages are developer-facing; changelog entries should be user-facing
  • Remove noise — drop entries for internal refactoring, CI changes, or typo fixes that don't affect users
  • Add context — link to issues/PRs if relevant

Step 3: Write to CHANGELOG.md

# Update the [Unreleased] section
~/.claude/skills/changelog-keeper/scripts/update-changelog.sh

# Or create a versioned entry for a release
~/.claude/skills/changelog-keeper/scripts/update-changelog.sh --version 1.2.0

Step 4: Include in Commit

Stage the updated CHANGELOG.md with the rest of the changes:

git add CHANGELOG.md
# Then commit as usual

Categorization Rules

The script categorizes commits using conventional commit prefixes:

PrefixCategoryExample
feat, addAddedfeat: add dark mode toggle
fixFixedfix: resolve login timeout
docsDocumentationdocs: update API reference
testTestingtest: add unit tests for auth
refactor, perf, style, chore, build, ciChangedrefactor: simplify auth flow
revertRemovedrevert: remove experimental flag
(no prefix)File-path fallbackCategorized by which files changed

File-Path Fallback

When commits don't use conventional prefixes, the script examines changed files:

  • src/, lib/, scripts/ → Changed
  • *.test.*, tests/, __tests__/ → Testing
  • *.md, docs/, README* → Documentation

Format

The script follows Keep a Changelog format:

# Changelog

## [Unreleased]

### Added
- New feature description

### Fixed
- Bug fix description

## [1.0.0] - 2026-02-24

### Added
- Initial release features

Multi-Script CHANGELOG Coordination

When multiple scripts modify the same CHANGELOG (e.g., a sync script + a release script), they must recognize each other's entry format to avoid clobbering.

The Problem

Script A generates ## [2026-02-24] — Monorepo sync entries. Script B promotes them to ## [1.1.0] - 2026-02-24 entries.

If Script A runs after Script B, it doesn't recognize [1.1.0] as "already handled" and prepends a new generic entry, burying or duplicating the release entry.

The Fix: Format-Aware Detection

Each script must detect the other's entry format before writing:

FIRST_ENTRY=$(awk '/^## \[/{print; exit}' CHANGELOG.md)

# Detect sync entry (replace it)
if echo "$FIRST_ENTRY" | grep -q "Monorepo sync"; then
  # Replace with fresh sync or release entry
  ...

# Detect versioned release (preserve it)
elif echo "$FIRST_ENTRY" | grep -qE '## \[[0-9]+\.[0-9]+\.[0-9]+\]'; then
  # Skip — release entry is the audit record
  ...

# Neither — prepend new entry
else
  ...
fi

Bash Newline Pitfall

When building CHANGELOG content via string concatenation, bash $() command substitution always strips trailing newlines. This causes:

Format: Monorepo-level events only.## [1.1.0] - 2026-02-24   ← MISSING BLANK LINE

This also affects printf: HEADER=$(printf '%s\n\n' "$HEADER") still loses the trailing newlines because $() strips them after printf outputs them.

Fix: Never rely on trailing newlines in variables. Add blank lines at the concatenation point instead:

# Wrong — $() strips trailing newlines from both echo and printf
HEADER=$(echo "$EXISTING" | awk '/^## \[/{exit} {print}')
HEADER=$(printf '%s\n\n' "$HEADER")  # Still loses \n\n!
NEW_CHANGELOG="${HEADER}${NEW_ENTRY}"  # No blank line

# Right — explicit blank line at concatenation
HEADER=$(echo "$EXISTING" | awk '/^## \[/{exit} {print}')
NEW_CHANGELOG="${HEADER}

${NEW_ENTRY}"  # Blank line guaranteed

Semver Tag Filtering

git describe --tags --abbrev=0 picks up ANY tag (including non-semver like sync-2026-02-24). For version detection, filter explicitly:

# Wrong — picks up non-semver tags
git describe --tags --abbrev=0

# Right — only semver v* tags, newest first
git tag -l 'v[0-9]*' --sort=-v:refname | head -1

Key Decisions

DecisionChoiceRationale
Conventional commits firstParse prefixes before file pathsMore accurate when available
Keep-a-Changelog formatStandard sections (Added/Changed/Fixed/...)Widely recognized, machine-parseable
Dry-run default in workflowAlways preview firstPrevents accidental overwrites
No AI dependencyPure git + sed/awkWorks offline, deterministic, fast
Scope strippingfix(auth): → body onlyScopes are for commits, not changelogs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.