gh-stack

Automate stacked branch and pull request management with the gh-stack GitHub CLI extension.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/dorage/hello-stacked-pr --skill gh-stack-dorage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-stack
Source: https://github.com/dorage/hello-stacked-pr/tree/main/.agents/skills/gh-stack
Command: npx skills add https://github.com/dorage/hello-stacked-pr --skill gh-stack-dorage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

gh-stack solves the challenge of managing multiple dependent PRs by providing a GitHub CLI extension that organizes, wires, and navigates a stack of branches so reviews stay focused and consistent.

Core Features & Use Cases

  • Manage stacked branches and PRs with a clear dependency order.
  • Create, rebase, push, sync, navigate, and view stacks of dependent PRs across a repository.
  • Tear down and rebuild stacks to reorder or rename branches, enabling iterative review cycles.

Quick Start

Initialize a new stack with gh-stack, add successive branches on top, and push or submit PRs to GitHub.

Frequently Asked Questions about gh-stack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage stacked pull requests in GitHub?

Stacked branches organize large changes into an ordered sequence where each branch builds on the previous one, keeping pull requests focused and consistent for reviewers before merging into the main trunk.

How do I rebase a stack of dependent branches without breaking PRs?

Yes, you can automate stacked PR creation by running the gh-stack extension non-interactively to push ordered branches, submit pull requests, and link them on GitHub using trunk-based branching with per-branch bases.

Does gh-stack work with the standard GitHub CLI?

gh-stack outputs JSON when viewing stacks, allowing you to parse stack data programmatically and integrate the branch and pull request hierarchy into automated workflows or external tools.

How do I reorder or rename branches in a stacked PR workflow?

You can reorder or rename branches in a stacked PR workflow by tearing down and rebuilding the stack with gh-stack, which automatically updates the per-branch bases and resyncs the pull requests on GitHub.