n8n:gh-stack

Manage stacked branches and dependent pull requests via the gh-stack GitHub CLI extension.

203k|60.5k|Updated Jun 22, 2019
One-click install
npx skills add https://github.com/n8n-io/n8n --skill n8n-gh-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n:gh-stack
Source: https://github.com/n8n-io/n8n/tree/main/.agents/skills/gh-stack
Command: npx skills add https://github.com/n8n-io/n8n --skill n8n-gh-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Large features often require breaking a single change into multiple dependent pull requests, but managing the chain of branches, rebases, and PR bases manually is error-prone and tedious. This Skill automates the lifecycle of stacked branches so each layer remains independently reviewable.

Core Features & Use Cases

  • Stack Initialization and Branching: Create ordered stacks of branches rooted on a trunk, adopt existing branches, or add new layers on top of the current stack.
  • Push, Submit, and Sync: Push branches, auto-generate PR titles, create draft or ready PRs, and run fetch-rebase-push synchronization in a single command.
  • Navigation and Restructuring: Move up, down, top, or bottom through the stack, check out by PR number, and tear down stacks to remove, reorder, or rename branches.
  • Use Case: Break a full-stack feature into data-models, api-endpoints, and frontend-ui branches, push them as a connected stack of PRs, and rebase the upper layers automatically when the API layer changes.

Quick Start

Use the gh-stack skill to create a new stack with branches auth, api-routes, and frontend, push them, and submit draft pull requests.

Frequently Asked Questions about n8n:gh-stack

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

FAQPage Schema
How do I create stacked pull requests on GitHub

Use the gh-stack CLI extension to initialize a stack with branch names, commit changes per layer, then run gh stack submit --auto to push branches and create PRs chained to the branch below.

What is the difference between gh stack and git rebase for stacked PRs

gh stack automates the full lifecycle including PR base linking, GitHub Stack grouping, and cascade rebases across all layers, whereas git rebase only moves commits locally without updating PR bases.

Does gh stack work with repositories that do not have stacked PRs enabled

No, gh stack submit requires the repository to have GitHub Stacked PRs enabled. If stacks are unavailable, the command exits with code 9 in non-interactive mode.

Why does gh stack view hang in an agent environment

gh stack view launches an interactive TUI by default. Always pass the --json flag to retrieve structured output suitable for parsing by automated agents.

How to resolve rebase conflicts when syncing a stacked branch chain

Run gh stack rebase, parse stderr for conflicted file paths, edit the conflict markers, stage resolved files with git add, then run gh stack rebase --continue. Use --abort to restore the pre-rebase state if resolution fails.