stack-pr

stack-pr is a command for Claude Code from HigorAlves/orc. It costs 46 tokens per session (1,282 once invoked), scanned A, original, MIT.

A command for splitting one oversized branch into several linked pull requests. A branch is a line of development, and a pull request is a proposed code change for review; each smaller request contains one slice of the original work.

In plain words
What is it for?
Use it to break a large branch into chained pull requests, choose a base branch, set a maximum size, create draft requests, or target selected repositories in a multi-repository workspace.
Why use it?
Large pull requests are harder to review and merge safely. This command can split work by commits or, when commits are messy, ask an analyzer to suggest logical slices within a line-count budget.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: $skill-name invocation.

Good fit Use it to break a large branch into chained pull requests, choose a base branch, set a maximum size, create draft requests, or target selected repositories in a multi-repository workspace.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/higoralves/orc/stack-pr
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/HigorAlves/orc

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/higoralves/orc/stack-pr"><img src="https://agentmods.dev/badge/commands/higoralves/orc/stack-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 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,282 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.00046 $0.01282
Opus 5.5 $0.00018 $0.00513
Sonnet 5.5 $0.00009 $0.00256
Haiku 4.5 $0.00005 $0.00128

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

Security

Grade A, and why

stack-pr 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 26d 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.

codex/orc/content/commands/stack-pr.md · 104 lines

How it starts

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

$orc-stack-pr

Convert one big branch into a stack of smaller, chained PRs: one per Conventional Commit by default, or agent-proposed slices with --smart.

Arguments

  • --smart — dispatch orc-stack-analyzer to propose logical slices from the diff instead of commit-based slicing.
    • Use when commits are messy: WIP, fixups, no Conventional Commits.
  • --base <branch> — target a non-default base (e.g. develop). Defaults to origin/HEAD.
  • --draft — open every PR in the stack as a draft.
  • --max-loc <N> — override the per-slice LOC budget (default: 300).
  • --repos a,b / --repo a / --all-repos / --this-repo — workspace-mode targeting. See orc-workspace-mode.

Preconditions

🛑 Outward write

P5 pushes N branches and opens N PRs; P6 rewrites every PR body. The P4 preview gate guards both.

⚠️ Caution

P5 reshapes history with cherry-picks. It creates <branch>-pre-stack-backup first; the original branch stays safe there.

  • Tests pass and lint is clean (orc-verification-before-completion, P2).
  • The worktree is clean; the branch has no merge commits and at least two commits.
  • Use this when the $orc-ship size gate fires and the user picks "Stack it", or standalone before the PR.
  • Do not invoke for a one-commit branch, or for a hot-fix where review-cycle time dominates ($orc-ship with the Size-budget-override: trailer).

Phases

Modules live in orc-phases (references/stack-pr/). Entering a phase, Read exactly its module.

Phase Module Skipped when
0 Detect context resident, below never
1 Detect tooling orc-stack-pr/P1 never
2 Verify preconditions orc-stack-pr/P2 never
3 Analyze: commit-based slices orc-stack-pr/P3 --smart (P3 hands off)
Smart analysis orc-stack-pr/SMART not --smart and no switch from P3
4 Preview and confirm orc-stack-pr/P4 never
5 Execute: backup, reshape, push, open PRs orc-stack-pr/P5 never
6 Body rewrite, metadata writeback orc-stack-pr/P6 never
7 Reviewer hint, summary orc-stack-pr/P7 never

Read the full file on GitHub · 104 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. 26d ago Changed cf528c16cb20
  2. 1mo ago Changed · -168 lines fa32522f10a4
  3. 1mo ago Changed 0998e6b2a2a0
  4. 3mo ago First seen · 272 lines · 46 tokens per session scan A b83036eecb75

Subscribe to this mod's changes

stack-pr is a command published in the GitHub repository HigorAlves/orc (7 stars, last pushed 4d ago), licensed MIT. It adds 46 tokens to every session and 1,282 once invoked, about $0.0002 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-08-31.

Related

stack-pr compared with commands from other repositories

stack-pr next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
stack-prHigorAlves/orcCommand74d agoMITA46Claude Code
update-infos-releaseFlorianBruniaux/claude-code-ultimate-guideCommand7.6ktodayCC-BY-SA-4.0A18Claude Code
releaseFlorianBruniaux/claude-code-ultimate-guideCommand7.6ktodayCC-BY-SA-4.0A20Claude Code
releaseavelikiy/great_ctoCommand11715d agoMITA47Claude Code
changelogFlorianBruniaux/claude-code-ultimate-guideCommand7.6ktodayCC-BY-SA-4.0A8Claude Code
shipPrabhdeepSingh/claude-pluginsCommand422d agoMITA80Claude Code
releasePrabhdeepSingh/claude-pluginsCommand422d agoMITA59Claude Code