Skip to content
Back to skills

Pr Stacks

ASecurity

Use to submit and track dependent stacked pull requests.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentsbashgitapifrontend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add dryvist/claude-code-plugins --skill pr-stacks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pr Stacks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pr Stacks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dryvist-pr-stacks/badge)](https://www.skillsdirectory.com/skills/dryvist-pr-stacks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pr-stacks
description: Use to submit and track dependent stacked pull requests.
---

# PR Stacks

**Stacked pull requests** break one large change into an ordered chain of small,
dependent PRs that are reviewed and merged independently — so you can keep
building instead of waiting for each layer to merge.

```text
feat/frontend        → PR #3   (base: feat/api)
feat/api             → PR #2   (base: feat/auth)
feat/auth            → PR #1   (base: main)     ← bottom
main / develop                                  ← trunk
```

For branch creation, PR targets, and PR-branch sync, follow the
[Git Town rule](https://github.com/dryvist/ai-llm-prompts/blob/main/auto-ai-agent/instructions/agentsmd/rules/on-demand/git-flow.md).
For Git-flow promotion, use `/promote-release`.

> [!IMPORTANT]
> All branches must live in the same repository — cross-fork stacks are not
> supported. The feature is in public preview, so a repository must opt in.

## Provisioning — Nix, never `gh extension install`

`gh` and the `gh stack` extension are provisioned by the Nix configuration
(`nix-home` provides the source-built extension via `programs.gh.extensions`;
`nix-ai` carries the upstream agent skill). **Never** run
`gh extension install github/gh-stack` — ad-hoc tool installs are banned (see
`nix-tool-policy`). If `gh stack` is missing, the fix is a change in the Nix
repository, not an install command here.

## Pre-GitHub workflow

Build **bottom-up**: foundational changes (types, schema, shared helpers) in the
lowest layer; consumers and UI above. One focused, reviewable change per layer.
Create and sync branches according to the Git Town rule above. Once the branches
exist, manage the stack with:

```bash
gh stack push                 # push the layers
gh stack submit --open        # create the PRs ready for review; never leave them as drafts
gh stack view                 # inspect layers, PR links, and status
```

Full command/flag reference: `gh stack --help` and GitHub's *Stacked pull
requests CLI commands* docs; the upstream `gh-stack` skill covers it in depth.

## Rules that matter

- **Keep layers linear.** Do not merge one PR branch into another. Follow the
  Git Town rule above for branch and target conventions.
- **Merging is stack-aware.** Landing any PR lands every unmerged layer below it
  atomically (merge commit, squash, and rebase all supported; merge-queue aware).
  A partial merge auto-retargets the layers above — those branches are **not**
  orphans, so leave them alone (`/prune-branches` already protects `--base` refs).
- **Stacks are not exempt from standards.** Apply `pr-standards` (issue linking,
  conventional titles) to every layer; `gh stack submit`
  creates the PRs, so edit their bodies afterward as needed.
- **API merges** of a stacked PR must use GitHub's asynchronous merge endpoint —
  the legacy synchronous merge endpoints cannot merge a stack.

## Related Skills

- gh-cli-patterns (github-workflows) — default-branch (trunk vs git-flow) detection
- pr-standards (github-workflows) — PR creation guards, issue linking
- git-workflow-standards (git-workflows) — branch hygiene and worktree cleanup
- merge-pr (github-workflows) — merges the stack-aware way
- rebase-pr (github-workflows) — local rebase-merge for individual PRs
- prune-branches (github-workflows) — protects `--base` refs, so stack layers are safe

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.