stacked-prs

stacked-prs is a skill for Claude Code, Codex from d-oit/rust-2026-template. It costs 72 tokens per session (1,228 once invoked), scanned A, original, MIT.

A GitHub workflow for splitting a large feature into several pull requests, where each pull request builds on the previous one.

In plain words
What is it for?
Use it for GitHub features with at least three distinct, dependent concerns and different reviewers. The workflow includes branch naming, per-pull-request checks, and the gh-stack tool.
Why use it?
It lets different layers of a feature be reviewed and merged separately when they have clear dependencies. It avoids adding this process to small changes or bug fixes where it would add overhead.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/d-oit/rust-2026-template/stacked-prs
Any agent
npx skills add d-oit/rust-2026-template --skill stacked-prs
Clone the repo
git clone --depth 1 https://github.com/d-oit/rust-2026-template

Made for: Claude Code, Codex.

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/d-oit/rust-2026-template/stacked-prs.svg)](https://agentmods.dev/skills/d-oit/rust-2026-template/stacked-prs)
Your own site
<a href="https://agentmods.dev/skills/d-oit/rust-2026-template/stacked-prs"><img src="https://agentmods.dev/badge/skills/d-oit/rust-2026-template/stacked-prs.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,228 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00072 $0.01228
Opus 5 $0.00036 $0.00614
Sonnet 5 $0.00014 $0.00246
Haiku 4.5 $0.00007 $0.00123

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

.agents/skills/stacked-prs/SKILL.md · 121 lines

How it starts

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

Stacked PRs (Optional)

When to Use

Stacked PRs are OPTIONAL. Default to single-PR atomic commits (see atomic-commit skill). Use stacks ONLY when ALL of these hold:

  • Feature has 3+ distinct concerns with clear dependencies
  • Different layers need different reviewers
  • Bottom layers can merge independently while top layers are WIP
  • Repository is on GitHub (not GitLab)

Do NOT use for: bug fixes, hotfixes, small/medium changes, or issue-triage batch work.

Setup

gh extension install github/gh-stack
git config rerere.enabled true      # remember conflict resolutions

See https://github.com/github/gh-stack for the full agent skill (SKILL.md + references/). This file provides template-specific integration guidance only.

Decision Flow

Use stacked PRs when: GitHub repo, 3+ distinct layers, different reviewers per layer. Otherwise: use atomic-commit (single PR).

Template Integration

  • Quality gates run per-PR naturally — each layer gets its own CI via ./scripts/quality-gates.sh
  • Conventional commits per layer: feat(scope): description
  • Branch naming: <topic>/<concern> (e.g., billing/schema, billing/api)
  • Metrics: Report one event per layer completion to .agents/events/YYYY/MM/DD/
  • Hotfixes: Never stack hotfixes — they must be atomic for DORA Change Failure Rate tracking

Non-Interactive Agent Usage

Always use flags to avoid TUI blocking:

Command Use Never run bare
View gh stack view --json gh stack view (opens TUI)
Submit gh stack submit --auto gh stack submit (prompts per PR)
Submit (ready) gh stack submit --auto --open creates non-draft PRs
Init gh stack init <branches...> gh stack init (prompts for names)
Merge gh stack merge <pr-number> --yes gh stack merge (interactive picker)
Add gh stack add <branch> gh stack add (prompts for name)
Checkout gh stack checkout <target> gh stack checkout (opens menu)
Modify Not available non-interactively gh stack modify (TUI-only)

Read the full file on GitHub · 121 lines

Files

What ships with it

1 file 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 · 121 lines · 72 tokens per session scan A 4a923783f3ff

Subscribe to this mod's changes

stacked-prs is a skill published in the GitHub repository d-oit/rust-2026-template (10 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 1,228 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

agent-creator

Create custom AI subagents with proper plugin structure, persona generation, and companion routing skills.

ranbot-ai/awesome-skills · 22 tokens

n8n:create-instance-ai-eval

Authors a new Instance AI workflow eval case — written locally as JSON, calibrated against a real build, then pushed to the LangTracer suite CI runs — build cases, behaviour/process cases, credential cases, and seeded (mid-conversation) cases — with intent-driven expectations. Use when adding or changing an Instance…

n8n-io/n8n · 81 tokens

post-build-flow

Handles workflow verification and setup after build-workflow succeeds, or when the message contains workflow-verification-follow-up or workflow-setup-required. Load after direct builds, when verificationReadiness requires action, or on orchestrator verify/setup follow-up turns.

n8n-io/n8n · 53 tokens

intent-recognition

Classifies automation requests using two decisions: anchor (which primitive owns the top-level control flow — workflow-anchored, agent-anchored, needs-clarification, or out-of-scope) and embedsother (whether the other primitive appears embedded inside — an agent step inside a workflow, or a workflow invoked as an…

n8n-io/n8n · 146 tokens

n8n:create-issue

Create Linear tickets or GitHub issues following n8n conventions. Use when the user asks to create a ticket, file a bug, open an issue, or says /create-issue.

n8n-io/n8n · 45 tokens

n8n:linear-issue

Fetch and analyze Linear issue with all related context. Use when starting work on a Linear ticket, analyzing issues, or gathering context about a Linear issue.

n8n-io/n8n · 38 tokens