.claude/skills/pr-merge/SKILL.md
Merge a PR safely — true merge commit (never squash, never rebase), branch protection respected, --principal-approved gate for --admin override.
npx skillsauth add the-agency-ai/the-agency .claude/skills/pr-mergeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Safe wrapper for merging PRs. Always uses true merge commit (never squash,
never rebase). Respects branch protection by default. Requires explicit
principal authorization for --admin override.
This skill exists because raw gh pr merge is too easy to misuse:
--squash flag is one keystroke away from --merge--admin bypasses branch protection silentlygit-safe merge-from-master --remote and
pushing the resolution.$ARGUMENTS: at minimum, the PR number. Optional flags:
--principal-approved — captain attestation that principal verbally
OK'd the merge. ONLY way to enable --admin override. Logged for audit.--delete-branch — also delete remote branch after merge.--dry-run — preview without merging.--principal-approved, confirm the principal
has authorized in this conversation. Don't infer authorization../claude/tools/pr-merge <N>
Or with explicit principal approval (only if they verbally OK'd):
./claude/tools/pr-merge <N> --principal-approved
On success: report the merge URL and the next-steps (sync local main via
./claude/tools/_sync-main-ref or wait for next captain /post-merge).
On branch-protection block (exit 3): the tool prints the gate that's blocking. Two paths:
gh pr review <N> --approve in GitHub UI, then
re-run.--principal-approved.On merge conflict (exit 1): resolve locally first:
gh pr checkout <N>
./claude/tools/git-safe merge-from-master --remote
# resolve conflicts in working tree
./claude/tools/git-safe add <files>
./claude/tools/git-captain merge-continue
./claude/tools/git-push <branch>
# then retry
./claude/tools/pr-merge <N>
After a successful merge:
./claude/tools/_sync-main-refgh release create v<version> --target main --notes .../dispatch to affected agents/collaborate sendgh release create afterward.Both rewrite history. The framework is built on visible, append-only history:
git log --graph shows the actual flowThe cost is heavier git log output. The benefit is you can SEE what
happened and WHY, which is essential when fleet agents and adopters all
have to read the same history.
claude/tools/pr-mergeclaude/hookify/hookify.block-raw-gh-pr-merge.md (blocks bare gh pr merge)claude/REFERENCE-GIT-MERGE-NOT-REBASE.mdOFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!
business
Sync worktree with master — merge, copy settings, run sandbox-sync, report changes
tools
List all git worktrees with status info (branch, clean/dirty, deps)
tools
Remove a git worktree and optionally delete its branch
development
Create a new git worktree with dedicated branch and bootstrapped dev environment