From scm-tools
Use when a PR is approved and ready to merge, and the worktree needs to be cleaned up for reuse afterward
How this skill is triggered — by the user, by Claude, or both
Slash command
/scm-tools:land-prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Orchestrates the full workflow for merging an approved PR and resetting the
Orchestrates the full workflow for merging an approved PR and resetting the worktree for reuse. Fail-fast — if any step fails, report and stop.
git branch --show-current
Store this BEFORE any other step. You need it for remote branch deletion after the merge, and checkout operations in later steps will lose it.
For rebase merges (where individual commits are preserved), scan for fixup commits:
git log --oneline $(git merge-base HEAD main)..HEAD
If any commit messages match these patterns (case-insensitive), invoke
scm-tools:cleanup-commits before merging:
fixup! or squash!WIPaddress review or review feedbacklint, rubocop, typo as standalone fixesSkip this check for squash merges (history is collapsed anyway).
Rebase merge (default):
gh pr merge --rebase
Squash merge (when user explicitly requests squash):
Invoke scm-tools:squash-merge. This handles commit message drafting and
user approval before merging.
git push origin --delete <branch-name>
GitHub may auto-delete depending on repo settings. If the command fails because the branch is already gone, that is expected — continue to step 5.
Invoke scm-tools:cleanup-worktree.
Fetches main, detaches HEAD at origin/main, deletes the local branch.
Invoke trello-cli:finish-card.
Always run this step — it is part of the workflow even when the user does not mention Trello explicitly.
| Step | Action | Tool |
|---|---|---|
| 1 | Capture branch name | git branch --show-current |
| 2 | Commit hygiene check | git log, then scm-tools:cleanup-commits if needed |
| 3a | Rebase merge (default) | gh pr merge --rebase |
| 3b | Squash merge (if requested) | scm-tools:squash-merge |
| 4 | Delete remote branch | git push origin --delete <branch> |
| 5 | Local cleanup | scm-tools:cleanup-worktree |
| 6 | Finish Trello card | trello-cli:finish-card |
npx claudepluginhub mjbellantoni/cc-marketplace --plugin scm-toolsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.