merge

Merge pull requests with verified remote state and safe worktree cleanup.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/hkw2028/toy-project --skill merge-hkw2028
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge
Source: https://github.com/hkw2028/toy-project/tree/main/.agents/skills/merge
Command: npx skills add https://github.com/hkw2028/toy-project --skill merge-hkw2028

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Finishing a code change involves many error-prone steps: creating or reusing a pull request, writing a reviewer-friendly body with honest visual evidence, choosing the right merge strategy, verifying the remote state actually reports MERGED, and cleaning up only the worktree and dev servers that belong to the merged branch. This Skill carries a change through that entire flow without duplicating merges or destroying unrelated work. ## Core Features & Use Cases - Verified PR merge: Creates or reuses a ready-for-review pull request against the named base or the remote's default branch, respects required checks and reviews, and treats the remote PR state as the authority on whether the merge succeeded. - Reviewer-ready PR bodies: Writes problem/before-after/verification explanations, embeds side-by-side screenshots or interaction videos as inspected GitHub attachments, and redacts credentials or personal data before upload. - Safe cleanup: Chooses rebase merge for meaningful commit history or squash for noisy WIP commits, then removes only the merged worktree, its branch, and its owned Portless dev server processes via the bundled helper script. - Use Case: You finished a feature on a linked worktree with three meaningful commits. Ask to merge it, and the Skill opens a PR with before/after screenshots, waits for required checks, performs a rebase merge, confirms the remote reports MERGED, stops the worktree's dev server, removes the worktree, and updates your local main checkout. ## Quick Start Use the merge skill to create a pull request for my current branch, merge it into main after checks pass, and clean up the worktree.

Frequently Asked Questions about merge

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

FAQPage Schema
How do I merge a pull request and clean up the worktree afterward?

Create or reuse a ready-for-review PR, wait for required checks and reviews, then merge and confirm the remote PR state reports MERGED before cleanup. After verification, stop the worktree's dev server, remove only that worktree and branch, and update the local base checkout.

When should I use squash merge versus rebase merge for a pull request?

Use a rebase merge only when the commits are meaningful, independent units worth preserving in the base branch history. Use a squash merge when the branch contains noisy WIP or fixup commits that represent one logical change.

How do I add before and after screenshots to a GitHub pull request?

Capture the actual base and head revisions at matching viewport, data, and state, then upload them as GitHub attachments using gh pr create or gh pr edit with --attach. Embed both images side by side in a Markdown table and verify the remote body shows the uploaded URLs, not local paths.

What happens if the merge command succeeds but the PR still shows OPEN?

The remote pull request state is the authority, so an OPEN state means the merge did not complete regardless of command output. Do not clean up the worktree or branch; investigate the remote state and report the merge as incomplete.

Can I bypass a pending required check to merge a pull request?

No. Required checks and reviews are treated as part of merge completion, even when bypass permissions exist. Wait for the check to pass or report the pending gate instead of forcing the merge.

How do I avoid leaking credentials in PR screenshots and videos?

Inspect all screenshots and videos for credentials, personal data, and private information before uploading. Recapture with safe seeded test accounts or redact sensitive details in every frame, then upload only the inspected safe media as GitHub attachments.