| name | squash |
| description | Squash merge a PR after CI passes, then cleanup |
Squash Skill
Squash merges the current branch's PR after verifying CI has passed.
Steps
- Verify we're on a feature branch:
git branch --show-current
- Check that a PR exists for this branch:
gh pr view --json state,statusCheckRollup
-
Verify CI checks have passed:
- If checks are still running, inform user to wait
- If checks failed, inform user and stop
- Only proceed if all checks passed
-
Squash merge the PR and delete the branch:
gh pr merge --squash --delete-branch
- Switch to main and pull:
git checkout main
git pull origin main
- Confirm the merge was successful and show the commit.
Prerequisites
- GitHub CLI (
gh) must be installed and authenticated
- Must have an open PR for the current branch
- All CI checks must have passed
Safety Checks
This skill will REFUSE to merge if:
- CI checks are failing
- CI checks are still running
- No PR exists for the current branch
- Currently on main branch
Example Output
✓ CI checks passed
✓ PR #42 squash merged
✓ Branch feature/add-filters deleted
✓ Switched to main and pulled
Merge commit: abc1234 feat: add task priority filtering