prepare

prepare is a skill for Claude Code from mthines/agent-skills. It costs 82 tokens per session (1,429 once invoked), scanned A, original, MIT.

A procedure for getting a pull request, and optionally the pull requests stacked above it, into a passing state. A pull request is a proposed code change for review; the procedure resolves conflicts, fixes failing continuous integration checks, and handles open review comments without starting new feature work.

In plain words
What is it for?
Use it to prepare one pull request or a dependent stack, confirm checks and review status, and optionally squash-merge the stack.
Why use it?
It provides an ordered way to remove the common blockers that prevent a pull request from being merged.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the mthines-agent-skills plugin — 54 skills, 3 agents, 2 hooks shipped together

Good fit Use it to prepare one pull request or a dependent stack, confirm checks and review status, and optionally squash-merge the stack.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mthines/agent-skills/prepare
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mthines/agent-skills --skill prepare
Clone the repo
git clone --depth 1 https://github.com/mthines/agent-skills

Made for: Claude Code.

Or install mthines-agent-skills, the plugin that ships this one along with the rest of its 54 skills, 3 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prepare

README.md
[![agentmods](https://agentmods.dev/badge/skills/mthines/agent-skills/prepare/github.svg)](https://agentmods.dev/skills/mthines/agent-skills/prepare)
Your own site
<a href="https://agentmods.dev/skills/mthines/agent-skills/prepare"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/prepare/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prepare

Your own site · 80×15
<a href="https://agentmods.dev/skills/mthines/agent-skills/prepare"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/prepare.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,429 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.01429
Opus 5.5 $0.00033 $0.00572
Sonnet 5.5 $0.00016 $0.00286
Haiku 4.5 $0.00008 $0.00143

Measured 4d ago against content hash de07dff34025, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prepare scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/ci-ran.mjs, scripts/threads.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/delivery/prepare/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prepare

Gets one PR, and every open PR stacked above it, to green: no conflicts, passing CI, no unresolved review threads. It delegates each fix to an existing skill and starts no new work.

Arguments

Parse $ARGUMENTS: the first non-flag token is the PR, everything else is a flag.

Argument Default Effect
<pr-url|#n> the current branch's PR (gh pr view --json url -q .url) The bottom PR of the job.
--merge off After the fixes, squash-merge bottom to top behind explicit gates. Read and follow rules/merge.md.
--single off Only this PR; skip the stack walk.

Step 0: Resolve scope

  1. Set PRS to the given PR.
  2. Unless --single, walk up: for each PR in PRS, run gh pr list --base <its head branch> --state open --json number,url,headRefName, and append the results. When a PR has more than one child, order by depth, then PR number.
  3. PRS is now ordered bottom to top, which is also merge order.

Step 1: Check state

For each PR in PRS:

gh pr view <n> --json mergeable,mergeStateStatus,statusCheckRollup,reviewDecision,headRefName,baseRefName
node "${CLAUDE_SKILL_DIR:-$HOME/.claude/skills/prepare}/scripts/threads.mjs" --pr <pr-url>

threads.mjs prints THREADS: clear|open|pending — <reason> last, naming each unresolved thread (outdated ones count); exit 0 only for clear.

A PR needs work when mergeable is CONFLICTING, any check is failing, or any review thread is unresolved.

A check still running is not green: gh pr checks <n> --watch first, then decide. Then classify the head's CI with the bundled helper; its last line is the answer, its exit code 0 only for green:

node "${CLAUDE_SKILL_DIR:-$HOME/.claude/skills/prepare}/scripts/ci-ran.mjs" --pr <pr-url>   # CI: green|pending|red|not-run — <reason>

CI ran when at least one required check completed without being skipped, or, when the head reports no required check, at least one GitHub Actions check run did. External commit statuses and other apps' checks (Vercel, security scanners) never prove CI ran on their own, unless the repo marks one required. CI: not-run (a repo that skips CI on drafts) → report CI not run (<its reason>), never green, and do not merge it.

Read the full file on GitHub · 123 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +2 lines de07dff34025
  2. 8d ago Changed · +16 lines 6f4d0bb9d2b4
  3. 12d ago First seen · 105 lines · 82 tokens per session scan A 9d4abf33f65d

Subscribe to this mod's changes

prepare is a skill published in the GitHub repository mthines/agent-skills (22 stars, last pushed yesterday), licensed MIT. It adds 82 tokens to every session and 1,429 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-21.

Related

prepare compared with skills from other repositories

prepare next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
preparemthines/agent-skillsSkill22yesterdayMITA82Claude Code
chinese-git-workflowjnMetaCode/superpowers-zhSkill8.7k2d agoMITA69Claude Code
factory-shipBuilderIO/skillsSkill4.7ktodayMITA28Claude Code
devops-pipelineluongnv89/skillsSkill149yesterdayMITA65Claude Code, Codex
github-pages-publishluongnv89/skillsSkill149yesterdayMITA63Claude Code
github-actions-expertroedyrustam/vibes-plugSkill1326d agoMITA35Cursor
zb-release-pipelineAdamBien/airailsSkill76yesterdayMITA148Claude Code, Codex