Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill automates the full release workflow for a single-package GitHub repository,
.claude/skills/github-release/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 478% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 194% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 341% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 238% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 97% | 0% |
This skill automates the full release workflow for a single-package GitHub repository, from analysis through changelog authoring and PR creation. It relies exclusively on gh (GitHub CLI) and git no other tools needed.
Steps 1 - 4 are read-only reconnaissance nothing is written to the repo until Step 5, once the version number is confirmed.
Use this skill whenever the user wants to cut a new release, publish a new version, bump a version, create a release branch, generate a changelog, or open a release PR on a GitHub repository. Trigger even if the user says something casual like "let's ship a new version" or "time to release".
Examples below include both Bash and PowerShell variants; Windows users should prefer the PowerShell blocks.
Before starting, verify the environment:
bashgh auth status # must be authenticated gh repo view --json nameWithOwner # must be inside a GitHub repo git status # working tree should be clean
If any check fails, stop and tell the user what to fix before continuing.
Then ask the user one question:
> "Which directory contains your library's public-facing source code? > (e.g. `src/`, `lib/`, `pkg/` - used to focus the diff on what consumers > actually see. Press Enter to scan the whole repo.)"
Store the answer as PUBLIC_PATH. If empty, PUBLIC_PATH is . (repo root). Exclude these paths from all diffs regardless: tests/, test/, spec/, __tests__/, docs/, *.lock, *-lock.json, *.sum, generated files (files with a "do not edit" header comment), and build artefacts.
Work through every step in order. Show the user what command you're about to run and its output. Pause and ask for confirmation only when explicitly noted.
bashgit checkout main git pull origin main
Stay on main for now. The release branch is created in Step 5, after the version is confirmed.
> Why not gh release list? GitHub Releases are an optional layer on top of Git > tags. Many repos tag releases with git tag without ever creating a GitHub Release, > so gh release list can return empty even when version tags exist. Reading tags > directly from git is the reliable source of truth.
bash# Fetch all tags from remote to ensure local view is current git fetch --tags # Find the latest version tag, sorted semantically # --sort=-version:refname handles 1.10.0 > 1.9.0 correctly (unlike alphabetical) PREV_TAG=$(git tag --sort=-version:refname | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | head -1) echo "Latest tag: $PREV_TAG"
PowerShell# Fetch all tags from remote to ensure local view is current git fetch --tags # Find the latest version tag, sorted semantically # --sort=-version:refname handles 1.10.0 > 1.9.0 correctly (unlike alphabetical) $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 } Write-Output "Latest tag: $prevTag"
Then verify the tag exists on the remote (not just locally):
bashgit ls-remote --tags origin | grep "refs/tags/$PREV_TAG$"
If the remote check returns nothing, warn the user that the tag appears to be local-only and hasn't been pushed - they may want to push it before continuing.
PREV_TAG is the tag name exactly as found (e.g. v1.4.2). Strip any leading vwhen doing arithmetic; preserve it when naming things.
PREV_TAG as (none), set PREV_SHA to thefirst commit, and default the new version to 1.0.0 (skip Step 4 versioning logic; go straight to Step 5).
git rev-list --max-parents=0 HEAD and warn the user.
bashPREV_SHA=$(git rev-list -n 1 "$PREV_TAG" 2>/dev/null || git rev-list --max-parents=0 HEAD)
This step uses two complementary signals. The code diff is the primary source of truth; commit messages provide supporting context about intent.
bash# Focused diff on the public source path, excluding noise git diff "$PREV_SHA"..HEAD -- "$PUBLIC_PATH" \ ':(exclude)tests/' ':(exclude)test/' ':(exclude)spec/' \ ':(exclude)__tests__/' ':(exclude)docs/' \ ':(exclude)*.lock' ':(exclude)*-lock.json' ':(exclude)*.sum'
PowerShell# Focused diff on the public source path, excluding noise git diff "$($prevSha)..HEAD" -- $publicPath ` ':(exclude)tests/' ':(exclude)test/' ':(exclude)spec/' ` ':(exclude)__tests__/' ':(exclude)docs/' ` ':(exclude)*.lock' ':(exclude)*-lock.json' ':(exclude)*.sum'
Read the full diff output. For each changed file, identify:
existed before and are now gone. ? Strong signal for MAJOR.
parameters, return types, or thrown errors. ? Strong signal for MAJOR.
before. ? Signal for MINOR.
(private helpers, unexported functions, algorithm internals). ? PATCH.
null check, wrong condition), without changing the public API. ? PATCH.
If the diff is very large (thousands of lines), first run the stat summary to prioritise which files to read in full:
bashgit diff "$PREV_SHA"..HEAD --stat -- "$PUBLIC_PATH"
Focus your detailed reading on files with the most changes and files whose names suggest they define public interfaces (e.g. index.*, api.*, exports.*, public.*, mod.*, __init__.*).
bashgit log "$PREV_SHA"..HEAD --oneline --no-merges
Use this to:
the diff alone (e.g. a one-line security fix labelled as such).
PUBLIC_PATH but are still user-visible(e.g. a CLI flag change in a cmd/ directory).
story.
See references/commit-classification.md for mapping message patterns to change types.
When signals agree ? use that classification with confidence.
When signals conflict ? prefer the code diff. Examples:
fix: typo but the diff shows a removed public method ? treat as MAJOR.feat: new API but the diff only touches private internals ? treat as PATCH.chore: refactor but the diff adds new exported symbols ? treat as MINOR.Document any conflicts you notice - flag them to the user during the changelog review in Step 6.
Apply these rules to your analysis from Step 3 (full rules in references/semver-rules.md):
| Condition | Bump | |---|---| | Any breaking change to public API (removal, signature change, behaviour change) | MAJOR | | New exported symbol or feature, no breaking changes | MINOR | | Bug fix, perf improvement, security fix, docs, chore only | PATCH |
When a release contains a mix, the highest precedence wins: MAJOR > MINOR > PATCH.
Compute NEXT_VERSION:
PREV_TAG into MAJOR.MINOR.PATCH integers.vMAJOR.MINOR.PATCH.Present the proposed version to the user with a brief rationale that cites specific code findings, not just commit messages. Example:
> "I'm proposing v2.1.0. The diff shows two new exported functions (`NewClient` and > `WithTimeout`) in `src/client.go`, and no existing public symbols were removed or > changed. Commit messages corroborate this as feature additions."
Ask: "Does this version look right, or would you like to adjust it?" Wait for confirmation before proceeding.
Now that the version is confirmed, create the branch with the correct name from the start:
bashgit checkout -b release/vX.Y.Z git push -u origin release/vX.Y.Z
Read the existing CHANGELOG.md (or create it if absent). Follow the Keep a Changelog format strictly.
Structure to insert at the top (just below the # Changelog header):
markdown## [X.Y.Z] - YYYY-MM-DD ### Added - ... ### Changed - ... ### Deprecated - ... ### Removed - ... ### Fixed - ... ### Security - ...
Rules:
YYYY-MM-DD format.from what the code diff shows, supplemented by commit message context. Good: "Added `WithTimeout` option to HTTP client constructor." Bad: "feat: add timeout cfg param"
(e.g. a security fix disguised as a one-line change), include that context in the changelog entry.
markdown [X.Y.Z]: https://github.com/OWNER/REPO/compare/vPREV...vNEXT
Show the user the proposed changelog section before writing it to disk. If any signal conflicts were found in Step 3c, flag them here so the user can verify. Ask: "Does this changelog look accurate? Any entries to add, remove, or reword?" Incorporate feedback, then write to disk.
bashgit add CHANGELOG.md git commit -m "chore: release vX.Y.Z" git push origin release/vX.Y.Z
Confirm the push succeeded before moving on.
?? IMPORTANT: Always use --body-file to pass PR body text, never --body with inline text. Inline escape sequences like \n are not interpreted as newlines by PowerShell and will appear as literal text in the PR. Using a file ensures proper markdown formatting.
bashgh pr create \ --base main \ --head release/vX.Y.Z \ --title "Release vX.Y.Z" \ --body "$(cat <<'EOF' ## Release vX.Y.Z This PR prepares the **vX.Y.Z** release. ### What's included <!-- paste the changelog section here --> ### Checklist - [ ] Changelog reviewed - [ ] Version bump verified - [ ] CI passing After merging, create the tag on the merge commit: \`\`\` git tag vX.Y.Z <merge-commit-sha> git push origin vX.Y.Z \`\`\` EOF )"
`PowerShell# Create PR body using here-string (preserves actual newlines, not escape sequences) $prBody = @" ## Release vX.Y.Z This PR prepares the **vX.Y.Z** release. ### What's included <paste changelog here> ### Checklist - [ ] Changelog reviewed - [ ] Version bump verified - [ ] CI passing After merging, create the tag on the merge commit:
git tag vX.Y.Z <merge-commit-sha> git push origin vX.Y.Z
"@
# Write to file and use --body-file (do NOT use inline --body with escape sequences)
$prBody | Out-File -FilePath release_pr_body.md -Encoding utf8 -NoNewline
gh pr create --base main --head release/vX.Y.Z --title "Release vX.Y.Z" --body-file release_pr_body.mdPaste the changelog section into the PR body's "What's included" block (or leave placeholder for manual review).
Tell the user:
> Release PR is open! ?? > > New version: vX.Y.Z > > Once the PR is reviewed and merged, you'll need to create the tag yourself on > the merge commit: > > bash > git tag vX.Y.Z <merge-commit-sha> > git push origin vX.Y.Z > > > Then go to GitHub Releases and publish the release from that tag. You can copy the > changelog section directly into the release notes.
| Situation | What to do | |---|---| | gh auth status fails | Stop; tell user to run gh auth login | | Not inside a git repo | Stop; tell user to cd into their repo | | Working tree is dirty | Warn; ask if they want to stash or abort | | No commits since last tag | Tell user there's nothing to release | | Tag exists but points to no commit | Use first commit as diff base; warn user | | Latest tag exists locally but not on remote | Warn user; ask if they want to push the tag first or continue anyway | | Diff is empty for PUBLIC_PATH but commits exist | Warn; all changes may be internal; ask if they still want to proceed | | git push fails (e.g. protected branch rules) | Report the error verbatim; suggest they check branch protection settings |
invoking the gh.exe on PATH (Get-Command gh) and avoid passing unexpanded nested substitutions; use the PowerShell patterns above.
gh CLI to be installed and authenticated.references/semver-rules.md - Extended SemVer decision rules and edge casesreferences/commit-classification.md - Heuristics for classifying commit messages into change types| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 18,462 | 1,965 | -89% | 1 | 1 | 0% | 2,678 | 4,091 | +53% | 0 | 0 | — |
case-02 | fail→fail | 5,306 | 1,941 | -63% | 1 | 1 | 0% | 575 | 4,124 | +617% | 0 | 0 | — |
case-03 | fail→fail | 2,613 | 3,962 | +52% | 1 | 1 | 0% | 357 | 4,312 | +1108% | 0 | 0 | — |
case-04 | pass→pass | 10,222 | 3,252 | -68% | 1 | 1 | 0% | 1,616 | 4,344 | +169% | 0 | 0 | — |
case-05 | fail→pass | 8,578 | 3,020 | -65% | 1 | 1 | 0% | 741 | 4,285 | +478% | 0 | 0 | — |
case-06 | pass→pass | 5,429 | 2,775 | -49% | 1 | 1 | 0% | 916 | 4,312 | +371% | 0 | 0 | — |
case-07 | fail→pass | 9,394 | 3,142 | -67% | 1 | 1 | 0% | 1,507 | 4,426 | +194% | 0 | 0 | — |
case-08 | pass→pass | 17,679 | 3,899 | -78% | 1 | 1 | 0% | 1,400 | 4,489 | +221% | 0 | 0 | — |
case-09 | pass→pass | 5,547 | 2,731 | -51% | 1 | 1 | 0% | 869 | 4,326 | +398% | 0 | 0 | — |
case-10 | pass→pass | 8,241 | 3,613 | -56% | 1 | 1 | 0% | 1,427 | 4,412 | +209% | 0 | 0 | — |
case-11 | pass→pass | 4,234 | 2,137 | -50% | 1 | 1 | 0% | 716 | 4,264 | +496% | 0 | 0 | — |
case-12 | pass→pass | 3,639 | 2,091 | -43% | 1 | 1 | 0% | 651 | 4,192 | +544% | 0 | 0 | — |
case-13 | pass→pass | 3,865 | 3,050 | -21% | 1 | 1 | 0% | 636 | 4,414 | +594% | 0 | 0 | — |
case-14 | fail→pass | 6,238 | 1,963 | -69% | 1 | 1 | 0% | 960 | 4,233 | +341% | 0 | 0 | — |
case-15 | pass→pass | 3,136 | 2,361 | -25% | 1 | 1 | 0% | 491 | 4,259 | +767% | 0 | 0 | — |
case-16 | pass→pass | 2,975 | 1,480 | -50% | 1 | 1 | 0% | 457 | 4,121 | +802% | 0 | 0 | — |
case-17 | pass→pass | 11,680 | 5,362 | -54% | 1 | 1 | 0% | 1,836 | 4,709 | +156% | 0 | 0 | — |
case-18 | fail→pass | 8,326 | 5,450 | -35% | 1 | 1 | 0% | 1,391 | 4,696 | +238% | 0 | 0 | — |
case-19 | fail→pass | 13,059 | 3,824 | -71% | 1 | 1 | 0% | 2,285 | 4,492 | +97% | 0 | 0 | — |
case-20 | pass→pass | 4,065 | 3,104 | -24% | 1 | 1 | 0% | 712 | 4,307 | +505% | 0 | 0 | — |
case-21 | pass→pass | 12,962 | 9,840 | -24% | 1 | 1 | 0% | 2,322 | 5,698 | +145% | 0 | 0 | — |
case-22 | pass→pass | 12,984 | 9,315 | -28% | 1 | 1 | 0% | 2,252 | 5,480 | +143% | 0 | 0 | — |
case-23 | pass→pass | 12,122 | 12,895 | +6% | 1 | 1 | 0% | 2,122 | 6,352 | +199% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +22 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/24/2026 | +27% |
Other measured skills in the registry, with their headline benchmark lift.