/git-github-workflow:github-releasefrom git-github-workflow
Runs an end-to-end GitHub library release workflow: inspects tags, classifies public API changes, picks a SemVer bump, updates CHANGELOG.md, creates a release branch, and opens a PR via gh.
Ships in git-github-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Release a single-package GitHub repository by reading tags and public diffs, selecting the next SemVer version, updating CHANGELOG.md, creating a release branch, and opening a pull request with gh. Keep steps 1 through 4 read-only; write only after the version is confirmed.
gh authenticated with gh auth status and a working git checkout inside a GitHub repository.gh repo view --json nameWithOwner succeeds before release work.PUBLIC_PATH; examples include src/, lib/, pkg/, or cmd/; if empty, use ..tests/, test/, spec/, __tests__/, docs/, *.lock, *-lock.json, *.sum, generated files with a do-not-edit header, and build artifacts from public API classification.Ensure main is current:
git checkout main
git pull origin main
Fetch and identify the latest version tag from git tags, not gh release list:
git fetch --tags
PREV_TAG=$(git tag --sort=-version:refname | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | head -1)
echo "Latest tag: $PREV_TAG"
git ls-remote --tags origin | grep "refs/tags/$PREV_TAG$"
PREV_SHA=$(git rev-list -n 1 "$PREV_TAG" 2>/dev/null || git rev-list --max-parents=0 HEAD)
PREV_TAG must preserve the tag spelling exactly, for example v1.4.2, while arithmetic strips a leading v. If no tag exists, set PREV_TAG to (none), set PREV_SHA to git rev-list --max-parents=0 HEAD, default NEXT_VERSION to 1.0.0, and skip SemVer arithmetic. If the tag is local-only or orphaned, warn before continuing.
Analyze the code diff as the primary signal:
git diff "$PREV_SHA"..HEAD -- "$PUBLIC_PATH" \
':(exclude)tests/' ':(exclude)test/' ':(exclude)spec/' \
':(exclude)__tests__/' ':(exclude)docs/' \
':(exclude)*.lock' ':(exclude)*-lock.json' ':(exclude)*.sum'
If the diff is huge, triage with git diff "$PREV_SHA"..HEAD --stat -- "$PUBLIC_PATH" and then focus on public interface files such as index.*, api.*, exports.*, public.*, mod.*, and __init__.*.
Read commit intent as the secondary signal:
git log "$PREV_SHA"..HEAD --oneline --no-merges
Use the bundled references/commit-classification.md only to interpret messages such as feat: new API, fix: typo, chore: refactor, or a one-line security fix whose intent is not self-explanatory from code; prefer the code diff when signals conflict.
Determine the highest SemVer bump and present the proposed NEXT_VERSION with evidence. Ask for confirmation before writing. Compute from MAJOR.MINOR.PATCH and format as vMAJOR.MINOR.PATCH; highest precedence wins: MAJOR > MINOR > PATCH.
Create and push the release branch only after confirmation:
git checkout -b release/vX.Y.Z
git push -u origin release/vX.Y.Z
Update or create CHANGELOG.md in Keep a Changelog format using today's YYYY-MM-DD date, show the proposed section to the user, then write it. Add or update the comparison link: https://github.com/OWNER/REPO/compare/vPREV...vNEXT.
Commit and push:
git add CHANGELOG.md
git commit -m "chore: release vX.Y.Z"
git push origin release/vX.Y.Z
Open the release PR. Always use --body-file, not inline --body; inline \n can render literally in PowerShell. Create release_pr_body.md or an equivalent repo-local scratch file, then run:
gh pr create --base main --head release/vX.Y.Z --title "Release vX.Y.Z" --body-file release_pr_body.md
Hand off tagging after merge:
git tag vX.Y.Z <merge-commit-sha>
git push origin vX.Y.Z
| Evidence from public diff | Bump | Changelog section |
|---|---|---|
| Removed symbols, changed signatures, or breaking behavior changes | MAJOR | Removed or Changed with breaking note |
New exported symbols or user-visible features such as NewClient or WithTimeout in src/client.go | MINOR | Added |
| Bug/logic fix, off-by-one correction, performance improvement, security fix, docs, chore only | PATCH | Fixed or Security; omit purely internal work |
| No commits since last tag | none | Report nothing to release |
When a commit says fix: typo but the diff removes a public method, classify as MAJOR. When a commit says feat: new API but only private internals changed, classify as PATCH. Document every conflict in the changelog review.
Treat HTTP API surface changes as public when the library exposes handlers, middleware, generated clients, or route contracts. Keep PATH changes only when they alter public CLI behavior.
Insert directly below # Changelog:
## [X.Y.Z] - YYYY-MM-DD
### Added
- ...
### Changed
- ...
### Deprecated
- ...
### Removed
- ...
### Fixed
- ...
### Security
- ...
Omit empty headings. Write plain English from the user's perspective, not raw commit messages. Map a new exported symbol to Added, a breaking removal to Removed, a breaking existing API change to Changed, a bug or perf fix to Fixed, and a security fix to Security.
Use PowerShell-safe forms on Windows:
git fetch --tags
$prevTag = git tag --sort='-version:refname' | Select-String '^[vV]?\d+\.\d+\.\d+' | Select-Object -First 1 -ExpandProperty Line
if ($prevTag) { $prevSha = git rev-list -n 1 $prevTag } else { $prevSha = git rev-list --max-parents=0 HEAD }
git diff "$($prevSha)..HEAD" -- $publicPath ':(exclude)tests/' ':(exclude)test/' ':(exclude)spec/' ':(exclude)__tests__/' ':(exclude)docs/' ':(exclude)*.lock' ':(exclude)*-lock.json' ':(exclude)*.sum'
For the PR body, use a here-string, write with Out-File -FilePath release_pr_body.md -Encoding utf8 -NoNewline, and pass --body-file release_pr_body.md. If gh usage appears unexpectedly, check Get-Command gh, gh --version, git fetch --tags, and git diff --name-only $prevSha..HEAD -- src/.
Read bundled references only when the release decision needs deeper rules:
references/semver-rules.md: extended SemVer edge cases for MAJOR, MINOR, and PATCH.references/commit-classification.md: commit-message heuristics for secondary signal classification.| Situation | Resolution |
|---|---|
gh auth status fails | Stop and tell the user to run gh auth login. |
| Not inside a git repo | Stop and tell the user to cd into the repository. |
| Working tree is dirty | Warn and ask whether to stash, commit, or abort. |
| No commits since last tag | Tell the user there is nothing to release. |
| Tag exists locally but not remotely | Warn that the tag appears local-only and ask whether to push or continue. |
| Tag points to no commit | Use git rev-list --max-parents=0 HEAD as the fallback diff base and warn. |
Diff is empty for PUBLIC_PATH but commits exist | Warn that changes may be internal and ask whether to proceed. |
git push fails | Report the error verbatim and suggest checking protected branch rules. |
gh release list as source of truth: releases are optional; tags are authoritative.release/vX.Y.Z before version confirmation: branch names must match the final version.--body for multiline PR text: use --body-file so markdown line breaks survive Bash and PowerShell.(none), default the first release to 1.0.0, and use git tag only after the release PR merges.## GitHub release result
**Status:** PR opened | ready for PR | blocked
**Previous tag:** `<PREV_TAG>`
**Previous SHA:** `<PREV_SHA>`
**Next version:** `<NEXT_VERSION>`
**Public path:** `<PUBLIC_PATH>`
### Classification
| Evidence | Bump impact | Changelog entry |
| --- | --- | --- |
| `<file or commit evidence>` | `MAJOR | MINOR | PATCH` | `<entry or omitted>` |
### Commands run
- `gh auth status`
- `gh repo view --json nameWithOwner`
- `git status`
- `git fetch --tags`
- `git diff <PREV_SHA>..HEAD -- <PUBLIC_PATH>`
- `git log <PREV_SHA>..HEAD --oneline --no-merges`
- `git checkout -b release/vX.Y.Z`
- `git push -u origin release/vX.Y.Z`
- `gh pr create --base main --head release/vX.Y.Z --title "Release vX.Y.Z" --body-file release_pr_body.md`
### Handoff
After merge, create the tag:
`git tag vX.Y.Z <merge-commit-sha>`
`git push origin vX.Y.Z`
gh auth status, gh repo view --json nameWithOwner, and git status were checked before changes.PREV_TAG, PREV_SHA, PUBLIC_PATH, and NEXT_VERSION are recorded.CHANGELOG.md follows Keep a Changelog, omits empty sections, and includes the compare URL.release/vX.Y.Z and was created only after confirmation.--body-file and includes the changelog section or a clear placeholder.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin git-github-workflow13 skills in this plugin
/commit-message-storytellerAnalyze git diffs, staged changes, or plain change descriptions and generate narrative Conventional Commits messages that explain why the change matters. Use when asked to "write a commit message", "generate a commit", "describe my changes", "what should I commit this as", "commit this", "summarize my diff", or "help me commit"./conventional-branchCreate, normalize, validate, and check out Git branches following the Conventional Branch specification with feature/, bugfix/, hotfix/, release/, and chore/ prefixes. Use when creating a new branch, naming a branch, or checking branch-name compliance./copilot-pr-autopilotRun a GitHub Copilot Code Review loop on a pull request: request review with GraphQL, wait, list open Copilot/human/advanced-security threads, triage fix/decline/escalate, dispatch bounded fixes, build/test/lint, commit per iteration, reply and resolve, then re-trigger until HEAD is reviewed and no threads await the agent. Use for address copilot comments, run a copilot review loop, fix this PR, or iterate on copilot feedback./dependabotComprehensive guide for configuring and managing GitHub Dependabot. Use this skill when users ask about creating or optimizing dependabot.yml files, managing Dependabot pull requests, configuring dependency update strategies, setting up grouped updates, monorepo patterns, multi-ecosystem groups, security update configuration, auto-triage rules, or any GitHub Advanced Security (GHAS) supply chain security topic related to Dependabot. For pre-commit dependency vulnerability scanning in AI coding agents via the GitHub MCP Server, this skill references the Advanced Security plugin (`advanced-security@copilot-plugins`). Use this skill when an agent needs to scan dependencies for known vulnerabilities before committing./gh-attachUpload, download, and embed GitHub user-attachments with the gh attach extension for screenshots, images, PDFs, zip files, and videos. Use this skill when asked to attach a screenshot to a PR, add an image to an issue, embed before/after media, attach a local file, or download a GitHub attachment./git-commitExecute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical groupingOther plugins' skills for the same job