/tgc-skills:merged [PR URL|number] [release] [keep]from tgc-skills
Runs post-merge cleanup after a PR is merged: verifies merge state, checks DB migrations ran, reports deploy triggers, and removes the PR branch/worktree (optionally cutting a release).
Ships in tgc-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The human just merged a PR. Run the tail of the pipeline they otherwise type by hand.
gh pr list --state merged or the current
branch's PR).release — also cut a release after cleanup. Never release unless this word (or an
explicit ask) is present — in some repos publishing a release deploys to production.keep — keep the PR's worktree and local branch. Without this word (or an explicit
"keep the worktree"), removing them is the default.nameWithOwner, then run
gh pr view <pr> --json state,mergedAt,mergeCommit,headRefName,headRefOid,url.
Require the PR URL repository to match the local repo and state to be MERGED.
Otherwise stop before migration, deploy, release, or local actions.gh pr diff <pr> --name-only against the repo's migrations dir)? If yes: verify
the migration actually ran where the code deploys (deploy workflow run / migrator
job logs) and say so explicitly. A shipped PR whose migration silently didn't run is
a production incident — this check exists because it happened..github/workflows, state what
this merge triggers on its own (e.g. "staging auto-deploys on merge to the default
branch; prod only on a published release") and link the running workflow if one
started.git worktree list --porcelain. Before switching or removing anything, run
git status --porcelain in every involved worktree and stop if any is dirty.headRefOid; otherwise skip
deletion and report unpublished or post-merge commits.git pull --ff-only, or
check it out in the primary worktree when free, then git fetch --prune. Never
remove the primary worktree. If the PR branch occupies the primary worktree while
the default branch is checked out elsewhere, leave the branch/worktree and report
why cleanup was skipped.keep was given, remove the PR's linked worktree without asking: a clean
tree at the verified head is all the permission needed. If this session's working
directory is inside that worktree, run every other step first (release included)
and do the removal, branch deletion, and prune last. Run the removal and every git
command after it from the primary worktree (git -C '<primary-worktree>' …, or
cd '<primary-worktree>' && in the same Bash call), because git cannot run from a
deleted directory.command -v orca succeeds and
orca worktree list --json contains a "path" equal to the worktree path, run
orca worktree rm --worktree "path:<worktree-path>". If that command fails, stop
and report the exact cleanup the user still needs to do; do not fall back to git.
If orca exists but the list call fails, ownership is unknown: skip the removal and
report it (for example, "open Orca and rerun, or remove it yourself"). Only with no
orca, or a successful list that does not contain the path, run
git worktree remove <worktree-path>.git branch -d first. After a squash/rebase merge, allow git branch -D only
because the PR is verified merged and the local tip exactly matches its recorded
head. Never remove unrelated branches or worktrees.git worktree prune to clear stale administrative records. Do not delete
untracked files or vaguely named "planning artifacts"; each workflow owns and
removes its own temporary files..claude/skills/release/ or .claude/commands/release.md); otherwise use the
repo's documented release process.gh pr merge → never; this is a verify-only skill.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub eternalllight/tgc-skills --plugin tgc-skills14 skills in this plugin
/checkpointUse when the user wants current work saved to the branch mid-flow without ending the task — "checkpoint", "commit and push", "save and push", "push what we have", optionally with a review ask ("checkpoint and review")./cmux-orchestrateUse when orchestrating cmux terminal panes, splits, tabs, worker sessions, or agents in other cmux panes, including reading screens, sending commands, answering prompts, jumping to unread activity, or setting AFK check-ins. Do not use for tmux, IDE/browser tabs, deployment replicas, or plain command execution./explain-prUse before shipping, when the user wants to understand their own branch — "explain what we did", "walk me through this branch", "what am I about to ship", "why did we change that", or any ask to account for the current diff before running tgc-skills:ship. Explains the change back to the user and flags anything it cannot justify. Read-only; not a PR description writer, not a code review.Other plugins' skills for the same job