Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Pr Stacks

ASecurity

Use when a change is too large for one PR, when the next unit of work depends on an unmerged PR, or when GitHub stacked pull requests / `gh stack` come up. The single source of truth for the PR-stack concept and the local pre-GitHub workflow: layering branches, keeping layers rebased, and landing a stack without fighting branch protection.

3 stars
0 votes
0 copies
1 views
Added 9/19/2026
ai-agentsbashgitapifrontend

Works with

cliapi

Security Analysis

A100/100

Scanned 9/23/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 automatically 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
Files
SKILL.md
---
name: pr-stacks
description: >-
  Use when a change is too large for one PR, when the next unit of work depends
  on an unmerged PR, or when GitHub stacked pull requests / `gh stack` come up.
  The single source of truth for the PR-stack concept and the local pre-GitHub
  workflow: layering branches, keeping layers rebased, and landing a stack
  without fighting branch protection.
---

# 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
```

The bottom PR targets the **trunk**; each PR above targets the branch below it.
GitHub evaluates branch protection, required checks, and CI against the **trunk**
for *every* layer, not the PR's direct base — so a mid-stack PR is held to the
same standard as the bottom one.

Trunk is the repository's **default branch**: `main` on a trunk repo, `develop`
on a git-flow repo (detect it per `gh-cli-patterns` — never assume). Promotion of
`develop` → `main` is unchanged: `/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.

```bash
gh stack init                 # start a stack; trunk defaults to the default branch
gh stack add <branch-name>    # add the next layer on top (or -Am "msg" to commit + add)
gh stack push                 # push the layers
gh stack submit               # create the PRs; --open marks them ready (default: draft)
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

- **Branch-from-feature is the sanctioned exception here.** `git-workflow-standards` (git-workflows)
  says never branch from a feature branch; a stack layers each branch on the one
  below, and that is the one exception — through `gh stack` only. Never retarget a
  layer with `gh pr edit --base`; let `gh stack` own the bases.
- **Keep layers linear.** No merges between stack branches. When a lower layer
  changes, propagate with a **cascading rebase** (`gh stack` rebases the layers
  above, or trigger GitHub's server-side rebase) — never hand-rebase each layer.
  Layer updates are force-pushes.
- **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, the `human:review` gate) 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, human-review gate
- git-workflow-standards (git-workflows) — branch/worktree conventions this skill exceptions
- merge-pr (github-workflows) — merges the stack-aware way
- rebase-pr (github-workflows) — does not apply to stacked PRs; use cascading rebase
- prune-branches (github-workflows) — protects `--base` refs, so stack layers are safe

Attribution

dryvistdryvist
View sourceSee grades on GitHubMore from dryvist →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →