stacked-prs

stacked-prs is a command for Claude Code from carloshpdoc/ios-workflow-claude. It costs 19 tokens per session (1,422 once invoked), scanned A, original, Apache-2.0.

A workflow for splitting code changes into a chain of pull requests, where each pull request builds on the previous one.

In plain words
What is it for?
Use it to inspect uncommitted changes, group files, create branches and commits, and prepare stacked pull requests.
Why use it?
It keeps reviews smaller by grouping related changes into semantic commits and limiting each pull request to fewer than 600 added lines.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the ios-workflow plugin — 22 commands, 3 agents shipped together

Good fit Use it to inspect uncommitted changes, group files, create branches and commits, and prepare stacked pull requests.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/carloshpdoc/ios-workflow-claude/stacked-prs
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.

Clone the repo
git clone --depth 1 https://github.com/carloshpdoc/ios-workflow-claude

Made for: Claude Code.

Or install ios-workflow, the plugin that ships this one along with the rest of its 22 commands, 3 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 stacked-prs

README.md
[![agentmods](https://agentmods.dev/badge/commands/carloshpdoc/ios-workflow-claude/stacked-prs/github.svg)](https://agentmods.dev/commands/carloshpdoc/ios-workflow-claude/stacked-prs)
Your own site
<a href="https://agentmods.dev/commands/carloshpdoc/ios-workflow-claude/stacked-prs"><img src="https://agentmods.dev/badge/commands/carloshpdoc/ios-workflow-claude/stacked-prs/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 stacked-prs

Your own site · 80×15
<a href="https://agentmods.dev/commands/carloshpdoc/ios-workflow-claude/stacked-prs"><img src="https://agentmods.dev/badge/commands/carloshpdoc/ios-workflow-claude/stacked-prs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,422 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.00019 $0.01422
Opus 5 $0.00010 $0.00711
Sonnet 5 $0.00004 $0.00284
Haiku 4.5 $0.00002 $0.00142

Measured 9d ago against content hash 7a8f20c960fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

stacked-prs 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 9d 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/ios-workflow/commands/stacked-prs.md · 160 lines

How it starts

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

Project context: Values in angle brackets below (e.g. <scheme>, <JIRA_KEY>, <flag-key-enum>) are resolved at runtime — detect them from the project (xcodebuild -list -json for the scheme, git/gh for repo & owner, the branch name for the Jira key, a codebase search for flag/font files), or ask if they cannot be inferred. This plugin ships no per-project config.

Stacked PRs Workflow

You are creating semantic commits and splitting them into stacked upstream PRs, each under 600 added lines.

Task

Split uncommitted changes into multiple branches with semantic commits, where each branch is based on the previous one, creating a chain of PRs.

Workflow

Step 1: Analyze Changes

  1. Run git status and git diff --stat to identify all changed/new files
  2. Ask the user which files should be excluded from commits (e.g., unrelated docs, settings changes, storekit files)
  3. Count lines per file: wc -l <file> for new files, git diff --stat <file> for modified files

Step 2: Plan the Split

Group files into logical commits, each under 600 added lines:

Suggested grouping order (adapt to the actual changes):

  1. Models/DTOs — domain models, response types, shared models
  2. Data layer — repositories, data sources, mappers, queries, mock data
  3. Presentation — view models, coordinators, factories, use cases, views
  4. Tests — test mocks, unit tests (split further if over 600 lines)

Present the plan to the user with line counts per group before proceeding.

Step 2.5: Select PR Label

Every PR must have exactly one report label. Select once for the entire chain (all PRs get the same label):

Label Use when
report-feature New feature or functionality
report-improvement-fix Bug fix or UX improvement (not a new feature)
report-tech-improvement Tech debt, CI/CD, refactoring, code removal
report-analytics-fix Analytics-related changes

Auto-inference from TYPE:

  • FEATURE → report-feature
  • FIX → report-improvement-fix
  • REFACTOR, BUILD, CI, PERF, STYLE, DOCS, TEST → report-tech-improvement

Read the full file on GitHub · 160 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. 9d ago First seen · 160 lines · 19 tokens per session scan A 7a8f20c960fc

Subscribe to this mod's changes

stacked-prs is a command published in the GitHub repository carloshpdoc/ios-workflow-claude (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 19 tokens to every session and 1,422 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-08-31.