gh-stack

Orchestrate stacked branches and dependent pull requests with the gh CLI extension.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing stacked branches and pull requests can be complex and error-prone. gh-stack provides a cohesive workflow to organize and operate on stacks of dependent PRs, reducing context switching and manual coordination.

Core Features & Use Cases

  • Create, push, rebase, sync, navigate, and view stacks of dependent branches and their PRs.
  • Navigate between stack layers, tear down and rebuild stacks, and keep trunk aligned with remote merges.
  • Get a consolidated view of stack status and PR state to streamline review and integration.

Quick Start

Initialize a trunk and build out a multi-layer stack by adding branches on top of each other and committing changes as you go.

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 branches and dependent pull requests in git?

You can manage stacked branches and dependent pull requests by orchestrating multiple dependent changes in a single, coherent workflow. This reduces context switching and manual coordination by organizing stacks of dependent PRs across trunk and branches.

What is the best way to rebase and sync stacked pull requests against trunk?

The best way to rebase and sync stacked pull requests is to use a non-interactive workflow that handles rebases, merges, and PR state synchronization. This keeps trunk aligned with remote merges while safeguarding against prompts during the navigation and teardown process.

Do I need the gh CLI extension to coordinate stacked diffs and branch management?

Yes, you need the gh CLI extension and git installed to coordinate stacked diffs and branch management. These dependencies are required to enforce the non-interactive usage that handles rebases, merges, and PR state synchronization across your stack.

How do I get a consolidated view of my stack status and pull request states?

To get a consolidated view of your stack status and pull request states, use a workflow that navigates between stack layers and synchronizes PR states. This streamlines review and integration by providing a cohesive overview of dependent branches and their PRs.

Can I break large features into stacked diffs without manual rebase conflicts?

Yes, you can break large features into stacked diffs without manual rebase conflicts by building out a multi-layer stack. Initialize a trunk, add branches on top of each other, and let the workflow handle rebases and merges to tear down and rebuild stacks automatically.