Gspdev changelog

From jubscodes/get-shit-pretty · View interactive version

Gspdev changelog is an AI agent skill from the GitHub repository jubscodes/get-shit-pretty. Maintain CHANGELOG.md from git history — update Unreleased section, promote to versioned release, or rebuild from scratch. Follows Keep a Changelog format.

How to use this skill

Skill file

<context>

Dev tool for maintaining CHANGELOG.md. Follows Keep a Changelog format with six section types: Added, Changed, Deprecated, Removed, Fixed, Security.

The project uses conventional-ish commit prefixes that map to changelog sections:

| Commit prefix | Changelog section | Notes |

|---------------|-------------------|-------|

| feat: | Added | New features and capabilities |

| fix: | Fixed | Bug fixes |

| refactor: | Changed | Restructuring, renames, migrations |

| docs: | (omit) | Documentation-only changes — skip unless user-facing |

| chore: | (omit) | Internal maintenance — skip unless notable |

| perf: | Changed | Performance improvements |

| deprecate: | Deprecated | Features marked for removal |

| security: | Security | Vulnerability fixes |

| No prefix | Changed | Default bucket for untagged commits |

CHANGELOG.md structure:

# Changelog

All notable changes to get-shit-pretty are documented here.

## [Unreleased]

### Added
- ...

## [X.Y.Z] — YYYY-MM-DD

### Added
- ...

Key rules:

</context>

<objective>

Maintain CHANGELOG.md so it's always release-ready. Three modes:

</objective>

<process>

Step 0: Parse mode

$ARGUMENTS:

Mode: update

Step 1: Find the boundary

Determine what's already in the changelog vs what's new:

# Get the last versioned release from CHANGELOG.md
grep -oP '## \[(\d+\.\d+\.\d+)\]' CHANGELOG.md | head -1 | grep -oP '\d+\.\d+\.\d+'

This is the "last released version." All commits after the tag or date for this version are candidates.

# Get commits since last release
# Try tag first, fall back to date from CHANGELOG.md
git log --oneline v${LAST_VERSION}..HEAD --no-merges 2>/dev/null || \
git log --oneline --since="${LAST_RELEASE_DATE}" --no-merges

Step 2: Categorize commits

Read each commit message. Map to changelog sections using the prefix table above. Skip:

Group related commits into single entries. For example:

Step 3: Write Unreleased section

If [Unreleased] section exists in CHANGELOG.md, replace its content.

If it doesn't exist, insert it after the header and before the first versioned section.

Only include sections that have entries. Order: Added, Changed, Deprecated, Removed, Fixed, Security.

Step 4: Show diff

Show the user what changed in the Unreleased section. Don't just silently write — present the entries for review before editing.

Wait for confirmation, then apply the edit.

Mode: release

Step 1: Read current state

cat VERSION

Read the [Unreleased] section from CHANGELOG.md. If empty or missing, tell the user to run update first.

Step 2: Promote

Replace ## [Unreleased] with ## [X.Y.Z] — YYYY-MM-DD (using VERSION and today's date).

Insert a fresh empty ## [Unreleased] section above it.

Step 3: Show result

Display the new versioned section. Remind the user to verify VERSION matches their intended release.

Mode: rebuild

Step 1: Confirm

This is destructive — it rewrites the entire CHANGELOG.md. Use AskUserQuestion to confirm.

Step 2: Walk git history

# Get all version tags, sorted
git tag -l 'v*' --sort=-version:refname

For each version range (tag to tag), categorize commits and build sections. Use the same grouping logic as update mode.

Build the full changelog from newest to oldest, with an [Unreleased] section at the top for any commits after the latest tag.

Step 3: Write

Write the complete CHANGELOG.md. Show a summary of what was generated (version count, entry count per version).

Important notes

</process>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.