merge-pr

Merge pull requests by composing merge-commit messages and delegating to platform merge APIs.

1|1|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/williamthorsen/codeassembly --skill merge-pr-williamthorsen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-pr
Source: https://github.com/williamthorsen/codeassembly/tree/main/packages/agents/content/skills/merge-pr
Command: npx skills add https://github.com/williamthorsen/codeassembly --skill merge-pr-williamthorsen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Merging a pull request involves resolving the right merge-commit title and body from scattered sources (change-record blocks, commits, labels, PR titles), validating PR state, and choosing strategy and branch-deletion behavior. This Skill orchestrates that entire flow with an approval gate so nothing incorrect gets published to a protected default branch. ## Core Features & Use Cases - Merge-commit resolution: Runs describe-change.mjs resolve-merge to derive the effective record, merge title, and body from the PR's change-record block, commits, labels, and title, with CLI overrides for scope, type, and breaking markers. - Approval gate with defect handling: Settles missing-type and policy-violation defects through structured questions, renders the proposed title, body, strategy, and deletion plan, and requires explicit user confirmation naming every destructive side effect. - Platform delegation: Dispatches the actual merge to merge-gh-pr (GitHub) or merge-bb-pr (Bitbucket), re-reading the PR after approval to catch edits made while the gate was pending. - Use Case: After finishing a feature branch and opening a PR, invoke this Skill to compose a conventional-commit-style merge message, confirm the squash strategy and remote branch deletion, and merge through the GitHub CLI without hand-writing the commit text. ## Quick Start Ask the agent to merge the pull request for the current branch, optionally passing flags like --pr 42, --strategy squash, or --delete remote.

Frequently Asked Questions about merge-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge a pull request with a custom commit message?

Invoke the merge flow and override the resolved values with flags like --scope, --type, and --breaking, or supply new values at the approval gate. The merge-commit title and body are composed from the PR's change-record block, commits, and labels before you confirm.

How to merge a GitHub PR with squash and delete the branch?

Pass --strategy squash and --delete remote, which are also the defaults. The skill delegates to a GitHub-specific merge skill that runs the merge and deletes the remote branch via the GitHub API after confirmation.

Does this merge flow support Bitbucket pull requests?

Yes, it reads the scm value from session context and delegates Bitbucket merges to a dedicated Bitbucket merge skill. The deletion strategy 'both' is refused on Bitbucket because the platform has no equivalent for deleting the local branch.

What happens if the PR is edited while I review the merge proposal?

After approval, the skill re-reads the PR title and description and re-resolves the merge values. If either changed, it renders the approval gate again with the new values so you never publish text you did not approve.

Why does the merge stop with a missing-type or policy-violation defect?

The resolver reports defects when no source declares a work type or when the type breaks a policy, such as a forbidden breaking marker. The skill asks you to pick a type or marker, re-runs resolution with your answer, and never offers the merge while defects remain.

Can I bypass branch protections or use admin merge?

No, the orchestrator never exposes an --admin flag and does not bypass branch protections. Users who need that capability must run gh pr merge --admin directly outside this flow.