β /ship-and-burn a pull request
β’ 261 words β’ 2 min
Problem statement: ship a simple change (or commit, or pull request: you name it), then wait for green CI, then remove its local branch and worktree (=clean up).
It’s 2026, so we’ll codify this workflow in the form of an agent skill.
I created
/ship-and-burn
for that.
/ship-and-burn [reviewer]It’s very important that you picture this movie whenever you invoke this skill.
The structure is the following, composing various of my other skills:
/ship ββ> pull request ββ> /pr-pass ββ> green ββ> delete local state
βββ> blocked ββ> keep local stateThe implementation is a single SKILL.md Markdown file (naturally!):
% git show --stat --oneline 8e0eed7
8e0eed7 feat: add ship-and-burn skill
README.md | 1 +
package.json | 2 +-
plugins/thiagowfx/.claude-plugin/plugin.json | 2 +-
plugins/thiagowfx/skills/ship-and-burn/SKILL.md | 67 +++++++++++++++++++++++++
4 files changed, 70 insertions(+), 2 deletions(-)The skill stops before cleanup whenever CI remains failed or pending π΄.
Once checks pass π’, it verifies that the worktree/checkout is clean and that every local commit exists on the remote:
test -z "$(git status --porcelain)"
git merge-base --is-ancestor HEAD "origin/$branch"For a secondary (=non-base) worktree, wt
removes both the worktree and its local branch:
cd "$primary"
wt del -- --foreground "$branch"The pull request and remote branch remain intact.
Should review comments arrive later, my gh co (or wt co for a separate
worktree) alias restores the branch and worktree before I address them:
% gh co <pull-request>
% /address-pr-commentsThis surely feels like living in the future!
And, when using a light harness like pi, it’s super fast!