Generate changelog

From eclipse-glsp/glsp-server-node · View interactive version

Generate changelog is an AI agent skill from the GitHub repository eclipse-glsp/glsp-server-node. Generate changelog entries from merged PRs since the last release. Fetches PR data, classifies changes as normal or breaking, presents for user review, and optionally creates a PR with the updates.

How to use this skill

Skill file

Changelog Generator

Generate changelog entries by analyzing merged PRs since the last release.

Execute these phases in order:

  1. Data Gathering — find last release, fetch PRs, classify, generate entries
  2. Changelog Update — write entries into CHANGELOG.md
  3. Review & Approval — present the actual diff to the user for review
  4. PR Creation (optional) — push and create PR, only if the user requests it

Phase 1: Data Gathering

Step 1.1: Find the latest release tag

Run:

git tag --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1

Record as LAST_TAG. Get the tag's date:

git log -1 --format=%aI $LAST_TAG

Record as TAG_DATE.

Step 1.2: Extract category tags from existing CHANGELOG.md

Read CHANGELOG.md and extract all unique [tag] patterns from changelog entries (pattern: - [tag] ...). Build a deduplicated vocabulary list preserving original casing.

Step 1.3: Fetch merged PRs since the last release

gh pr list --state merged --search "merged:>TAG_DATE" --json number,title,author,body,labels,mergedAt --limit 100

Use the date portion only from TAG_DATE (e.g. 2026-02-09).

Step 1.4: Filter PRs

Skip rules (in order):

  1. PR has the changelog label → skip (already tracked in a previous changelog update)
  2. Author login is dependabot or dependabot[bot] → skip
  3. Title matches version bump patterns → skip:
  1. Title contains update changelog (case insensitive) → skip
  2. Title is purely CI/metadata (readme badges, workflow config) AND body does NOT contain [x] This PR should be mentioned in the changelog → skip

Override: If the PR body contains [x] This PR should be mentioned in the changelog, always include it regardless of rules 3-5. PRs with the changelog label (rule 1) and dependabot PRs (rule 2) are always skipped.

Step 1.5: Classify each PR

  1. If body contains [x] This PR introduces a breaking change → breaking
  2. If body contains [ ] This PR introduces a breaking change → normal
  3. If no checkbox info, analyze title and body:

Step 1.6: Assign category tags

Pick the most fitting tag from the vocabulary (Step 1.2) based on PR title and body. If no tag fits, mark as uncertain: [???/best-guess].

Step 1.7: Generate changelog entries

Entry Format

Normal changes:

-   [tag] Description [#N](https://github.com/OWNER/REPO/pull/N)

Breaking changes with migration sub-items:

-   [tag] Description [#N](https://github.com/OWNER/REPO/pull/N)
    -   Migration detail 1
    -   Migration detail 2

Multiple PRs for the same change:

-   [tag] Description [#N](url) [#M](url)
Style Guide

Formatting:

Wording:

Capitalization:

Description cleanup from PR title:

Breaking changes:


Phase 2: Changelog Update

Step 2.1: Determine the version section

Read CHANGELOG.md in the repository root.

Active section detection:

Creating a new section:

## v2.7.0 - active

### Changes

- [tag] Entry [#N](url)

### Potentially Breaking Changes

- [tag] Entry [#N](url)
    - Sub-item detail

Only include "Potentially Breaking Changes" if there are breaking entries.

Merging into existing active section:

Step 2.2: Write the updated CHANGELOG.md

Use the Edit tool to update CHANGELOG.md directly in the current working tree. Match existing formatting conventions.


Phase 3: Review & Approval

Step 3.1: Show the diff

git diff CHANGELOG.md

Present the diff to the user.

Step 3.2: Prompt for uncertain items

List any entries flagged as uncertain (category or breaking status) and ask the user to resolve them.

Even if nothing is uncertain, ask:

"Does everything look correct, or would you like to adjust any entries?"

Step 3.3: Collect user feedback

Do NOT proceed to Phase 4 unless the user explicitly requests a PR.


Phase 4: PR Creation (Optional)

Only execute this phase if the user explicitly requests a PR (either in their initial prompt or after reviewing the changelog). If the user hasn't mentioned a PR, ask after approval:

"Would you like me to create a PR for this changelog update, or are you done?"

Step 4.1: Determine the branch name

Check if changelog-update exists on remote:

git ls-remote --heads origin changelog-update

If it exists, increment: changelog-update-2, changelog-update-3, etc.

Step 4.2: Create branch, commit, and push

git checkout -b BRANCH_NAME
git add CHANGELOG.md
git commit -m "Update changelog"
git push -u origin BRANCH_NAME

Step 4.3: Create the PR

If the repo has a .github/PULL_REQUEST_TEMPLATE.md, use its structure to fill in the PR body. Otherwise use a simple body describing the changelog update.

Report the PR URL.

Step 4.4: Label referenced PRs

Add the changelog label to every PR mentioned in the new entries:

gh pr edit PR_NUMBER --add-label "changelog"

Report which PRs were labeled.

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.