agentsclimarketplace

Release

Skill Sob7i/agentic-skills/skills/release

Cut a gated release (BASE_BRANCH → RELEASE_BRANCH). Use when asked to "cut a release", "release the work", "tag a release", "open the release PR", or "do a develop → main merge". Drives the flow end-to-end — version proposal, changelog fold, both PRs, annotated tag, GitHub Release — with the human-merge gates in the right places.From its SKILL.md

Install
npx -y skills add Sob7i/agentic-skills --skill release

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

9.3 KB, as published. Nobody here has run it

Release

Drive a BASE_BRANCH → RELEASE_BRANCH release from start to finish in one invocation. If the host repo declares a RELEASE_PROCESS_DOC, that document stays the source of truth for why each step exists — this skill is the executable driver: it sequences the steps, stops at the two gates that are genuinely the human's (version bump, and the merges), and picks up where it left off when you re-invoke it after a gate.

Project constants (resolve first)

Read the host repo's CLAUDE.md for a ## Loop constants block (seeded from this plugin's templates/PROJECT_CONSTANTS.md). Used here: BASE_BRANCH, RELEASE_BRANCH, CHANGELOG_CONVENTION, VERSION_HOME, RELEASE_PROCESS_DOC (optional), RELEASE_REGRESSION_DOC (optional), DRIFT_STASH_PATHS (optional). If the block is missing, ask once and offer to add it. If BASE_BRANCH == RELEASE_BRANCH (trunk-based), skip the changelog-PR/release-PR split: fold the changelog on a short-lived branch, PR it, and after that single human merge go straight to Phase B.

Shape of the run (why it isn't literally one keystroke)

A release spans two human-owned merges, so the skill runs in three phases with the merges as gates between them. Re-invoke /release after each gate — the skill detects state and resumes.

Phase A  (skill)   preflight → propose version → fold changelog → open BOTH PRs
   └─ GATE 1: human merges the changelog PR into BASE_BRANCH
   └─ GATE 2: human merges the release PR into RELEASE_BRANCH
Phase B  (skill)   tag the merge commit → push (runs hooks/tests) → create GitHub Release → report

Why the human does the merges: agent-initiated gh pr merge on agent-authored PRs is frequently blocked (Claude Code's auto-mode classifier fired in the session that motivated this skill), and no-self-merge is a standing guardrail regardless. Don't fight it — prep everything, then hand off the merges cleanly. If the user has explicitly told you to merge and the environment allows it, you may; otherwise assume the human merges.

Resume detection (run first, every invocation)

Figure out which phase you're in before doing anything:

git fetch origin --tags --quiet
git tag -l | tail -5                                   # is the intended vX.Y.Z tag already pushed?
git show origin/<BASE_BRANCH>:CHANGELOG.md | grep -nE '^## \[' | head   # [Unreleased] populated, or already folded?
git log --oneline origin/<RELEASE_BRANCH>..origin/<BASE_BRANCH> | head  # what's unreleased
gh pr list --state open --base <RELEASE_BRANCH>        # is the release PR already open?
gh pr list --state open --base <BASE_BRANCH>           # is the changelog PR already open?
  • [Unreleased] still has entries + no release PR → Phase A from the top.
  • Release PR open, [X.Y.Z] section present on BASE_BRANCH, merges not done → you're between gates; tell the human what to merge, then stop.
  • Both merges done (release PR merged, tag absent) → Phase B: tag + release.
  • Tag already pushed + GitHub Release exists → done; just report.

Phase A — prepare the release

A1. Preflight

git fetch origin --quiet
git log --oneline origin/<RELEASE_BRANCH>..origin/<BASE_BRANCH>   # commits to be released
git diff --stat origin/<RELEASE_BRANCH>..origin/<BASE_BRANCH>     # scope of the diff
git status -sb
  • If DRIFT_STASH_PATHS is set, stash exactly those paths so working-tree drift can't contaminate branch checkouts — never a blanket git stash: git stash push -m "release drift" <DRIFT_STASH_PATHS> (drop whichever isn't dirty).
  • Confirm BASE_BRANCH is genuinely ahead of RELEASE_BRANCH. If not, there's nothing to release — stop.

A2. Propose the version bump (GATE — required approval)

  • If the changelog's version sections carry a PR-range Status line, compute the new range the same way (previous section ended at PR #B → new range is #(B+1)–#(latest merged); read the highest PR from the merge-commit subjects in the preflight log).
  • Bump size, from what [Unreleased] in CHANGELOG.md actually contains, per the repo's versioning policy (CHANGELOG_CONVENTION / RELEASE_PROCESS_DOC):
    • Added entries (new user-facing capability) → minor.
    • Only Fixed / Changed / Performance / Documentation → patch.
    • BREAKING → major (pre-1.0 repos may keep it minor if tightly scoped — flag it).
  • Propose it with AskUserQuestion and wait for explicit approval. Never tag silently. Put the recommended bump first, labelled (Recommended), and say why (which entry classes drove it).

If RELEASE_REGRESSION_DOC is set, run its pre-release regression pass — core happy paths plus a targeted check per [Unreleased] entry. Skip only when the entire diff has no runtime surface (pure docs/config/agent-tooling/images) — say so explicitly when you skip. A regression caught here blocks the release.

A3. Fold [Unreleased] into the version section

git checkout -b chore/release-vX.Y.Z-changelog origin/<BASE_BRANCH>

Edit CHANGELOG.md with Edit, never Write (preserve every entry verbatim):

  • Insert a new ## [X.Y.Z] — YYYY-MM-DD section (today's date) directly below the [Unreleased] header, moving all [Unreleased] entries into it under their Keep-a-Changelog headings.
  • Mirror whatever per-section furniture prior versions carry (e.g. a Status line naming the PR range).
  • Reset [Unreleased] to just its header + intro line (no category subsections).

Commit only CHANGELOG.md (hooks may run lint/type-check), then push:

git commit -m "docs(changelog): fold [Unreleased] into [X.Y.Z] ..."   # Co-Authored-By trailer
git push -u origin chore/release-vX.Y.Z-changelog

A4. Open both PRs

  1. Changelog PR → BASE_BRANCH (gh pr create --base <BASE_BRANCH> --head chore/release-vX.Y.Z-changelog).
  2. Release PR → RELEASE_BRANCH (gh pr create --base <RELEASE_BRANCH> --head <BASE_BRANCH>). It tracks BASE_BRANCH's tip, so once the changelog PR merges the [X.Y.Z] section appears in it automatically. In the body, list the included PRs, the version rationale, and a prominent note of the merge order (changelog PR first, then the release PR).

A5. Hand off the merge gates, then stop

Tell the human the exact sequence and stop:

Both PRs are open. Merge order: (1) changelog PR #NN into BASE_BRANCH, (2) release PR #MM into RELEASE_BRANCH. Then re-run /release and I'll tag vX.Y.Z and cut the GitHub Release.

Restore the workspace: switch back to the branch you started on and git stash pop any drift.


Phase B — tag and release (after both merges)

B1. Get the merge commit and verify the changelog landed

git fetch origin --quiet
gh pr view <release-pr> --json mergeCommit -q .mergeCommit.oid
git show origin/<RELEASE_BRANCH>:CHANGELOG.md | grep -n "X.Y.Z"   # section is on the release branch

B2. Tag the merge commit (annotated)

Stash DRIFT_STASH_PATHS again if dirty (drift blocks the checkout), then:

git checkout <RELEASE_BRANCH> && git pull --ff-only
git tag -a vX.Y.Z <merge-sha> -m "vX.Y.Z — <one-line summary>

<2–3 line description>

PRs #A–#B. See CHANGELOG.md [X.Y.Z] for full notes."
git push origin vX.Y.Z

If a pre-push hook runs the test suite, it may look idle mid-run — wait it out, never --no-verify. A failure here blocks the release; investigate, don't bypass.

B3. Create the GitHub Release

awk '/^## \[X\.Y\.Z\]/{flag=1} /^## \[/{if(flag && $0 !~ /\[X\.Y\.Z\]/) exit} flag' CHANGELOG.md > <scratch>/release-notes-vX.Y.Z.md
gh release create vX.Y.Z --title "vX.Y.Z — <summary>" --notes-file <scratch>/release-notes-vX.Y.Z.md

B4. Report and clean up

Return to the human's working branch, git stash pop any drift, and report: tag SHA, GitHub Release URL, and the PRs included.


Gotchas (learned the hard way — don't relearn)

  • Agent can't merge. Structure around blocked gh pr merge (the Phase A/B split); don't retry a denied merge.
  • Working-tree drift (DRIFT_STASH_PATHS) reappears constantly and blocks git checkout. Stash the specific paths at the start of each phase; restore at the end.
  • Tag the merge commit on RELEASE_BRANCH, not BASE_BRANCH's tip — different SHAs after a non-ff merge. Always read the SHA from gh pr view --json mergeCommit.
  • Respect VERSION_HOME. In many repos the version lives in CHANGELOG.md + git tags and package.json's version is stale/unused — don't "helpfully" bump files the project doesn't treat as the version source.
  • Never Write CHANGELOG.md; only Edit with exact matches, so no entry is lost.
  • [Unreleased] may have gained entries after the release PR was opened. Re-check in Phase B before tagging and fold any stragglers.
  • An empty [Unreleased] at release time means the entries were never added; stop and add them before folding — don't release an undocumented diff.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.