stacking-prs

stacking-prs is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 136 tokens per session (2,871 once invoked), scanned A, original, MIT.

A workflow for creating and managing stacked pull requests on GitHub. A stack splits one larger change into an ordered chain of smaller pull requests, where each builds on the one below it.

In plain words
What is it for?
Use it to split a change into layers, add or restack pull requests, rebase branches, adopt existing pull requests, inspect someone else’s stack, or merge the full stack.
Why use it?
It helps break large changes into reviewable pieces while keeping their order and dependencies clear. It also explains how to update, publish, adopt, and merge the stack.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

Good fit Use it to split a change into layers, add or restack pull requests, rebase branches, adopt existing pull requests, inspect someone else’s stack, or merge the full stack.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/stacking-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.

Any agent
npx skills add PostHog/posthog-foss --skill stacking-prs
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

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 stacking-prs

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/stacking-prs/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/stacking-prs)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/stacking-prs"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/stacking-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 stacking-prs

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/stacking-prs"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/stacking-prs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,871 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 pass 7 Sept 2026
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.00136 $0.02871
Opus 5.5 $0.00054 $0.01148
Sonnet 5.5 $0.00027 $0.00574
Haiku 4.5 $0.00014 $0.00287

Measured 1mo ago against content hash 0734d3169954, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

.agents/skills/stacking-prs/SKILL.md · 143 lines

How it starts

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

Stacked PRs with gh stack

Before you divide a change into layers, check things already tried. It records when a stack cost more review effort than one PR.

GitHub's native stacked PRs are enabled on this repo. A stack is an ordered chain of PRs where each one targets the branch of the PR below it; the bottom PR targets master. GitHub tracks the chain as a first-class object: the PR UI shows a stack map, branch protections (code owner approval, required checks) apply to every layer including mid-stack ones, and CI that runs on master PRs runs on every layer.

Setup (this skill is written against gh-stack v0.1.0):

gh extension install github/gh-stack   # or: gh extension upgrade stack

Upstream docs: about stacked PRs, CLI commands.

In a cloud task sandbox, use gh_stack instead

The rest of this skill assumes a developer machine. Cloud task runs block git commit and git push so unsigned commits cannot leave the sandbox, which takes out every gh stack command that publishes a stack — submit, sync, push, and link with branch arguments all push, and gh stack add -m commits.

There, build the stack from the signed-commit tooling and link it with the gh_stack MCP tool, which drives GitHub's Stacks REST API and never pushes:

  1. Commit each layer with git_signed_commit, passing a new branch — the checkout already sits on the layer below, so the branch starts there.
  2. Open each layer's PR with gh pr create --base <branch of the layer below>.
  3. Link them with gh_stack, operation create, passing pull_requests bottom to top.

To restack a layer: check that layer out, git rebase <its parent branch>, then republish it with git_signed_rewrite passing onto = the parent branch. gh stack rebase still does the rebase itself, but nothing may publish the result — gh stack push and gh stack sync both push. git_signed_rewrite replays whatever local HEAD points at and uses branch only to pick which remote ref moves, so the layer has to be the checked-out branch or you publish the wrong history to it.

Read the full file on GitHub · 143 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 Changed · +8 lines 0734d3169954
  2. 1mo ago Changed · +6 lines d5c4a993a293
  3. 1mo ago Changed a3803b9c71e1
  4. 2mo ago Changed · +2 lines 49f31b20b1d2
  5. 3mo ago First seen · 127 lines · 136 tokens per session scan A b0a090f093e1

Subscribe to this mod's changes

stacking-prs is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 136 tokens to every session and 2,871 once invoked, about $0.0005 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-03.

Related

stacking-prs compared with skills from other repositories

stacking-prs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
stacking-prsPostHog/posthog-fossSkill736todayMITA136Claude Code, Codex
merge-batchdiegosouzapw/OmniRouteSkill91k5d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15ktodayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.8ktodayMITA20Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1k2d agoMITA51Claude Code
comet-githubrpamis/cometSkill3.3ktodayMITA72Claude Code, Codex
re0-mergeLilMGenius/paperthinSkill1.5ktodayMITA51Claude Code, Codex