Merge a GitHub PR via squash after /preparepr. An agent skill from TermiX-official/cryptoclaw.

MITAuto-check passedDevelopment

Install Merge PR

skills CLI
$ npx skills add TermiX-official/cryptoclaw --skill merge-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TermiX-official/cryptoclaw merge-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TermiX-official/cryptoclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/merge-pr .claude/skills/merge-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
merge-pr
GitHub stars
100
Token cost
~1.2k tokens
SKILL.md length
381 words
Files
2
Skills in repo
32
Repo updated
First seen
Licence
MIT

At a glance

Merge a GitHub PR via squash after /preparepr. An agent skill from TermiX-official/cryptoclaw.

  • Works in 2 steps: Identify PR meta → Run sanity checks
  • Asked to merge a ready PR
  • SKILL.md covers Overview, Inputs, Safety and Execution Rule, plus 7 more sections
  • Calls gh and git

What it does

Merge PR is an agent skill from TermiX-official/cryptoclaw. Merge a GitHub PR via squash after /preparepr. Use when asked to merge a ready PR. Do not push to main or modify code. Ensure the PR ends in MERGED state and clean up worktrees after success.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Development, covering Git worktrees. It works with GitHub. The licence is MIT.

When your agent uses it

  • Asked to merge a ready PR
  • Tasks that involve Git worktrees

Example prompts

  • “/merge-pr”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Identify PR meta
  2. Run sanity checks

What it can do on your machine

Read from SKILL.md and the folder at commit 9e1c91b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Merge PR loads about 1.2k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 381 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TermiX-official/cryptoclaw at commit 9e1c91b, republished under its MIT licence (© TermiX-official). 381 words, ~1,168 tokens.

Download SKILL.mdSave it as .claude/skills/merge-pr/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
merge-pr
description
Merge a GitHub PR via squash after /preparepr. Use when asked to merge a ready PR. Do not push to main or modify code. Ensure the PR ends in MERGED state and clean up worktrees after success.

Merge PR

Overview

Merge a prepared PR via gh pr merge --squash and clean up the worktree after success.

Inputs

  • Ask for PR number or URL.
  • If missing, auto-detect from conversation.
  • If ambiguous, ask.

Safety

  • Use gh pr merge --squash as the only path to main.
  • Do not run git push at all during merge.
  • Do not run gateway stop commands. Do not kill processes. Do not touch port 18792.

Execution Rule

  • Execute the workflow. Do not stop after printing the TODO checklist.
  • If delegating, require the delegate to run commands and capture outputs.

Known Footguns

  • If you see "fatal: not a git repository", you are in the wrong directory. Use ~/Development/openclaw, not ~/openclaw.
  • Read .local/review.md and .local/prep.md in the worktree. Do not skip.
  • Clean up the real worktree directory .worktrees/pr-<PR> only after a successful merge.
  • Expect cleanup to remove .local/ artifacts.

Completion Criteria

  • Ensure gh pr merge succeeds.
  • Ensure PR state is MERGED, never CLOSED.
  • Record the merge SHA.
  • Run cleanup only after merge success.

First: Create a TODO Checklist

Create a checklist of all merge steps, print it, then continue and execute the commands.

Setup: Use a Worktree

Use an isolated worktree for all merge work.

sh
cd ~/Development/openclaw
# Sanity: confirm you are in the repo
git rev-parse --show-toplevel

WORKTREE_DIR=".worktrees/pr-<PR>"

Run all commands inside the worktree directory.

Load Local Artifacts (Mandatory)

Expect these files from earlier steps:

  • .local/review.md from /reviewpr
  • .local/prep.md from /preparepr
sh
ls -la .local || true

if [ -f .local/review.md ]; then
  echo "Found .local/review.md"
  sed -n '1,120p' .local/review.md
else
  echo "Missing .local/review.md. Stop and run /reviewpr, then /preparepr."
  exit 1
fi

if [ -f .local/prep.md ]; then
  echo "Found .local/prep.md"
  sed -n '1,120p' .local/prep.md
else
  echo "Missing .local/prep.md. Stop and run /preparepr first."
  exit 1
fi
Show full SKILL.md (160 more words)Show less

Steps

  1. Identify PR meta
sh
gh pr view <PR> --json number,title,state,isDraft,author,headRefName,baseRefName,headRepository,body --jq '{number,title,state,isDraft,author:.author.login,head:.headRefName,base:.baseRefName,headRepo:.headRepository.nameWithOwner,body}'
contrib=$(gh pr view <PR> --json author --jq .author.login)
head=$(gh pr view <PR> --json headRefName --jq .headRefName)
head_repo_url=$(gh pr view <PR> --json headRepository --jq .headRepository.url)
  1. Run sanity checks

Stop if any are true:

  • PR is a draft.
  • Required checks are failing.
  • Branch is behind main.
sh
# Checks
gh pr checks <PR>

# Check behind main
git fetch origin main
git fetch origin pull/<PR>/head:pr-<PR>
git merge-base --is-ancestor origin/main pr-<PR> || echo "PR branch is behind main, run /preparepr"

If anything is failing or behind, stop and say to run /preparepr.

  1. Merge PR and delete branch

If checks are still running, use --auto to queue the merge.

sh
# Check status first
check_status=$(gh pr checks <PR> 2>&1)
if echo "$check_status" | grep -q "pending\|queued"; then
  echo "Checks still running, using --auto to queue merge"
  gh pr merge <PR> --squash --delete-branch --auto
  echo "Merge queued. Monitor with: gh pr checks <PR> --watch"
else
  gh pr merge <PR> --squash --delete-branch
fi

If merge fails, report the error and stop. Do not retry in a loop. If the PR needs changes beyond what /preparepr already did, stop and say to run /preparepr again.

  1. Get merge SHA
sh
merge_sha=$(gh pr view <PR> --json mergeCommit --jq '.mergeCommit.oid')
echo "merge_sha=$merge_sha"
  1. Optional comment

Use a literal multiline string or heredoc for newlines.

sh
gh pr comment <PR> -F - <<'EOF'
Merged via squash.

- Merge commit: $merge_sha

Thanks @$contrib!
EOF
  1. Verify PR state is MERGED
sh
gh pr view <PR> --json state --jq .state
  1. Clean up worktree only on success

Run cleanup only if step 6 returned MERGED.

sh
cd ~/Development/openclaw

git worktree remove ".worktrees/pr-<PR>" --force

git branch -D temp/pr-<PR> 2>/dev/null || true
git branch -D pr-<PR> 2>/dev/null || true

Guardrails

  • Worktree only.
  • Do not close PRs.
  • End in MERGED state.
  • Clean up only after merge success.
  • Never push to main. Use gh pr merge --squash only.
  • Do not run git push at all in this command.

© TermiX-official, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/merge-pr of TermiX-official/cryptoclaw.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 9e1c91b

Compare with similar skills

Merge PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Merge PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Merge PR this skillTermiX-official/cryptoclaw100—~1.2kAutomated safety check: PassMIT
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Codewhale Landing Workflowcodewhale-hq/Codewhale41k—~1.6kAutomated safety check: PassMIT
Ff Worktreesdamus-io/damus2.1k—~451Automated safety check: PassGPL-3.0
Clean Complete Branchesjtenniswood/espcontrol1.1k—~820Automated safety check: PassCustom licence
Clean Merged Branch Foldersjtenniswood/espcontrol1.1k—~813Automated safety check: PassCustom licence

Similar skills

  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Codewhale Landing Workflow

    codewhale-hq/Codewhale

    Decides how verified work should reach main, directly, in a worktree or on an integration branch, while keeping contributor credit and respecting merge gates.

    41k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Ff Worktrees

    damus-io/damus

    Fast-forward master and every git worktree branch up to a target ref (default github/master), skipping any worktree with unmerged commits.

    2.1k GitHub stars~451 tokensUpdated 28 days ago
    DevelopmentAuto-check passed
  • Clean Complete Branches

    jtenniswood/espcontrol

    Clean up completed Git branches and worktrees for this repository both locally and on GitHub.

    1.1k GitHub stars~820 tokensUpdated today
    DevelopmentAuto-check passed
  • Clean Merged Branch Folders

    jtenniswood/espcontrol

    Clean up local branch worktree folders for this repository after their branches or pull requests have merged to main.

    1.1k GitHub stars~813 tokensUpdated today
    DevelopmentAuto-check passed
  • Fix

    exercism/website

    Fix a GitHub issue end-to-end — fetches issue, creates worktree, plans and implements fix, runs validation, opens PR, cleans up.

    549 GitHub stars~1.2k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes

More from TermiX-official/cryptoclaw

All 32 skills in this repo
  • Coding Agent

    TermiX-official/cryptoclaw

    Delegate coding tasks to Codex, Claude Code, or Pi agents via background process.

    100 GitHub starsUsed in 7 repos~2.7k tokens
    Auto-check passed
  • Prose

    TermiX-official/cryptoclaw

    OpenProse VM skill pack. An agent skill from TermiX-official/cryptoclaw.

    100 GitHub starsUsed in 3 repos~3.8k tokens
    Auto-check: notes
  • Review PR

    TermiX-official/cryptoclaw

    Review-only GitHub pull request analysis with the gh CLI. An agent skill from TermiX-official/cryptoclaw.

    100 GitHub stars~1.7k tokensUpdated 4 mo ago
    Auto-check passed
  • Acp Router

    TermiX-official/cryptoclaw

    Route plain-language requests for Pi, Claude Code, Codex, OpenCode, Gemini CLI, or ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow).

    100 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Agentic Commerce

    TermiX-official/cryptoclaw

    Create, fund, and settle on-chain agent jobs via ERC-8183 Agentic Commerce Protocol.

    100 GitHub stars~787 tokensUpdated 4 mo ago
    Auto-check passed
  • Binance Address Info

    TermiX-official/cryptoclaw

    Binance Web3 official skill — query any wallet address for token holdings, balances, and portfolio data across BSC, Base, and Solana.

    100 GitHub stars~708 tokensUpdated 4 mo ago
    Auto-check passed

Works with

Categories

Questions about Merge PR

What does Merge PR do?

Merge a GitHub PR via squash after /preparepr. An agent skill from TermiX-official/cryptoclaw. Merge PR is an agent skill from TermiX-official/cryptoclaw. Merge a GitHub PR via squash after /preparepr.

When should I use Merge PR?

Merge PR fits situations like: asked to merge a ready PR; tasks that involve Git worktrees.

How do I install Merge PR in Claude Code?

Run `npx skills add TermiX-official/cryptoclaw --skill merge-pr -a claude-code`. Or copy the skill folder (.agents/skills/merge-pr in TermiX-official/cryptoclaw) into .claude/skills/merge-pr in your project. Claude Code loads it when a task matches its description.

How do I install Merge PR in Codex?

Run `npx skills add TermiX-official/cryptoclaw --skill merge-pr -a codex`. Or copy the skill folder (.agents/skills/merge-pr in TermiX-official/cryptoclaw) into .agents/skills/merge-pr in your project. Codex loads it when a task matches its description.

Can I use Merge PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TermiX-official/cryptoclaw --skill merge-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/merge-pr, .gemini/skills/merge-pr, .github/skills/merge-pr and .opencode/skills/merge-pr in your project.

What does Merge PR need to run?

Going by SKILL.md and its folder, Merge PR needs the command-line tools its instructions call (gh and git).

Does Merge PR access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Merge PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Merge PR use?

Merge PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Merge PR use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Merge PR?

Skills that share tags, products or a category with Merge PR: Pre-Release PR Triage (jamiepine/voicebox, 57k stars), Codewhale Landing Workflow (codewhale-hq/Codewhale, 41k stars), Ff Worktrees (damus-io/damus, 2.1k stars) and Clean Complete Branches (jtenniswood/espcontrol, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Merge PR?

TermiX-official (a GitHub organization) maintains it in TermiX-official/cryptoclaw, which has 100 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on May 25, 2026.

Source: TermiX-official/cryptoclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.