Agent skill · n8n-io
n8n:gh-stack
Manage stacked branches and pull requests with the gh-stack GitHub CLI extension. Use when the user wants to create, push, rebase, sync, navigate, or view stacks of dependent PRs. Triggers on tasks involving stacked diffs, dependent pull requests, branch chains, or incremental code review workflows.
What it needs
About 13k tokens when loaded.
What this skill does
gh-stack gh stack is a GitHub CLI extension for managing stacked branches and pull requests. A stack is an ordered list of branches where each branch builds on the one below it, rooted on a trunk branch (typically the repo's default branch). Each branch maps to one PR whose base is the branch below it, so reviewers see only the diff for that layer. The bottom of the stack is the branch closest to the trunk, and the top is the branch furthest from the trunk. Each branch inherits from the one below it. Navigation commands (up, down, top, bottom) follow this model: up moves away from trunk, down moves toward it. When to use this skill Use this skill when the user wants to: Break a large change into a chain of small, reviewable PRs Create, rebase, push, or sync a stack of dependent branches Navigate between layers of a branch stack View the status of stacked PRs Tear down and rebuild a stack to remove, reorder, or rename branches Prerequisites The GitHub CLI (gh) v2.0+ must be installed and authenticated. Install the extension with: Before using gh stack, configure git to prevent interactive prompts: Agent rules All gh stack commands must be run non-interactively. Every command invocation must include the flags and positional arguments needed to avoid prompts, TUIs, and interactive menus. If a command would prompt for input, it will hang indefinitely. 1. Always supply branch names as positional arguments to init, add, and checkout. Running these commands without arguments triggers interactive prompts. Branch names are used exactly as given — a name is never prefixed or transformed, so gh stack add refactor/foo creates a branch named refactor/foo. 2. Always use --auto with gh stack submit to auto-generate PR titles. Without --auto, submit prompts for a title for each new PR. 3. Always use --json with gh stack view. Without --json, the command launches an interactive TUI that cannot be operated by agents. There is no other appropriate flag — always pass --json. 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills n8n-io/gh-stack