stacked-prs

stacked-prs is a skill for Claude Code from Mathews-Tom/armory. It costs 122 tokens per session (4,381 once invoked), scanned A, original, MIT.

A Git workflow for dependent branch stacks and stacked pull requests. In a stack, each branch builds on the previous branch, so the proposed changes must be reviewed and merged in order.

In plain words
What is it for?
Use it to create, publish, validate, synchronize, merge, and clean up stacked pull requests.
Why use it?
It helps keep branch ancestry and pull-request targets aligned as the stack changes. It reduces errors when rebasing, retargeting, merging, or cleaning up related branches.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/validate_evals.py.

Part of the armory plugin — 85 skills shipped together

Good fit Use it to create, publish, validate, synchronize, merge, and clean up stacked pull requests.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Mathews-Tom/armory
agentmods
npx agentmods add skills/mathews-tom/armory/stacked-prs

Made for: Claude Code.

Or install armory, the plugin that ships this one along with the rest of its 85 skills.

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/skills/mathews-tom/armory/stacked-prs/github.svg)](https://agentmods.dev/skills/mathews-tom/armory/stacked-prs)
Your own site
<a href="https://agentmods.dev/skills/mathews-tom/armory/stacked-prs"><img src="https://agentmods.dev/badge/skills/mathews-tom/armory/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/skills/mathews-tom/armory/stacked-prs"><img src="https://agentmods.dev/badge/skills/mathews-tom/armory/stacked-prs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,381 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 47
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 162
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 243
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00122 $0.04381
Opus 5 $0.00061 $0.02191
Sonnet 5 $0.00024 $0.00876
Haiku 4.5 $0.00012 $0.00438

Measured 5d ago against content hash f6fe0e207ddf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 5d 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.

skills/stacked-prs/SKILL.md · 374 lines

How it starts

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

Stacked PRs

Build, publish, synchronize, validate, merge, and clean up stacked pull requests without corrupting branch topology.

The package identity is provider-neutral. Git is the source of truth for branch ancestry; provider PR metadata is the source of truth for review bases. GitHub through gh is the first documented provider adapter.

Reference Files

File Contents Load When
references/stack-model.md Stack inference, explicit ordering, and .stack-prs.yaml rules Inspecting, publishing, validating, or cleaning a stack
references/provider-adapters.md Provider adapter contract and GitHub gh commands Creating, retargeting, checking, merging, or deleting PRs
references/sync-algorithm.md Rebase and force-with-lease synchronization workflow Syncing a stack after a parent or base moves
references/merge-discipline.md Bottom-up merge and branch cleanup rules Merging or closing out a stack
references/metadata-format.md Optional metadata schema and validation rules .stack-prs.yaml exists or inference is ambiguous
references/provenance.md Commit-trailer stack identity, stamping, verification, merge-mode coupling Creating, splitting, syncing, or merging any stack
references/github-native.md Eligibility, gh stack operations, preview limits, and manual fallback A GitHub-native stack is requested or detected

When To Use

Use this skill Use another package
Multiple dependent branches need PRs against parent branches ship-workflow for one independent release PR
A feature branch must be split into reviewable dependent branches task-decomposer for planning tasks before code exists
An existing stack needs rebasing, retargeting, validation, or merge sequencing pr-review for reviewing one PR diff
A stack must be cleaned after merge General Git commands for unrelated branch cleanup

Core Rules

  • Run git rev-parse --show-toplevel before any workflow.
  • Run git status --porcelain before rebases, pushes, PR creation, PR retargeting, merge, or cleanup.
  • Stop on a dirty worktree unless the user explicitly scopes the operation to inspection only.
  • Prefer existing PR baseRefName values over inferred ancestry.
  • Resolve <base> from the root PR's baseRefName (gh pr view <root-pr> --json baseRefName --jq .baseRefName), not from origin/HEAD; a stack's trunk need not be the repository's default branch.
  • Use explicit branch order or .stack-prs.yaml when parent inference is ambiguous.
  • Never use plain git push --force; use git push --force-with-lease origin <branch>.
  • Merge from root to leaf. Never merge a child before its parent.
  • Do not delete unmerged stack branches without explicit user instruction.
  • Stamp Stack-Id and Stack-Position trailers on every commit the skill creates or splits; copy the ID from .stack-prs.yaml or mint it once when absent.
  • Verify trailers are present and consistent before merge.
  • Probe every open stack PR for native-stack membership during Inspect (references/stack-model.md § Native Stack Detection) before merge planning; a detected native stack makes the manual merge path in §5 unavailable, not merely discouraged.
  • Detect the provider's squash message policy (squash_merge_commit_message) before merging with --squash. Fold trailers into the squash body only when the policy is PR_BODY or BLANK; under COMMIT_MESSAGES (GitHub's default) trailers already survive automatically.

Read the full file on GitHub · 374 lines

Files

What ships with it

8 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.

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. 5d ago First seen · 374 lines · 122 tokens per session scan A f6fe0e207ddf

Subscribe to this mod's changes

stacked-prs is a skill published in the GitHub repository Mathews-Tom/armory (316 stars, last pushed 4d ago), licensed MIT. It adds 122 tokens to every session and 4,381 once invoked, about $0.0006 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-05.

Related

Other skills, from other repositories

gh-issues

Use when creating, searching, updating, or managing GitHub issues via CLI. Triggers: "issue", "create issue", "gh issue", "task tracking", "context", "handoff", "resume task", "session context", "save progress", "active tasks", "in-progress", "my tasks", "open issues". Covers: gh commands, bulk operations, JSON/jq…

serejaris/personal-corp-os · 104 tokens

mx-pr

Draft a pull request from the feature spec and git log, run an autonomous commit-history cleanup (content check), then publish to GitHub or GitLab (Bitbucket experimental) — or hand off. Use when a feature branch is ready for PR, standalone or from mx-flow. Usage: /mx-pr [name].

maxence2997/mx-harness · 67 tokens

mx-commit

Commit all pending changes as one commit per logical concern, following the project's message convention (type prefix, 50-char subject, English). Use when the working tree may hold several changes or the convention must be enforced; a single trivial change can use plain git commit. Usage: /mx-commit [--auto].

maxence2997/mx-harness · 67 tokens

safe-public-release

Use when publishing, open-sourcing, exporting, sanitizing, or moving code, agent skills, prompts, templates, fixtures, datasets, workshop assets, or other artifacts from a private repository, vendor/runtime environment, or mixed working directory into a public repository or registry. Builds a provenance inventory…

serejaris/personal-corp-os · 166 tokens

dirty-worktree-discipline

Keeps agent work safe in messy repositories. Use when git status is dirty, unrelated files exist, generated artefacts are present, multiple agents share a repo, or you must commit only the intended slice without damaging someone else's work.

joelbrilliant/agentic-delivery-skills · 52 tokens

finishing-a-development-branch

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work.

obra/superpowers · 27 tokens