pr-stack

pr-stack is a skill for Claude Code from rp1-run/rp1. It costs 20 tokens per session (3,559 once invoked), scanned A, original, Apache-2.0.

A workflow for splitting one large pull request or branch into a sequence of smaller pull requests. A stacked pull request is a series in which each change builds on the previous one.

In plain words
What is it for?
Use it to plan a stack from a local branch, remote branch, or existing pull request, then create it after approval.
Why use it?
Large changes are difficult to review and merge safely. Smaller, ordered changes let reviewers focus on one part at a time.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the rp1-dev plugin — 23 skills, 36 agents shipped together

Good fit Use it to plan a stack from a local branch, remote branch, or existing pull request, then create it after approval.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rp1-run/rp1/pr-stack
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 rp1-run/rp1 --skill pr-stack
Clone the repo
git clone --depth 1 https://github.com/rp1-run/rp1

Made for: Claude Code.

Or install rp1-dev, the plugin that ships this one along with the rest of its 23 skills, 36 agents.

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 pr-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/rp1-run/rp1/pr-stack/github.svg)](https://agentmods.dev/skills/rp1-run/rp1/pr-stack)
Your own site
<a href="https://agentmods.dev/skills/rp1-run/rp1/pr-stack"><img src="https://agentmods.dev/badge/skills/rp1-run/rp1/pr-stack/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 pr-stack

Your own site · 80×15
<a href="https://agentmods.dev/skills/rp1-run/rp1/pr-stack"><img src="https://agentmods.dev/badge/skills/rp1-run/rp1/pr-stack.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,559 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.00020 $0.03559
Opus 5 $0.00010 $0.01780
Sonnet 5 $0.00004 $0.00712
Haiku 4.5 $0.00002 $0.00356

Measured yesterday against content hash e336b2ad9446, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pr-stack 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 yesterday.

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.

plugins/dev/skills/pr-stack/SKILL.md · 361 lines

How it starts

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

PR Stack

Plan and execute splitting a large PR, local branch, or remote branch into an ordered stack of smaller reviewable PRs.

Use the pre-resolved projectRoot, kbRoot, workRoot, and codeRoot values from the generated Workflow Bootstrap section. Run all source-control commands from codeRoot, and write workflow artifacts only under workRoot.

Constraint: plan first; create branches/PRs only after explicit user approval.

STATE-MACHINE

stateDiagram-v2
    [*] --> planning
    planning --> executing : approved
    planning --> reporting : plan_only
    executing --> reporting : stack_created
    reporting --> [*] : done

On each phase transition, report via:

rp1 agent-tools emit \
  --workflow pr-stack \
  --type status_change \
  --run-id {RUN_ID} \
  --step {CURRENT_STATE} \
  --data '{"status": "running"}'
  • RUN_ID comes from the generated Workflow Bootstrap section.
  • Derive RUN_NAME from the resolved source: use "PR Stack: PR #{number}" for a GitHub PR, otherwise "PR Stack: {source_ref}".
  • On the first emit only, include --name "{RUN_NAME}".
  • On blocking error, emit the current step with {"status":"failed","reason":"..."} and stop.

Example sequence:

rp1 agent-tools emit --workflow pr-stack --type status_change --run-id {RUN_ID} --name "PR Stack: PR #42" --step planning --data '{"status": "running"}'
rp1 agent-tools emit --workflow pr-stack --type waiting_for_user --run-id {RUN_ID} --step planning --data '{"prompt":"Approve this split plan and allow branch/PR creation?","context":"pr-stack requires explicit approval before creating branches, commits, pushes, or PRs"}'
rp1 agent-tools emit --workflow pr-stack --type status_change --run-id {RUN_ID} --step executing --data '{"status": "running"}'
rp1 agent-tools emit --workflow pr-stack --type status_change --run-id {RUN_ID} --step reporting --data '{"status": "running"}'
rp1 agent-tools emit --workflow pr-stack --type status_change --run-id {RUN_ID} --step reporting --data '{"status": "completed"}'

Read the full file on GitHub · 361 lines

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. yesterday First seen · 361 lines · 20 tokens per session scan A e336b2ad9446

Subscribe to this mod's changes

pr-stack is a skill published in the GitHub repository rp1-run/rp1 (38 stars, last pushed yesterday), licensed Apache-2.0. It adds 20 tokens to every session and 3,559 once invoked, about $0.0001 per session on Opus 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-09-07.

Related

Other skills, from other repositories

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

changelog-gen

A changelog generator that turns Git history into a version-by-version record of project changes. A changelog is a readable summary of new features, fixes, breaking changes, documentation, and other updates.

laolaoshiren/claude-code-skills-zh · 19 tokens

at-daily-log

Summarize each day's Git activity into a concise daily work log, for a single date or a range. Uses the current repository, optional configured work projects, or paths named in conversation; configuration is never required.

kairyou/agent-tools · 48 tokens

at-commit

Generate a Conventional Commits message from staged changes and wait for confirmation before committing. Use when the user asks to commit or generate a commit message.

kairyou/agent-tools · 33 tokens

openspec-bulk-apply-change

Use when multiple active OpenSpec changes should be applied concurrently in isolated worktrees with delegated verification and no merge.

intent-driven-dev/intent-driven-template · 30 tokens

repo-hygiene

Use when auditing repo hygiene in any codebase — file layout, git history, config sprawl, ignore contracts, open-source readiness. Assess by default, fix on request; treats the repository as a product whose users are contributors.

automagik-dev/genie · 51 tokens