/anchor:releasefrom anchor
Cut a release for what has landed — recommend a semver bump, draft the notes, and drive the repo's own publish path. Use when releasing, publishing, cutting a version, or shipping a new version.
Ships in anchor. 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.
None: SKILL.md is the whole skill.
Turn what has landed since the last release into a released version: work out what is shipping, recommend a semver bump, draft notes a user of the project can read, and publish along the path the repo's own release model prescribes.
This is the step after /anchor:merge. It is always invoked explicitly —
merge names it as the next step but never runs it, because publishing is a
deliberate act and batching several merges into one release is the normal shape.
So this skill assumes nothing about a preceding merge in the same session: it
reads the release state from the repo, and runs the same way whether one CR just
landed or five did last week.
Release model = who owns the version bump: a CI workflow, a commit in this repo, or nobody — and where the repo states its own publish path, that statement rather than the inference. It is the first thing to establish and the one thing worth being certain about — hand-editing a manifest whose workflow also bumps it lands two commits that fight, and it surfaces only after the release is public.
Don't narrate your work. Every step below is an operating instruction, not a
script to read aloud — follow the execute-quietly discipline:
${CLAUDE_PLUGIN_ROOT}/guides/execute-quietly.md. For this skill, the only things
worth surfacing are the resolved repo and model in one line, any fork that needs
the author, the version recommendation, and the one-line result.
%%{ init: { 'look': 'handDrawn' } }%%
flowchart TD
Start(["/release"]) --> Recon["Resolve repo + run release-recon.sh"]
subgraph "Step 1: Model"
Recon --> Model{RELEASE_MODEL}
Model -->|no-version-artifact| Report0["Report the range, stop"]
Model -->|other| Range{Commits in range?}
Range -->|None| Report0
end
subgraph "Step 2-3: Version"
Range -->|Some| Classify["Classify: breaking, features, fixes, other"]
Classify --> Ever{Ever versioned?}
Ever -->|Never| AskConv["Ask: start versioning?"]
Ever -->|Yes| Semver["Recommend the bump"]
AskConv --> Semver
end
subgraph "Step 4: Notes"
Semver --> Notes["Draft user-facing notes"]
end
subgraph "Step 5: Publish by model"
Notes --> Which{Which model?}
Which -->|release/tag-triggered| ReviewNotes["Review notes, confirm, publish"]
Which -->|dispatch-triggered| Stage["Notes into the changelog"]
Which -->|bump-commit| Bump["Bump source, edit changelog"]
Bump --> Commit["Hand to /anchor:commit"]
Stage --> Dispatch["Commit, then dispatch with the level"]
Dispatch --> Follow
ReviewNotes --> Follow["Watch workflow, fast-forward local"]
end
Follow --> Done([One-line result])
Commit --> Done
Settle whether the task tools exist and whether an orchestrator owns the list as
${CLAUDE_PLUGIN_ROOT}/guides/task-tracking.md describes. With the tools and no
orchestrator, enumerate:
Establish the release modelDecide the version and draft the notesPublishResolve the repo as the other anchor skills do. With a name argument, resolve
it with ${CLAUDE_PLUGIN_ROOT}/scripts/resolve-target.sh <name>
(see the cookbook's "Resolving a named target repo"): TARGET_VIA=resolved → use
TARGET_LOCAL as the checkout — this skill reads git history and may commit, so it
needs one; if TARGET_LOCAL is empty, ask where the checkout lives rather than
proceeding. ambiguous → prompt with TARGET_CANDIDATES. cwd (no match) → fall
back to a substring-match against repos the session has touched.
With no argument, git rev-parse --show-toplevel from the working directory;
ambiguous → ask.
When the target repo isn't the working directory, pass it through rather than
cd-ing: --repo <checkout> on the helpers below, -C <repo> on git, and
-R <owner/name> on gh/glab (the URL-encoded project for :fullpath, plus
--hostname <host>, on glab api). The retargeting rules are in
${CLAUDE_PLUGIN_ROOT}/guides/forge-cookbook.md ("Targeting a repo that isn't the
working directory").
One recon pass supplies every fact this skill would otherwise derive by hand. Read it, don't re-derive it — re-running these git and CI reads by hand is the waste this helper exists to remove:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/release-recon.sh"
RELEASE_MODEL decides the whole path. Read the matching section of
${CLAUDE_PLUGIN_ROOT}/guides/release-models.md — it carries the per-model
procedure and the traps each one hides:
RELEASE_MODEL | Who bumps | What Step 5 does |
|---|---|---|
release-triggered | the CI workflow (RELEASE_WORKFLOW) | create a forge release; never touch the manifest |
tag-triggered | the CI workflow | push an annotated tag |
dispatch-triggered | the CI workflow (RELEASE_WORKFLOW) | commit the notes, then dispatch it with the level; never touch the manifest |
bump-commit | this skill | bump, edit the changelog, commit |
no-version-artifact | nobody | nothing — report and stop |
RELEASE_MODEL is inferred from the repo's CI triggers, which is the right
answer only for a repo that hasn't said otherwise. A repo is the authority on
how it publishes, so where it states that, the statement wins.
RELEASE_PUBLISH_DOCS names the docs that state one — a comma-separated list of
existing files, empty when none of them mention releasing. Empty is the common
case: act on RELEASE_MODEL and don't raise it. Where it names a file, read
that file for the publish path before doing anything else, and:
bump-commit").
Don't argue the inference; the doc is the author writing down what they do.This is a targeted read of a named file for one fact, not a general instruction to reason from the whole document.
Two states end the run here, and both are correct outcomes rather than failures:
no-version-artifact — no manifest, so there is no version to recommend and
nothing to publish. The merge already was the release. Say so, summarize what
RELEASE_RANGE contains, and stop. Where the merge triggers a deploy, add its
state via /anchor:pipeline rather than inventing a publish step.RELEASE_COMMITS=0 — nothing has landed since RELEASE_LAST_REF. Report
that the last release is current and stop; don't manufacture a version.Two states need surfacing before going further:
RELEASE_DIRTY=1 — uncommitted changes. A release describes committed work.
Surface the dirty tree and ask whether to commit it first (/anchor:commit) or
release what's committed.RELEASE_UNPUSHED > 0 with RELEASE_ON_DEFAULT=1 — local commits the remote
hasn't seen. On every model where a workflow owns the bump it builds from the
remote, so publishing now would ship without them. Push first.Read the range the recon block resolved (RELEASE_RANGE) — both the log and the
diff, because a commit's subject is what the author called it and the diff is what
it did:
git log <RELEASE_RANGE> --oneline
git diff <RELEASE_RANGE> --stat
git diff <RELEASE_RANGE>
Sort each meaningful change into one bucket. A change can touch several; pick the most significant.
RELEASE_LAST_REF_KIND says what the range is anchored to: tag (a real prior
release), bump-commit (no tags — the last commit that moved the version), or
root (nothing has ever shipped, so this is a first release). On root, say that
this is the first release rather than describing the whole history as changes.
Apply semver to RELEASE_VERSION: any breaking change →
major; otherwise a new feature → minor; otherwise → patch.
Three cases are the author's decision, not the skill's. Put each through
AskUserQuestion with the recommendation first:
RELEASE_VERSION_BUMPS=0. The version has never moved, so this repo hasn't
opted into per-release versioning — starting is a change of convention. Ask
(start versioning at the recommended bump / keep the existing no-bump
convention); don't default to a bump.RELEASE_CHANGELOG_HAS_CURRENT=1. The current version already has a
changelog section, so it looks already shipped. Releasing that same version
again is usually a no-op that writes nothing — confirm the next version rather
than accreting into a section users already have. Never rewrite a shipped
section's bullets.Write the notes for someone who uses the project and never reads its diffs. Lead each bullet with the effect, not the edit:
--timeout flag to run" → "commands can be given a timeout, so a
hung call fails instead of blocking".AuthService to rotate tokens" → "tokens rotate automatically,
so sessions stop expiring mid-request".Use the categories from Step 2 as ### sections, omitting empty ones, under a
heading naming the new version. Where a breaking change is present, its section
goes first and says what the consumer must change.
anchor.* configRead the project + global keys once — git config --get-regexp '^anchor\.' 2>/dev/null — and match the names case-insensitively (--get-regexp lowercases them). Absent keys keep anchor's defaults; never invent a value.
anchor.release.verbosity — an integer 1–100 setting where the notes sit between brevity and thoroughness. Unset behaves as 10 — the lowest of anchor's four verbosity defaults, which descend as the audience widens (issue 75 → commit 50 → CR 25 → release 10). Release notes have the widest audience of anything anchor writes, and most of that audience is reading to find out whether this release affects them. Clamp an out-of-range or non-integer value into the 1–100 band and say so once rather than failing the draft.
It shortens entries; it never drops one. Every change in scope has its bullet at 1 as it does at 100, and a breaking change keeps its migration steps at every setting — a reader who never learns a change shipped is a reader the notes failed. Work down this order and stop where the draft balances where the setting asks: the rationale for a change → the consequences a reader can infer from the effect you already stated → each bullet down to its floor, the change as its effect on someone using the project. At the default that floor is most of what's left, which is the intent.
Two conventions to honor: the loaded-framing discipline in
${CLAUDE_PLUGIN_ROOT}/guides/loaded-framing.md (notes state what changed, not
how hard it was or how little it touched), and the forge's markdown quirks in
${CLAUDE_PLUGIN_ROOT}/guides/markdown-gotchas.md (a release body renders as
forge markdown). Write the notes to RELEASE_NOTES_PATH from the recon block —
every consumer below takes them by file, never as an inline escaped string.
Read the matching section of ${CLAUDE_PLUGIN_ROOT}/guides/release-models.md
before writing anything. The two families differ in what gets reviewed, because
they differ in where the notes end up.
Which family a model belongs to is decided by where the notes end up, not by
what fires the publish: release-triggered and tag-triggered put them in the
published body, bump-commit and dispatch-triggered put them in a commit.
release-triggered and tag-triggered — the notes are the published bodyThe workflow owns the bump; the notes never enter a commit, so they get the review gate themselves.
Which mode takes the notes follows the subject. An empty
RELEASE_NOTES_BASELINE — nothing accrued yet — makes the notes all new, so the
edit mode takes them: they open in the user's editor and whatever they
save is the notes. A baseline with sections already in it has real hunks, so
diff takes it. An editor with nowhere to open gives way to diff.
Run it as the review loop in ${CLAUDE_PLUGIN_ROOT}/guides/running-a-review.md
describes — probe, background launch, manifest, chat feedback while it's open,
reading the verdict — opening the notes against RELEASE_NOTES_BASELINE (the
empty left-hand side the recon block created):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/review-diff.sh" --skill release --probe \
--files <RELEASE_NOTES_BASELINE> <RELEASE_NOTES_PATH> \
--title '<repo> <NEW_VERSION> release notes' \
--detail version=<NEW_VERSION> --detail range=<RELEASE_RANGE>
bash "${CLAUDE_PLUGIN_ROOT}/scripts/review-diff.sh" --skill release --mode <REVIEW_MODE> --files \
<RELEASE_NOTES_BASELINE> <RELEASE_NOTES_PATH> --name '<repo>@<NEW_VERSION>' \
--title '<repo> <NEW_VERSION> release notes' \
--detail version=<NEW_VERSION> --detail range=<RELEASE_RANGE>
The manifest names the repo, the version being released, the range the notes cover, the tool from the probe, and the sections the draft holds.
What each verdict leads to here: approved moves on to the publish
confirmation below with <RELEASE_NOTES_PATH>, which an approved review leaves
holding the approved notes, the reviewer's edit included;
changes-requested folds the comments in and re-opens; rejected publishes
nothing and stops, with no fallback; no-verdict with raw.exitCode undecided asks Accept, Reject, or Reopen and acts on the answer (${CLAUDE_PLUGIN_ROOT}/guides/running-a-review.md); incomplete,
any other no-verdict, a missing verdict line, and a probe reporting nothing installed
take the ladder in ${CLAUDE_PLUGIN_ROOT}/guides/review-fallback.md with the
drafted notes as the artifact.
Then confirm the publish explicitly, even after an approved review. This is
the one place anchor keeps a second gate: a CR description is editable, but a
published release is public the instant it exists and its tag may be immutable.
State the version, the tag, and the model's consequence, and take a yes/no:
Publishing
v1.2.0creates the tag and fires.github/workflows/release.yml, which owns the version bump and changelog. Proceed?[yes / no]
On yes, publish — the notes by file, never --generate-notes (a generated body
lands unrelated prior CRs in the changelog the workflow writes). The two models
publish differently:
release-triggered — create the forge release with the notes as its body,
through the publish script (a raw release create is denied by anchor's hook):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/release-publish.sh" \
--release v<X.Y.Z> --notes-file <RELEASE_NOTES_PATH>
Creating it makes the tag, and RELEASE_URL is the release, read back from
the forge. Leave the
target at its default, the default branch's tip, which the recon block has
already established HEAD to be (RELEASE_ON_DEFAULT=1, RELEASE_UNPUSHED=0);
reach for --target only to tag a different commit, and pass the
full 40-char sha there, because GitHub rejects an abbreviated one.
tag-triggered — the tag is the trigger: annotate it with the notes and
push it as its own step (git tag -a v<X.Y.Z> -F <RELEASE_NOTES_PATH> then
git push origin v<X.Y.Z>), so a failed push doesn't leave a local-only tag
that looks published. Add a forge release afterward only where the repo already
publishes them.
On a 401/403, surface it and ask for fresh credentials; do not retry or reach for another path.
The create returning a URL is not the finish line. Two follow-throughs, both easy to drop precisely because the publish already succeeded:
/anchor:pipeline, which watches in the background and
runs silently under an orchestrator. Hand it the workflow by name
(--workflow <RELEASE_WORKFLOW>) and watch before the pull below: this run
belongs to the commit that was tagged, and it shares that commit with whatever
the merge already ran, so naming the workflow is what makes the verdict the
release's.git pull --ff-only, once the run is green. Do it; don't offer it. That commit
carries generated content, so skipping it leaves the tree missing files and the
next push rejected as non-fast-forward.dispatch-triggered — the notes are committed, then the workflow runsThe workflow owns the bump, the tag, and the published body; it reads the notes
out of the changelog, so they have to be committed before it starts. That puts
them in a commit — reviewed there, like bump-commit, which is why
RELEASE_NOTES_BASELINE is empty and there is no separate notes review.
Write the notes into the changelog's accruing section. Where
RELEASE_CHANGELOG_UNRELEASED=1, fill that section and leave its heading
alone — the workflow retitles it to the version it derives. Reconcile the
bullets already in it against RELEASE_RANGE; they may predate later changes
in the same release.
Do not bump the manifest or its source, and do not tag. Those are the workflow's, and doing them here lands a commit that fights its own.
Land the notes through /anchor:commit, which runs the tests, reviews the
diff, writes the message, and pushes. The workflow builds from the remote, so
the push has to land before the dispatch.
Confirm the dispatch explicitly, the same second gate the published-body models get and for the same reason — the run publishes, and its tag may be immutable. State the workflow, the level, and what the run owns:
Dispatching
.github/workflows/release.ymlwithbump=minorfires the run that derivesv1.8.0, retitles the changelog section, commits, tags that commit, and publishes. Proceed?[yes / no]
Ask it as its own question, after the notes commit has landed. An approval of the notes, or of the commit that carries them, is not this approval.
Dispatch it through the publish script, passing the level by the input's
own declared name — the recon block resolved it, so don't assume bump:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/release-publish.sh" \
--dispatch <RELEASE_WORKFLOW> --input <RELEASE_DISPATCH_BUMP_INPUT>=<level>
RUN_URL is the run to watch. A raw gh workflow run on a release workflow
is denied by anchor's own hook, which is what keeps this step inside the
skill; if the script's call is denied too, report that and stop. Never hand
the raw command to the user to run with !: it skips this confirmation and
the follow-through below.
Where RELEASE_DISPATCH_INPUTS lists inputs beyond the level, ask rather than
leaving a required one unset — a dispatch missing one fails before the run
starts. Where RELEASE_DISPATCH_BUMP_INPUT is empty, the workflow declares no
input that carries a level: report the inputs it does declare and ask which to
pass rather than guessing a name.
On GitLab there is no dispatch equivalent for a tag-gated pipeline; a repo whose docs describe a manual pipeline run is the "path no model covers" case in Step 1 — say what the doc says and stop.
Then follow through, exactly as the published-body models do. gh workflow run exits as soon as the run is queued, so nothing is released yet:
/anchor:pipeline, naming the
workflow (--workflow <RELEASE_WORKFLOW>). A red run leaves the release
unmade, and the dispatch's own success says nothing about it. This run
supersedes the watch /anchor:commit started on the notes push, so stop
that one (${CLAUDE_PLUGIN_ROOT}/guides/watching-a-pipeline.md).git pull --ff-only — once it is
green. The run pushed the bump commit and the tag; do the pull, don't offer
it.bump-commit — the bookkeeping is a commitHere the notes land in the repo, so they are reviewed as part of the commit
rather than on their own — /anchor:commit opens the whole bookkeeping diff for
review before committing, and a separate notes review would ask the same question
twice.
RELEASE_MANIFEST_SOURCE when it's set — the
manifest is generated from it — then run RELEASE_MANIFEST_REGEN. Otherwise
edit RELEASE_MANIFEST. Read the manifest with the Read tool before editing
so the Edit lands without a retry.RELEASE_CHANGELOG_UNRELEASED=1,
retitle that section to the new version rather than inserting a section above
it — a fresh one leaves a duplicate empty Unreleased heading. Reconcile its
existing bullets against the range while there.RELEASE_BUMP_CONVENTION (standalone / fold /
mixed — the guide has the per-value call), then hand off to
/anchor:commit, which runs the tests, reviews the diff, writes the message,
and pushes. Don't hand-roll git commit / git push here.One line: the version, how it published, and where to see it —
Released v1.2.0 (minor) — <release url> for the models that publish a release
body, or Released v1.2.0 (minor) in <sha> for a bump commit. On
dispatch-triggered the version is the workflow's to derive, so report what the
run produced rather than what was recommended. Add the pipeline verdict
when Step 5 watched one.
Where a release exists on the forge, announce it, so a sibling tracking deliverables learns what shipped:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/announce.sh" release.created \
"uri=<release url>" "tag=<tag>"
Read both back from the forge rather than assembling them from the version this
run recommended. On tag-triggered and dispatch-triggered the workflow derives
the version and creates the release, so what it published is the only authority:
gh release view --json url,tagName # GitHub
glab release view -F json | jq '{url: ._links.self, tag_name}' # GitLab
Both default to the project's latest release, which is what just published; name
the tag explicitly only where this run set it. GitLab's release object carries no
url of its own, so the web address is _links.self (cookbook: "Read back a
published release").
On bump-commit and no-version-artifact there is no forge release to name, so
announce nothing here; what landed is the bookkeeping commit, which
/anchor:commit already announced as commit.pushed.
The publisher exits 0 on every path, so this can never turn a release that published into a tool call that failed.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (chris-peterson/anchor) — no native marketplace selected
npx claudepluginhub p/chris-peterson-anchor13 skills in this plugin
/amendFold the staged changes into the last commit — commit's flow with the amend already chosen, so tests and the review still run before it amends and pushes. Use when amending, fixing up HEAD, or folding a change into the previous commit./backlogList and rank the forge issues assigned to you, work already in flight first, so you can pick what to work on next — each issue is checked against the open CRs and branches carrying it, each CR for its draft state and whether you've run /anchor:review on it, and stale issues are flagged for an /anchor:issue batch. Use whenever finding, browsing, surveying, or choosing the next issue/ticket or CR to pick up, even when the user doesn't say "backlog" — e.g. "what's next?", "what should I work on?", "anything due soon?", "show my open issues", "what's in flight?", "is my backlog stale?". For filing or updating a single issue, use the `issue` skill instead./commitStage changes, run tests, review the diff and drafted commit message with the user, then commit and push once they approve. Use when work is ready to commit or push; the diff review is a step of this skill, so don't offer to show the changes as a separate step beforehand./issueFile a new forge issue (or update an existing one) that leads with WHY the work is needed, or review edits to several issues as one batch. Use when filing, creating, drafting, or updating an issue or ticket, or editing several at once (retitle, relabel, close, rewrite bodies). To find, browse, or pick which issue to work on next, use the `backlog` skill instead./mergeMerge an approved change request once its gates are green — waiting on the pipeline if needed — then clean up the branch. Use when merging or landing a PR/MR./pipelineReport a commit's forge pipeline state, or watch until it settles. Use when checking the status of a pipeline, build, CI, or GitHub Actions run — or watching one to completion.