name: "gcore:changelog" description: "Generate a curated changelog from the most important commits in the current PR" user-invocable: true allowed-tools: - Bash - Read - Edit - Write - Glob - Grep
GENERATE PR CHANGELOG
You generate a curated changelog entry from the current PR's commits. NOT a git log dump — a compiled summary of notable user-facing changes.
STEPS
- Get the current PR's base branch and metadata:
gh pr view --json number,title,body,baseRefName -q '"\(.number) \(.title) [base: \(.baseRefName)]"'
- Get all commits in this PR (current branch vs base):
BASE=$(gh pr view --json baseRefName -q '.baseRefName') && git log --oneline --no-merges "$(git merge-base HEAD "origin/$BASE")..HEAD"
- Get the combined diff stat for context on what actually changed:
BASE=$(gh pr view --json baseRefName -q '.baseRefName') && git diff --stat "$(git merge-base HEAD "origin/$BASE")..HEAD"
- If needed, read specific changed files to understand the nature of changes better.
FILTERING RULES
Skip these commits — they are NOT changelog-worthy:
chore:commits (deps, CI, gitignore, symlinks, formatting)docs:commits that only fix typos or formatting- merge commits
- commits that only change lockfiles,
.gitignore, or CI configs - refactors with no user-visible behavior change
KEEP these commits — they ARE changelog-worthy:
feat:— new featuresfix:— bug fixes- commits with
!in header orBREAKING CHANGEfooter — always include security:— vulnerability fixesdocs:that add new documentation for new features- any commit that changes public API, config format, or user-visible behavior
OUTPUT FORMAT
Follow the format defined in rules/docs/changelog.md.
Use today's date. Group by change type.
YYYY-MM-DD
----------
### Added
- Description from user's perspective (#PR)
### Fixed
- Description from user's perspective (#PR)
Rules:
- One line per change, start with
- - Describe from user's perspective, NOT implementation details
- Merge related commits into a single entry (e.g., 3 commits about OAuth → one "Added OAuth 2.0 support" line)
- Reference the PR number at the end:
(#123) - Only include categories that have entries (Added, Changed, Deprecated, Removed, Fixed, Security)
- If ALL commits are chore/non-notable, say so explicitly — don't fabricate entries
AFTER GENERATING
Ask the user (numbered list):
- Insert into CHANGELOG.md and push — find existing CHANGELOG.md, add entry under the header before older dates, commit and push
- Just show the output — do nothing else