# Manage native GitHub stacked pull requests with gh-stack

> Teach coding agents to split large changes into native GitHub stacked pull requests, keep branch layers rebased, and submit focused reviewable PR chains with the gh stack CLI.

- Skill: `agentskillexchange/manage-native-github-stacked-pull-requests-with-gh-stack` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/manage-native-github-stacked-pull-requests-with-gh-stack`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/manage-native-github-stacked-pull-requests-with-gh-stack/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/manage-native-github-stacked-pull-requests-with-gh-stack

---


# Manage native GitHub stacked pull requests with gh-stack

Teach coding agents to split large changes into native GitHub stacked pull requests, keep branch layers rebased, and submit focused reviewable PR chains with the gh stack CLI.

## Prerequisites

GitHub CLI 2.0+, gh-stack extension, a GitHub repository with Stacked PRs enabled, and an AI coding agent that can use repository Git commands

## Installation

Requirements and caveats from upstream:
- Requires the [GitHub CLI](https://cli.github.com/) (gh) v2.0+.
- | -n, --numbered | Use auto-incrementing numbered branch names (requires --prefix) |
- Creates a new branch at the current HEAD, adds it to the top of the stack, and checks it out. Must be run while on the topmost branch of a stack. If no branch name is given, prompts for one.

Basic usage or getting-started notes:
- sh
- gh extension install github/gh-stack
- ## AI agent integration

- Source: https://github.com/github/gh-stack
- Extracted from upstream docs: https://raw.githubusercontent.com/github/gh-stack/HEAD/README.md

## Documentation

- https://gh.io/stacks

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/manage-native-github-stacked-pull-requests-with-gh-stack/)

