Agent skill

Gh Stack

by pmndrs in pmndrs/glyph

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

MITAuto-check passedDevelopment

Install Gh Stack

skills CLI
$ npx skills add pmndrs/glyph --skill gh-stack -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pmndrs/glyph gh-stack --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pmndrs/glyph.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/gh-stack .claude/skills/gh-stack && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gh-stack
GitHub stars
393
Token cost
~1.1k tokens
SKILL.md length
598 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

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

  • Dependent pull requests
  • SKILL.md covers Invariants, Inspect first, Common workflows and Failure handling
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Stack navigation

What it does

Gh Stack is an agent skill from pmndrs/glyph. Manage dependent branches and pull requests with the gh-stack GitHub CLI extension. Use for stacked diffs, dependent pull requests, branch chains, stack navigation, rebasing, submission, synchronization, or merging.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. It works with GitHub and Git. The repository describes itself as: ♠️ A typography engine for web graphics. The licence is MIT.

When your agent uses it

  • Dependent pull requests
  • Stack navigation
  • Synchronization

Example prompts

  • “/gh-stack”

What it can do on your machine

Read from SKILL.md and the folder at commit 51a1f34. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gh Stack loads about 1.1k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 598 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pmndrs/glyph at commit 51a1f34, republished under its MIT licence (© pmndrs). 598 words, ~1,120 tokens.

Download SKILL.mdSave it as .claude/skills/gh-stack/SKILL.md (or your agent's skills folder).
name
gh-stack
description
Manage dependent branches and pull requests with the gh-stack GitHub CLI extension. Use for stacked diffs, dependent pull requests, branch chains, stack navigation, rebasing, submission, synchronization, or merging.
metadata.author
github
metadata.github-path
skills/gh-stack
metadata.github-ref
refs/tags/v0.1.0
metadata.github-repo
https://github.com/github/gh-stack
metadata.github-tree-sha
c95c8b5b4dd850f3fef007b304428f5684f2fb87
metadata.version
0.0.9

gh-stack

A stack is a linear dependency chain rooted on the repository's remote default branch. Each branch maps to one PR whose base is the branch below it. Use gh stack for the whole lifecycle; ordinary push, PR creation, and PR merge commands do not preserve stack state.

Invariants

  • Run every command non-interactively. Pass branch, PR, stack, remote, and mode arguments explicitly.
  • Root a new stack on the current remote default branch. Inspect rather than guessing it.
  • Use deliberate git add and Conventional Commits. A branch may contain several commits, but one coherent review concern.
  • Use gh stack submit --auto; add --remote when the remote is not unambiguous.
  • Use gh stack view --json; the unflagged command opens a TUI.
  • Use gh stack merge with --yes; never substitute gh pr merge.
  • Foundational work belongs below dependent work. Modify the lowest branch that owns an invariant, then rebase upward.
  • Do not share a branch across stacks. Disambiguation failures are structural errors, not prompts to bypass the tool.
  • Never destroy or rewrite user work to recover a stack. Resolve conflicts deliberately or abort the stack operation.

The installed CLI is the authority for exact flags. Before an unfamiliar or destructive operation, run gh stack <command> --help rather than relying on copied command documentation.

Inspect first

git remote -v
git branch --show-current
git symbolic-ref --short refs/remotes/origin/HEAD
gh stack view --json

An existing checkout may already be tracked by a stack even when it contains only one feature branch. Preserve that state and submit through the stack instead of recreating the PR.

Common workflows

Commit and submit the current stack
git add <exact paths>
git commit -m "type(scope): coherent invariant"
gh stack submit --auto --remote origin
gh stack view --json

Verify the remote branch after submission:

git rev-list --left-right --count origin/<branch>...HEAD
Create or extend a stack
gh stack init --base <remote-default-branch> <bottom-branch>
gh stack add <next-branch>

init, add, and checkout require explicit positional arguments. Choose branch names relevant to the actual concern; the CLI uses them verbatim.

Change a lower layer
gh stack checkout <branch-or-pr>
# edit, verify, git add, git commit
gh stack rebase --upstack --remote origin
gh stack submit --auto --remote origin
gh stack view --json

On a rebase conflict, inspect and resolve the named files, stage the resolutions, then run gh stack rebase --continue. If the intended resolution is not clear, abort with gh stack rebase --abort and ask the user rather than guessing.

Show full SKILL.md (182 more words)Show less
Synchronize after merges
gh stack sync --remote origin
gh stack view --json

Use --prune only when removing merged local branches is in scope. A stack restructure or local tracking reset requires an explicit target and a read of gh stack unstack --help; --local preserves GitHub state.

Merge
gh stack merge <stack-or-pr-number> --yes --squash

Resolve the exact stack or PR number with view --json first. Stack merge is all-or-nothing where repository rules permit it; merge queues may enqueue the PRs instead.

Failure handling

  • Exit 2: the checkout is not in a stack; inspect before initializing or adopting one.
  • Exit 3: resolve the reported rebase conflicts, then continue or abort.
  • Exit 6: a branch belongs to multiple stacks; check out an unambiguous branch explicitly.
  • Exit 7: finish or abort the existing rebase before another stack operation.
  • Exit 8: another process owns the stack lock; confirm it is still running, then retry after it releases the lock.
  • Authentication, API, or repository-feature failures need their stated prerequisite fixed; do not fall back to ordinary GitHub PR commands.

Report the branch chain, PR URLs or numbers, and verification result. Do not dump raw JSON when a concise status answers the user's question.

© pmndrs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/gh-stack of pmndrs/glyph.

Open the folder on GitHubat commit 51a1f34

Compare with similar skills

Gh Stack next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gh Stack compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gh Stack this skillpmndrs/glyph393—~1.1kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated safety check: PassApache-2.0
PR Review State Fetchprisma/orm48k—~767Automated safety check: PassApache-2.0
Creating Description For Gh PRredis/jedis12k—~838Automated safety check: PassMIT

Similar skills

  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.

    48k GitHub stars~767 tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Generate a clear, concise GitHub PR title and description from the diff between two local git branches, and save it to prDescription.md in the repo root.

    12k GitHub stars~838 tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a pull request for the current branch using the repo's template, a work item ID in the title and a description filled in from the actual diff.

    61k GitHub stars~824 tokensUpdated today
    DevelopmentAuto-check passed

More from pmndrs/glyph

All 8 skills in this repo
  • Codemod

    pmndrs/glyph

    Author, archive, apply, and verify TypeScript codemods with ts-morph for APIs that have reached the remote default branch or external users.

    393 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Create, migrate, inspect, query, validate, or maintain Open Knowledge Format v0.2 bundles made from linked Markdown concepts with YAML provenance.

    393 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Tsl

    pmndrs/glyph

    Implement, migrate, review, debug, or verify Three.js Shading Language (TSL) materials, node graphs, WebGPU compute work, and post-processing.

    393 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Diataxis Docs

    pmndrs/glyph

    Design, classify, write, audit, or restructure technical documentation with the Diátaxis framework.

    393 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Audit and improve repository code milestone by milestone for correctness, clarity, local reasoning, DRY design, explicit state modeling, panic resistance, and trustworthy TypeScript boundaries.

    393 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Evidence First

    pmndrs/glyph

    Shape human-facing engineering communication—including chat updates and final answers, reports, reviews, handoffs, debugging or benchmark summaries, PR and issue prose, READMEs, and technical…

    393 GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Gh Stack

What does Gh Stack do?

Manage dependent branches and pull requests with the gh-stack GitHub CLI extension. Gh Stack is an agent skill from pmndrs/glyph. Manage dependent branches and pull requests with the gh-stack GitHub CLI extension.

When should I use Gh Stack?

Gh Stack fits situations like: dependent pull requests; stack navigation; synchronization.

How do I install Gh Stack in Claude Code?

Run `npx skills add pmndrs/glyph --skill gh-stack -a claude-code`. Or copy the skill folder (.agents/skills/gh-stack in pmndrs/glyph) into .claude/skills/gh-stack in your project. Claude Code loads it when a task matches its description.

How do I install Gh Stack in Codex?

Run `npx skills add pmndrs/glyph --skill gh-stack -a codex`. Or copy the skill folder (.agents/skills/gh-stack in pmndrs/glyph) into .agents/skills/gh-stack in your project. Codex loads it when a task matches its description.

Can I use Gh Stack in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pmndrs/glyph --skill gh-stack -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gh-stack, .gemini/skills/gh-stack, .github/skills/gh-stack and .opencode/skills/gh-stack in your project.

What does Gh Stack need to run?

SKILL.md names no scripts, command-line tools or credentials: Gh Stack is instructions for the agent only.

Does Gh Stack access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gh Stack safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gh Stack use?

Gh Stack is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gh Stack use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gh Stack?

Skills that share tags, products or a category with Gh Stack: Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Create Pull Request (cline/cline, 70k stars), Pull Request Title and Body Writer (openinterpreter/openinterpreter, 69k stars) and PR Review State Fetch (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gh Stack?

pmndrs (a GitHub organization) maintains it in pmndrs/glyph, which has 393 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 8, 2026.

Source: pmndrs/glyph on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.