Agent skill

Prepare PR

by TermiX-official in TermiX-official/cryptoclaw

Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch.

MITAuto-check passedDevelopment

Install Prepare PR

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

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

GitHub CLI
$ gh skill install TermiX-official/cryptoclaw prepare-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/prepare-pr .claude/skills/prepare-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
prepare-pr
GitHub stars
100
Token cost
~1.6k tokens
SKILL.md length
589 words
Files
2
Skills in repo
33
Repo updated
First seen
Licence
MIT

At a glance

Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch.

  • Works in 3 steps: Identify PR meta (author, head branch,… → Fetch the PR branch tip into a local ref → Rebase PR commits onto latest main
  • Tasks that involve Code review
  • SKILL.md covers Overview, Inputs, Safety and Execution Rule, plus 7 more sections
  • Calls git, gh and pnpm

What it does

Prepare PR is an agent skill from TermiX-official/cryptoclaw. Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch. Use after /reviewpr. Never merge or push to main.

Its SKILL.md is about 1.6k 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 Code review. It works with GitHub and Git. The licence is MIT.

When your agent uses it

  • Tasks that involve Code review

Example prompts

  • “/prepare-pr”

Workflow steps

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

  1. Identify PR meta (author, head branch, head repo URL)
  2. Fetch the PR branch tip into a local ref
  3. Rebase PR commits onto latest main

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:

    • git
    • gh
    • pnpm

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

  • Network

    No URLs in SKILL.md. Its commands use git, gh and pnpm, 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

Prepare PR loads about 1.6k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 589 words of instructions outside code blocks.

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

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). 589 words, ~1,552 tokens.

Download SKILL.mdSave it as .claude/skills/prepare-pr/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
prepare-pr
description
Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch. Use after /reviewpr. Never merge or push to main.

Prepare PR

Overview

Prepare a PR branch for merge with review fixes, green gates, and an updated head branch.

Inputs

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

Safety

  • Never push to main or origin/main. Push only to the PR head branch.
  • Never run git push without specifying remote and branch explicitly. Do not run bare git push.
  • Do not run gateway stop commands. Do not kill processes. Do not touch port 18792.
  • Do not run git clean -fdx.
  • Do not run git add -A or git add .. Stage only specific files changed.

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 ~/openclaw.
  • Do not run git clean -fdx.
  • Do not run git add -A or git add ..

Completion Criteria

  • Rebase PR commits onto origin/main.
  • Fix all BLOCKER and IMPORTANT items from .local/review.md.
  • Run gates and pass.
  • Commit prep changes.
  • Push the updated HEAD back to the PR head branch.
  • Write .local/prep.md with a prep summary.
  • Output exactly: PR is ready for /mergepr.

First: Create a TODO Checklist

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

Setup: Use a Worktree

Use an isolated worktree for all prep work.

sh
cd ~/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 Review Findings (Mandatory)

sh
if [ -f .local/review.md ]; then
  echo "Found review findings from /reviewpr"
else
  echo "Missing .local/review.md. Run /reviewpr first and save findings."
  exit 1
fi

# Read it
sed -n '1,200p' .local/review.md

Steps

  1. Identify PR meta (author, head branch, head repo URL)
sh
gh pr view <PR> --json number,title,author,headRefName,baseRefName,headRepository,body --jq '{number,title,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. Fetch the PR branch tip into a local ref
sh
git fetch origin pull/<PR>/head:pr-<PR>
  1. Rebase PR commits onto latest main
sh
# Move worktree to the PR tip first
git reset --hard pr-<PR>

# Rebase onto current main
git fetch origin main
git rebase origin/main

If conflicts happen:

  • Resolve each conflicted file.
  • Run git add <resolved_file> for each file.
  • Run git rebase --continue.

If the rebase gets confusing or you resolve conflicts 3 or more times, stop and report.

  1. Fix issues from .local/review.md
  • Fix all BLOCKER and IMPORTANT items.
  • NITs are optional.
  • Keep scope tight.

Keep a running log in .local/prep.md:

  • List which review items you fixed.
  • List which files you touched.
  • Note behavior changes.
  1. Update CHANGELOG.md if flagged in review

Check .local/review.md section H for guidance. If flagged and user-facing:

Show full SKILL.md (229 more words)Show less
  • Check if CHANGELOG.md exists.
sh
ls CHANGELOG.md 2>/dev/null
  • Follow existing format.
  • Add a concise entry with PR number and contributor.
  1. Update docs if flagged in review

Check .local/review.md section G for guidance. If flagged, update only docs related to the PR changes.

  1. Commit prep fixes

Stage only specific files:

sh
git add <file1> <file2> ...

Preferred commit tool:

sh
committer "fix: <summary> (#<PR>) (thanks @$contrib)" <changed files>

If committer is not found:

sh
git commit -m "fix: <summary> (#<PR>) (thanks @$contrib)"
  1. Run full gates before pushing
sh
pnpm install
pnpm build
pnpm ui:build
pnpm check
pnpm test

Require all to pass. If something fails, fix, commit, and rerun. Allow at most 3 fix and rerun cycles. If gates still fail after 3 attempts, stop and report the failures. Do not loop indefinitely.

  1. Push updates back to the PR head branch
sh
# Ensure remote for PR head exists
git remote add prhead "$head_repo_url.git" 2>/dev/null || git remote set-url prhead "$head_repo_url.git"

# Use force with lease after rebase
# Double check: $head must NOT be "main" or "master"
echo "Pushing to branch: $head"
if [ "$head" = "main" ] || [ "$head" = "master" ]; then
  echo "ERROR: head branch is main/master. This is wrong. Stopping."
  exit 1
fi
git push --force-with-lease prhead HEAD:$head
  1. Verify PR is not behind main (Mandatory)
sh
git fetch origin main
git fetch origin pull/<PR>/head:pr-<PR>-verify --force
git merge-base --is-ancestor origin/main pr-<PR>-verify && echo "PR is up to date with main" || echo "ERROR: PR is still behind main, rebase again"
git branch -D pr-<PR>-verify 2>/dev/null || true

If still behind main, repeat steps 2 through 9.

  1. Write prep summary artifacts (Mandatory)

Update .local/prep.md with:

  • Current HEAD sha from git rev-parse HEAD.
  • Short bullet list of changes.
  • Gate results.
  • Push confirmation.
  • Rebase verification result.

Create or overwrite .local/prep.md and verify it exists and is non-empty:

sh
git rev-parse HEAD
ls -la .local/prep.md
wc -l .local/prep.md
  1. Output

Include a diff stat summary:

sh
git diff --stat origin/main..HEAD
git diff --shortstat origin/main..HEAD

Report totals: X files changed, Y insertions(+), Z deletions(-).

If gates passed and push succeeded, print exactly:

PR is ready for /mergepr

Otherwise, list remaining failures and stop.

Guardrails

  • Worktree only.
  • Do not delete the worktree on success. /mergepr may reuse it.
  • Do not run gh pr merge.
  • Never push to main. Only push to the PR head branch.
  • Run and pass all gates before pushing.

© 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/prepare-pr of TermiX-official/cryptoclaw.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 9e1c91b

Compare with similar skills

Prepare 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.

Prepare PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prepare PR this skillTermiX-official/cryptoclaw100—~1.6kAutomated safety check: PassMIT
PR Review State Fetchprisma/orm48k—~767Automated safety check: PassApache-2.0
Greploop Appsmichaelshimeles/skills1.3k1 repos~3.6kAutomated safety check: PassMIT
Requesting Code ReviewHezaoHezao/poirot2505 repos~1.6kAutomated safety check: PassMIT
PR Triagertk-ai/rtk83k—~2.5kAutomated safety check: NotesApache-2.0
Difit Reviewyoshiko-pg/difit3.2k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Official

    Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.

    48k GitHub stars~767 tokensUpdated today
    DevelopmentAuto-check passed
  • Greploop Apps

    michaelshimeles/skills

    Loops on a large pull request, merge request or Perforce changelist, fixing Greptile findings until it scores 5/5 with no unresolved comments.

    1.3k GitHub starsUsed in 1 repo~3.6k tokens
    DevelopmentAuto-check passed
  • Requesting Code Review

    HezaoHezao/poirot

    Pre-commit review: security scan, quality gates, auto-fix. An agent skill from HezaoHezao/poirot.

    250 GitHub starsUsed in 5 repos~1.6k tokens
    DevelopmentAuto-check passed
  • PR Triage

    rtk-ai/rtk

    Audits a repository's open pull requests, deep-reviews chosen ones and drafts review comments that are only posted after you approve them.

    83k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Difit Review

    yoshiko-pg/difit

    Review a specific diff (branch, commit, or GitHub PR) and show the findings as comments inside difit, the local diff viewer.

    3.2k GitHub stars~1.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Liveagent Code Review

    Stack-Cairn/LiveAgent

    Review an open GitHub pull request or the current local branch and working tree with parallel, independent reviewers and evidence-based validation.

    2.2k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed

More from TermiX-official/cryptoclaw

All 33 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 8 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
  • Merge PR

    TermiX-official/cryptoclaw

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

    100 GitHub stars~1.2k 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 2 repos~1.9k tokens
    Auto-check passed
  • 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
  • Coingecko

    TermiX-official/cryptoclaw

    Query CoinGecko API for prices, market data, trending tokens, and historical charts.

    100 GitHub starsUsed in 1 repo~755 tokens
    Auto-check passed

Works with

Categories

Questions about Prepare PR

What does Prepare PR do?

Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch. Prepare PR is an agent skill from TermiX-official/cryptoclaw. Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch.

When should I use Prepare PR?

Prepare PR fits situations like: tasks that involve Code review.

How do I install Prepare PR in Claude Code?

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

How do I install Prepare PR in Codex?

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

Can I use Prepare 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 prepare-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/prepare-pr, .gemini/skills/prepare-pr, .github/skills/prepare-pr and .opencode/skills/prepare-pr in your project.

What does Prepare PR need to run?

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

Does Prepare PR access the network?

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

Is Prepare 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 Prepare PR use?

Prepare 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 Prepare PR use?

About 1.6k tokens (SKILL.md is roughly 6.2k 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 Prepare PR?

Skills that share tags, products or a category with Prepare PR: PR Review State Fetch (prisma/orm, 48k stars), Greploop Apps (michaelshimeles/skills, 1.3k stars), Requesting Code Review (HezaoHezao/poirot, 250 stars) and PR Triage (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prepare PR?

TermiX-official (a GitHub organization) maintains it in TermiX-official/cryptoclaw, which has 100 GitHub stars. The repository holds 33 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.