gh-stack
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.
Skill by github
Chalk Labs
Need help deploying gh-stack?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sreejithraman-gh-stack
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
gh-stack- Description
- Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack. Use for stack creation, viewing, edits, push, submit, sync, rebase, merge, or checkout; when asked to split or isolate work for review; whenever a user mentions a stack, branch layers, dependent PRs, or gh stack; or when a stack is checked out.
- License
- MIT
- Metadata
- author: github · version: 0.2.0
- Instructions
- 195 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- commands.md · references/
- stack-design.md · references/
- troubleshooting.md · references/
SKILL.md (first lines)
# gh-stack `gh stack` manages linear chains of branches and PRs. Stacks print trunk-first: `(main) <- auth <- api <- frontend`. Left is bottom and merges first; right is top. `up` moves away from trunk; `down` moves toward it. Put dependencies below their callers and use separate stacks for independent work. ## Before acting - Plan new layers with [stack design](references/stack-design.md) before writing code. For an existing stack, inspect `gh stack view --json` and edit the layer that owns the concern; use `git log --all -- <path>` when ownership is unclear. - Check `gh stack --version` and `gh stack <command> --help` before relying on newer capabilities. `gh stack help <command>` prints top-level help instead. For installation/configuration, use [setup](references/commands.md#setup). Before a new stack's first `init`, check that setup for the `rerere` prompt; explicit branch names alone do not suppress it. - Before checkout or history-changing work, follow [Preserve local files](../pr/references/preserve-local-files.md) in every affected worktree. Retain verified backups through conflicts and recovery. - With multiple remotes, `push`, `submit`, `sync`, `rebase`, and `link` need `--remote <name>` unless `remote.pushDefault` selects it. `checkout` and `trunk` have no `--remote` flag and require that config. - Register every scoped PR taken over, created, or pushed through [T3 thread registration](../pr/SKILL.md#thread-registration); a CLI operation does not register its layers with the thread. ### Worktree capabilities Shared catalogs, foreign-owner navigation, and owner-aware recovery require a supporting extension. Check the installed version and relevant help before assuming those behaviors. If navigation help lacks `--print-path`, use Git's worktree inventory to locate an existing owner and work there; do not invent that flag, force another checkout, mix old/new writers, or upgrade outside scope. With supported path mode, navigation or explicit-target `checkout --print-path` returns an owner's path without taking its checkout. Unoccupied targets are checked out here first. Use stdout only after exit 0, quote the path, and never `eval` it. See [navigation](references/commands.md#navigation) for the guarded shell helper and [worktree recovery](references/troubleshooting.md#driving-stacks-from-another-tool-or-worktree) for migration and ownership limits. ## Common calls Give explicit arguments and flags even under a PTY: bare commands can open a TUI. Use names from the task; branch names are used verbatim, including slashes. | Task | Non-interactive call | | --- | --- | | Inspect state | `gh stack view --json` | | Create layers bottom to top | `gh stack init <branch>...` | | Add the next layer from the top | `gh stack add <branch>` | | Select a layer or stack | `gh stack checkout <target>` | | Navigate | `gh stack up`, `down`, `top`, `bottom`, or `trunk` | | Publish PR layers | `gh stack submit --auto` | | Update branches without creating PRs | `gh stack push` | | Replay upper layers after a lower-layer edit | `gh stack rebase --upstack` | | Synchronize | `gh stack sync` | | Merge a scoped set | `gh stack merge <target> --yes` | Stage specific files and commit the owning layer before moving up. After an edit below the top, rebase upstack, return to the top, then push. Read the affected [command behavior](references/commands.md) for preconditions and partial effects. `submit --auto` creates drafts; `--open` marks new and existing PRs ready for review. Titles/bodies are generated; use `gh pr edit` for custom text. `sync` fetches, reconciles, rebases, pushes, and refreshes PR state; pruning needs `--prune` when non-interactive. A diverged stack can return exit 0 with `Sync aborted`: verify the resulting state instead of declaring synchronization. A merge target scopes the operation: a PR includes every unmerged PR below it; a stack number includes the whole unmerged stack. Bare numbers resolve as stack numbers first; confirm the selected set when IDs overlap. The selected set is all-or-nothing for direct merging. A base merge queue chooses the method despite method flags and can land separate groups. Use `gh stack merge`, following the caller's merge authorization. See [merge behavior](references/commands.md#merge). Other public commands: `link`, `unstack` (see command behavior); `alias`, `feedback` (see installed help). `switch` and the `modify` editor are menu-only; use explicit checkout/navigation, or the documented recovery flags for an existing interrupted operation. For non-interactive restructuring, read [restructuring](references/troubleshooting.md#restructuring-a-stack). ## State and failures Parse successful `view --json` stdout; status messages are on stderr. `view --short` is human-readable. The [state schema](references/commands.md#view) and [exit codes](references/commands.md#exit-codes) live with command behavior. On exit 3, follow [conflict recovery](references/troubleshooting.md#rebase-conflicts-exit-3). A failed rebase pauses; sync attempts rollback. Inspect whether restoration completed before restarting anything. Resolve/stage only in the diagnostic's owner worktree; a later conflict may name another owner. Supported recovery flags use recorded owners. Keep retained files accounted for after success or recovery. Lock and interrupted-modify diagnostics also require their specific [recovery procedure](references/troubleshooting.md), rather than bypassing state.
From sreejithraman/SreeStack, MIT.
More from sreejithraman/SreeStack
- 0.592score
agent-login
sreejithraman
Use when signing into applications, setting up or diagnosing agent credential access, or supplying and managing approved credentials for authentication.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
app-intents
sreejithraman
App Intents work on Apple platforms.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
app-store-connect
sreejithraman
Use when asked to check App Store Connect builds, investigate TestFlight crashes or feedback, distribute betas, prepare or submit a release, fix App Review…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
engineering-principles
sreejithraman
Guide engineering design and implementation decisions.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
architect
sreejithraman
Sketch caller usage, types, signatures, and module structure, then stay in the loop while implementation fills in.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
animate
sreejithraman
Design, implement, and tune web, SwiftUI, and UIKit interface motion.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
correct
sreejithraman
Investigate and prevent recurring agent mistakes in a repository.
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
goal-swarm
sreejithraman
Pursue an explicitly requested goal or swarm through its finish line.
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
arena
sreejithraman
Produce independent candidates for one artifact, pick a base, and graft the strongest parts into one verified result.
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
gauntlet-loop
sreejithraman
Turn a goal into a short, paste-ready prompt for a builder-and-critic loop against a real quality bar.
SkillAFreshness: A★ 1Claude Code +9 - 0.579score
change-safety
sreejithraman
Assess a code change's blast radius beyond its diff.
SkillAFreshness: A★ 1Claude Code +9 - 0.579score
code-why
sreejithraman
Investigate code history to explain a design decision's rationale, when and why a regression was introduced, or whether an old constraint still applies.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 13, 2026 (19 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 0.2.0
- License
- MIT
- Repository
- github.com/sreejithraman/SreeStack
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.641score
gh-stack
github
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.
SkillAFreshness: A★ 13Claude Code +9 - 0.377score
gh-stack
github
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.
SkillAFreshness: A★ 9Claude Code +9 - 0.358score
gh-stack
github
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.
SkillAFreshness: A★ 2Claude Code +9 - 0.352score
gh-stack
github
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.
SkillAFreshness: A★ 1Claude Code +9 - 0.342score
gh-stack
pascalandy
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.
SkillAFreshness: AClaude Code +9
More from github
- 0.860score
GitHub
githubOfficial
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
ConnectorAFreshness: ARemoteLocal★ 33.9KClaude Code +5 - 0.749score
AGENTS.md · github/spec-kit
github
AGENTS.md from github/spec-kit: 77 lines covering About Spec Kit and Specify, Adding or Updating CLI Commands, Adding or Updating MCP Commands, Adding or…
TemplateAFreshness: A★ 142.7KCodex +5 - 0.641score
gh-stack
github
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.
SkillAFreshness: A★ 13Claude Code +9 - 0.523score
gh-stack
github
Create, inspect, or update stacks of dependent branches and PRs with the gh-stack CLI extension.
SkillBFreshness: BClaude Code +9 - 0.510score
gh-stack
github
Manage stacked branches and pull requests with the gh-stack GitHub CLI extension.
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get gh-stack running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
gh-stack skill. Agent Mart. https://agentmart.dev/skills/sreejithraman-gh-stack (last updated 2026-10-24)