squash-merge-and-clean-up

Installation
SKILL.md

squash-merge-and-clean-up

human-only. Start this only when a human asks for it by name. If you arrived here from another skill, stop and get explicit confirmation before running any step.

Land the PR this session opened and clear what this session created: leave the worktree, squash-merge, delete both branches, remove the worktree.

Session-scoped throughout. Other agent sessions run concurrently in the same repo and their worktrees and branches sit in the same listings. Touch only what this session made — the worktree it entered, the branch it pushed, the PR it opened. Everything else is someone's work in progress.

Two gates, split on ownership. Gate one covers everything this session owns: the merge and the removal of its own worktree and branches. Gate two covers the one step that touches shared state — bringing the primary checkout current, which every other session reads.

1. Survey

Gather, and hold for the plan:

  • gh pr view <n> --json number,title,body,state,mergeable,mergeStateStatus,headRefName,baseRefName,closingIssuesReferences
  • gh pr checks <n> — a docs-only PR may report no checks, which is a pass, not a failure
  • git worktree list — note which entries this session created; locked marks another session's
  • git branch -vv — the + prefix marks a branch checked out in some worktree
Installs
32
First Seen
Aug 25, 2026
squash-merge-and-clean-up — mtngtools/agents