stacked-prs
Skill15 starsChanged 5 months agoMITView on GitHub
Optional workflow for large features using stacked PRs via gh-stack. Use ONLY when a feature has 3+ distinct concerns with clear dependencies. NOT for bug fixes, hotfixes, or small changes. Requires GitHub. Triggers: "stacked PRs", "gh stack", "split into layers", "stack this".
- Deletes or force-pushes
- Commits and pushes
14 other projects use a version of this.
Adopted by
Most recently taken up by
- Integralist/agent-skillstheir own version, first seen Nov 6, 2026
- dbosk/claude-skillstheir own version, first seen Nov 1, 2026
- Mathews-Tom/armorytheir own version, first seen Nov 1, 2026
- Beakpoint-Insights/roosttheir own version, first seen Nov 1, 2026
- gsimone/skillstheir own version, first seen Oct 25, 2026
- azents/azentstheir own version, first seen Oct 23, 2026
Used with
Projects with it also use show-me, blast-radius and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnasX7Skillshow-me
Help the user understand the current topic visually with concise diagrams, code-shape sketches, and focused HTML artifacts.
Also in 3 projects that use this
MicrosoftSkillblast-radius
Assesses network dependency and shared-infrastructure exposure. Use when the user asks which services, customers, SLA policies, routes, or redundant links are affected by a network fault.
Also in 3 projects that use this
Harut8Skillarchitect
Also in 3 projects that use this
GoogleSkillimprove-codebase-architecture
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
Also in 3 projects that use this
GoogleSkillgrilling
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Also in 3 projects that use this
- +1 more from google
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- Mathews-Tom/armory★ 340same name
- dgalarza/agent-skills★ 72same name
- Beakpoint-Insights/roost★ 32same name
- Integralist/agent-skills★ 23same name
- azents/azents★ 16same name
- malinskibeniamin/skills★ 4same name
- anis-dr/skills★ 3same name
- magnusrodseth/dotfiles★ 3same name
- zehuichan/vibe-harness★ 2same name
- dbosk/claude-skills★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- anti-ai-slopSkill
- architecture-diagramSkill
- atomic-commitSkill
- build-rustSkill
- codacySkill
- crates-io-name-checkSkill
- dora-reportSkill
- goap-agentSkill
- harnessSkill
- issue-triageSkill
- lint-rustSkill
- metrics-reporterSkill
- privacy-firstSkill
- release-rustSkill
- reviewing-pull-requestsSkill
- secret-lintSkill
- self-fix-loopSkill
- skill-creatorSkill
- skill-evaluatorSkill
- task-decompositionSkill
- test-rustSkill
- tokio-performanceSkill
- triz-analysisSkill
- triz-solverSkill
- verify-actionsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 6 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Use stacks ONLY when ALL of these hold:
- Distinctive: line 30
Do NOT use for: bug fixes, hotfixes, small/medium changes, or issue-triage batch work.
- Very specific: line 44
Use stacked PRs when: GitHub repo, 3+ distinct layers, different reviewers per layer.
- Very specific: line 49
Quality gates: run per-PR naturally — each layer gets its own CI via ./scripts/quality-gates.sh
- Distinctive: line 53
Hotfixes: Never stack hotfixes — they must be atomic for DORA Change Failure Rate tracking
- Distinctive: line 57
Always use flags to avoid TUI blocking:
- Distinctive: line 97
Always merge bottom-up (closest to trunk first)
- Distinctive: line 98
If a bottom PR is rejected, close upstack PRs and restack
- Very specific: line 99
Use gh stack merge <pr-number> --yes to merge that PR and every unmerged PR below it
- Very specific: line 100
After all layers merge, gh stack sync --prune cleans up local branches
- Very specific: line 104
Partial submit: If gh stack submit fails mid-way (e.g., network error after 2 of 3 PRs created), re-run gh stack submit — it skips branches …
- Very specific: line 105
Rebase conflict: Run gh stack rebase, resolve conflicts, git add, gh stack rebase --continue.
- Very specific: line 106
Diverged stacks: Run gh stack sync to fetch and reconcile with GitHub.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 resolutionsSee 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) |
Typical Agent Workflow
# 1. Create stack with named branches
gh stack init feat/billing/schema feat/billing/api feat/billing/ui
# 2. Implement bottom layer
git add ... && git commit -m "feat(billing): add schema and models"
./scripts/quality-gates.sh
# 3. Move up and implement next layer
gh stack up
git add ... && git commit -m "feat(billing): add API routes"
./scripts/quality-gates.sh
# 4. Push and create draft PRs
gh stack submit --auto
# 5. After review changes on a layer
gh stack bottom
git add ... && git commit -m "fix(billing): address schema review"
gh stack rebase --upstack
gh stack pushMerge Strategy
- Always merge bottom-up (closest to trunk first)
- If a bottom PR is rejected, close upstack PRs and restack
- Use
gh stack merge <pr-number> --yesto merge that PR and every unmerged PR below it - After all layers merge,
gh stack sync --prunecleans up local branches
Failure Recovery
- Partial submit: If
gh stack submitfails mid-way (e.g., network error after 2 of 3 PRs created), re-rungh stack submit— it skips branches that already have PRs - Rebase conflict: Run
gh stack rebase, resolve conflicts,git add,gh stack rebase --continue. Use--abortto restore all branches - Diverged stacks: Run
gh stack syncto fetch and reconcile with GitHub. If that fails,gh stack unstackthengh stack submit --autoto recreate.
Rationalizations
| Rationalization | Reality |
| "I'll put everything in one PR, it's simpler" | Large PRs get superficial reviews. Stacked PRs get focused, thorough reviews per layer. |
| "Stacking is too much overhead for this feature" | If you're already splitting concerns across files, stacking formalizes what you're doing anyway. |
| "I'll split the PR after I finish coding" | Splitting after the fact is expensive and error-prone. Plan layers before writing code. |
Red Flags
- Stacking a bug fix or hotfix (use atomic-commit instead)
- Using
git push --forceon stacked branches (usegh stack push) - Stacking on GitLab (gh-stack is GitHub-only)
- Amending commits on a stacked branch (breaks upstack branches)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

