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.5 $0.00008 $0.01424
Sonnet 5.5 $0.00004 $0.00712
Haiku 4.5 $0.00002 $0.00356

Measured 1mo ago against content hash e336b2ad9446, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

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. 1mo ago 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 today), licensed Apache-2.0. It adds 20 tokens to every session and 3,559 once invoked, about $0.0001 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-09-07.

Related

Other skills, from other repositories

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

openspec-git-discipline

Use when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history.

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

code-commit

Generate and validate conventional commit messages following the conventionalcommits.org spec. Use whenever the user wants to commit code, mentions commit messages, git commit, or asks to create a commit. Triggers on "commit", "git commit", "conventional", or when reviewing commit message format.

martinffx/atelier · 62 tokens

spec-finish

Post-implementation completion workflow for Spec-backed Plans. Use after spec-implement completes to validate, review, create stacked commits, and open a PR via code-pull-request. Triggers only with an active Spec-backed Plan after spec-implement completes, including when the user says "finish", "done", or "complete"…

martinffx/atelier · 73 tokens

spec-loop

Run an approved Spec-backed Plan (design.md and plan.json both present) unattended to a draft PR: implement and review each batch with fresh subagents, commit, then finish with one whole-branch review. Use when the user says "run it to the end" or "implement everything and open a PR".

martinffx/atelier · 66 tokens

code-pull-request

Manage GitHub pull requests or GitLab merge requests: create, read/leave/respond to comments, and merge. Triggers on "open a PR", "make a PR", "merge this PR", "merge the MR", "read PR comments", "leave a comment on the PR", "respond to a comment", "ship this", or when a feature branch is ready for review.

martinffx/atelier · 84 tokens