/gh-release:gh-releasefrom gh-release
Cuts a manual GitHub release for a single-package repo: defers to release-please, semantic-release or changesets when present, proposes a SemVer bump from the public-API diff, drafts a Keep a Changelog entry, opens a release PR, then tags and publishes with gh after approval. Use when asked to cut or prepare a release or changelog entry by hand. Not for Forgejo or Codeberg (`forgejo-release`).
Ships in gh-release. 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 by hand only when no tool owns the release. Not for the Conventional Commit contract that drives release-please (git-commit) or release workflow files (gh-actions).
Each tag, push, and published release is irreversible or public, so ask for explicit approval of the exact command before running it. Steps 1 to 4 are read-only.
Forge gate. Proceed when the origin host is github.com or one gh auth status --hostname <host> knows; otherwise stop with "not a GitHub remote; on Forgejo or Codeberg use forgejo-release if installed".
Look for any of these before proposing anything:
ls release-please-config.json .release-please-manifest.json .releaserc* release.config.* \
.changeset cliff.toml .goreleaser.y*ml .versionrc* towncrier.toml pyproject.toml 2>/dev/null
grep -rEil 'release-please|semantic-release|changesets/action|goreleaser|git-cliff' .github/workflows package.json 2>/dev/null
cat .github/release.yml 2>/dev/null
A hit means that tool already writes the changelog, bumps the version, or tags. A hand-edited CHANGELOG.md or a manual tag then conflicts with it (duplicate entries, wrong version, a second release).
| Found | Do instead |
|---|---|
| release-please | Land Conventional Commits (git-commit) and merge its release PR. Don't edit the changelog or tag |
| semantic-release | Merge to the release branch with correct commit messages. It tags and publishes from CI |
| changesets | Add a changeset (npx changeset, using the repo's installed version) and merge the "Version Packages" PR |
| GoReleaser, git-cliff, towncrier | Run the configured command or push the tag the config expects. Read its docs, and don't also hand-edit generated output |
.github/release.yml only | It configures GitHub's generated release notes. Use gh release create --generate-notes and skip a hand-written changelog |
Tell the user which tool you found and stop the manual flow unless they still want it. If nothing is found, continue.
gh auth status
git status --short --branch
git fetch --tags origin
Work from the default branch, up to date, with a clean tree. If the tree is dirty or the branch is behind, report it and ask. Ask which directory holds the public-facing code (for example src/, lib/, pkg/) to focus the diff. Default to the repo root.
Read tags from git, since many repos tag without creating GitHub Releases:
PREV_TAG=$(git tag --sort=-version:refname --merged HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | head -1)
git ls-remote --tags origin "refs/tags/$PREV_TAG"
The $ anchor skips pre-releases such as v1.2.0-rc.1, which version sort would otherwise rank above v1.2.0. Keep the v prefix if the repo uses it. If the tag is missing on the remote, warn that it is local-only. If no tag exists, this is a first release. Ask for the version (SemVer reserves 0.y.z for initial development, so 0.1.0 or 1.0.0 is the maintainer's choice). If there are no commits since the tag, say there is nothing to release.
The code diff is the primary signal and commit messages are the second:
git diff --stat $PREV_TAG..HEAD -- <public-path> ':(exclude)*test*' ':(exclude)docs' ':(exclude)*.lock'
git log --no-merges --format='%h %s' $PREV_TAG..HEAD
If the codebase-memory MCP tools are available, detect_changes and search_graph (exported symbols in the public path) speed up this survey; still read the diff itself. Read the diff for removed or renamed public symbols, changed signatures, changed observable behavior, and new exports. Skip tests, docs, lockfiles, and generated files. Map findings to a bump (details in semver):
| Evidence | Bump |
|---|---|
| Removed or incompatible public API, dropped runtime support | MAJOR |
| New backward-compatible feature or export, deprecation | MINOR |
| Bug fix, performance, security fix, internal change | PATCH |
The highest wins. When the code and a commit message disagree (fix: typo that removes a public method), trust the diff and flag the conflict to the user. Below 1.0.0, apply the project's own stated convention.
Propose the version with the specific findings behind it, and wait for the user to confirm or change it.
Edit CHANGELOG.md in Keep a Changelog 1.1.0 form. Create it only if the repo has none and the user wants one. Details and an example are in changelog. Show the proposed entry and wait for approval before writing the file.
Branch release/<version> from the default branch, commit the changelog (and the version file if the repo keeps one) following git-commit, push, and open the PR through gh-pr. Each of those steps needs approval. If the repo allows releasing directly from the default branch, ask whether to skip the PR.
After the release PR merges, and only on the user's explicit go-ahead for each command:
git fetch origin && git checkout <default-branch> && git pull --ff-only
git tag -a <version> <merge-commit-sha> -m "<version>"
git push origin <version>
gh release create <version> --verify-tag --title "<version>" --notes-file <entry-file> --draft
Create the release as a draft first and show the user the result (gh release view <version> --web or --json). Publish with gh release edit <version> --draft=false once they agree. If the repo has release immutability enabled, tags and assets can't change after publishing, so the draft review matters. Use --prerelease for pre-1.0 candidates the user calls prerelease, and --latest=false to leave the Latest badge alone. Without --verify-tag, gh creates a missing tag from the default branch's latest state, which can pick the wrong commit.
Pushing the tag may trigger a publish workflow. Check .github/workflows for on: push: tags before pushing and tell the user what will run.
| Situation | Action |
|---|---|
gh auth status fails | Stop and ask the user to run gh auth login |
| Dirty tree or behind remote | Report it and ask whether to stash, pull, or abort |
| Push rejected by branch rules | Report the error text and point to the ruleset. Don't bypass |
| Tag already exists | Stop. Never move or delete a published tag without explicit approval |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin gh-release