plugins/clade/skills/merge-pr/SKILL.md
Squash-merge a PR and clean up the branch — parallel to OpenClaw's /merge-pr
npx skillsauth add shenxingy/claude-code-kit merge-prInstall 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.
This workflow runs directly in Codex. Do not launch the claude CLI or
delegate the workflow to Clade's MCP bridge.
Codex compatibility rules:
AGENTS.md files for repository instructions. If a project
has only CLAUDE.md, treat it as legacy project guidance and read it too..clade/ (or ~/.clade/ for personal
state). Existing legacy Claude state may be read for migration, but do not
create new vendor-specific state./skill-name reference means the corresponding Codex $skill-name skill,
or the same workflow invoked naturally when explicit skill invocation is not
available.<plugin-root>/... are relative to the installed Clade plugin
containing this SKILL.md; resolve that root before invoking a helper.You are the Merge PR skill. You squash-merge a PR and clean up its branch.
Parse the argument (if any):
gh pr view --json number,url,state to get the PR42) → PR #42 in current repoIf no PR found, say so and exit. If PR state is already MERGED or CLOSED, say so and exit.
gh pr checks {PR_NUMBER_OR_URL}
If any required checks are failing, report them and ask the user to confirm before proceeding. Don't merge a broken PR silently.
If checks are pending, warn but proceed (user is explicitly requesting merge).
gh pr merge {PR_NUMBER_OR_URL} --squash --delete-branch --yes
--squash — combine all commits into one clean commit on main
--delete-branch — delete the remote branch after merge
--yes — skip interactive confirmation
If merge fails (conflicts, branch protection, etc.), report the error clearly and stop.
If the merged branch exists locally:
git branch -d {branch_name}
Use -d (safe delete), not -D. If it fails because it's not fully merged, that's expected and fine — skip.
Pull main to stay current:
git checkout main && git pull --ff-only
(Only run checkout/pull if we're not currently on main or if the user would benefit.)
✓ Merged PR #{number}: {title}
Branch: {branch_name} → deleted
Squash commit on main: {short_hash}
--delete-branch fails (e.g. branch already deleted), that's fine — continue.clade/blockers.md3-strike rule: If the same approach fails 3 times, switch to BLOCKED — do not retry indefinitely.
Squash-merges a PR, deletes the remote branch, and cleans up the local branch. Parallel to OpenClaw's /merge-pr.
/merge-pr # Merge the PR for the current branch
/merge-pr 42 # Merge PR #42
/merge-pr https://github.com/owner/repo/pull/42
development
Orchestrate a fleet of parallel `codex exec` workers with you (Claude Code) as the supervisor — spawn one per isolated git worktree, dispatch headless, verify each INDEPENDENTLY, PR/merge. The manual "codex-ultracode" pattern for fanning out real implementation, research, or review work onto Codex. Bakes in the hard gotchas (stdin blocking, background tracking, don't-trust-self-reports, writer isolation). Triggers on — orchestrate codex, codex workers, codex fleet, spawn codex, delegate to codex in parallel, manual ultracode, 开 codex 小弟, 派 codex worker — NOT for a single cross-vendor opinion (use the `second-opinion-codex` agent), NOT for web-UI worker decomposition (use `/orchestrate`).
development
Create and manage git worktrees for parallel Codex sessions
development
Verify project behavior anchors — compilation, tests, and interaction checks after autonomous runs. NOT the Codex built-in /verify (which runs the app to observe a single change working) — this one walks the AGENTS.md "Features (Behavior Anchors)" list.
documentation
End-of-session documentation sync — updates TODO.md and PROGRESS.md only (run /commit after to commit everything)