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.
npx skills add mthines/agent-skills --skill preparegit clone --depth 1 https://github.com/mthines/agent-skillsWrote 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.
[](https://agentmods.dev/skills/mthines/agent-skills/prepare)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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
- Set
PRSto the given PR. - Unless
--single, walk up: for each PR inPRS, rungh 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. PRSis 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.
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.
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.
- 4d ago Changed · +2 lines de07dff34025
- 8d ago Changed · +16 lines 6f4d0bb9d2b4
- 12d ago First seen · 105 lines · 82 tokens per session scan A 9d4abf33f65d
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.
prepare compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| preparemthines/agent-skills | Skill | 22 | yesterday | MIT | A | 82 | Claude Code |
| chinese-git-workflowjnMetaCode/superpowers-zh | Skill | 8.7k | 2d ago | MIT | A | 69 | Claude Code |
| factory-shipBuilderIO/skills | Skill | 4.7k | today | MIT | A | 28 | Claude Code |
| devops-pipelineluongnv89/skills | Skill | 149 | yesterday | MIT | A | 65 | Claude Code, Codex |
| github-pages-publishluongnv89/skills | Skill | 149 | yesterday | MIT | A | 63 | Claude Code |
| github-actions-expertroedyrustam/vibes-plug | Skill | 132 | 6d ago | MIT | A | 35 | Cursor |
| zb-release-pipelineAdamBien/airails | Skill | 76 | yesterday | MIT | A | 148 | Claude Code, Codex |