Official agent skill

Gh Stack

by dotnet in dotnet/macios

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

OfficialCustom licenceAuto-check passedDevelopment

Install Gh Stack

skills CLI
$ npx skills add dotnet/macios --skill gh-stack -a claude-code

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

GitHub CLI
$ gh skill install dotnet/macios 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/dotnet/macios.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/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
2.9k
Used in
2 other repos
Token cost
~10k tokens
SKILL.md length
4,488 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Custom licence

At a glance

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

  • Works in 9 steps: Always supply branch names as positional… → Always use --auto with gh stack submit… → Always use --json with gh stack view.… → …
  • The user wants to create
  • SKILL.md covers When to use this skill, Prerequisites, Agent rules and Thinking about stack structure, plus 3 more sections
  • Calls gh, git and jq; reaches github.com

What it does

Gh Stack is an agent skill from dotnet/macios, published by the product's own GitHub organization. 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.

Its SKILL.md is about 10k 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, C# and .NET. The repository describes itself as: .NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C.

When your agent uses it

  • The user wants to create
  • View stacks of dependent PRs
  • Tasks involving stacked diffs
  • Dependent pull requests

Example prompts

  • “/gh-stack”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Always supply branch names as positional arguments to init, add, and checkout. Running these commands without arguments triggers…
  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…
  4. Use --remote when multiple remotes are configured, or pre-configure git config remote.pushDefault origin. Without this, push, submit…
  5. Avoid branches shared across multiple stacks. If a branch belongs to multiple stacks, commands exit with code 6. Check out a non-shared…
  6. Plan your stack layers by dependency order before writing code. Foundational changes (models, APIs, shared utilities) go in lower…
  7. Use standard git add and git commit for staging and committing. This gives you full control over which changes go into each branch. The…
  8. Navigate down the stack when you need to change a lower layer. If you're working on a frontend branch and realize you need API changes…
  9. Use gh stack link for external tool workflows. When branches are managed by an external tool (jj, Sapling, etc.), use gh stack link…

What it can do on your machine

Read from SKILL.md and the folder at commit 354c2a6. 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

    Shell commands in SKILL.md call:

    • gh
    • git
    • jq

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    Also links to:

    • cli.github.com

    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 10k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 4,488 words of instructions outside code blocks.

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

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 4,488 words (~10,010 tokens).

“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…”

— opening of SKILL.md by dotnet, Custom licence
name
gh-stack
metadata.author
github
metadata.github-path
skills/gh-stack
metadata.github-ref
refs/tags/v0.0.8
metadata.github-repo
https://github.com/github/gh-stack
metadata.github-tree-sha
26320e8be554b0cc1d122c353e8897f0c69739cd
metadata.version
0.0.8

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .github/skills/gh-stack of dotnet/macios.

Open the folder on GitHubat commit 354c2a6

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in dotnet/macios, which our catalogue first saw on October 7, 2026.

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 skilldotnet/macios2.9k2 repos~10kAutomated safety check: PassCustom licence
Code Reviewjonathanpeppers/dotnes780—~2.1kAutomated safety check: PassMIT
MAUI PR Performance Analysisdotnet/maui23k—~2.4kAutomated safety check: PassMIT
Release Roslynatordotnet/roslynator3.5k—~1kAutomated safety check: PassCustom licence
Maintain DisCatSharpAiko-IT-Systems/DisCatSharp140—~1.2kAutomated safety check: PassMIT
Find Reviewable MAUI PRsdotnet/maui23k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Code Review

    jonathanpeppers/dotnes

    Review dotnes pull requests against established repository rules.

    780 GitHub stars~2.1k tokensUpdated 14 days ago
    DevelopmentAuto-check passed
  • Official

    Interprets pinned managed benchmark evidence for a dotnet/maui pull request and writes a narrative for the performance review workflow, without running or publishing anything.

    23k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Release Roslynator

    dotnet/roslynator

    Official

    A skill your agent uses when shipping a roslynator release, rolling CHANGELOG.md [Unreleased], updating the VS Code extension changelog, creating a GitHub v release, or optionally tagging cli-v.

    3.5k GitHub stars~1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Maintain DisCatSharp

    Aiko-IT-Systems/DisCatSharp

    Guides changes to the DisCatSharp C# Discord library: tracing a payload field through parsing, serialization and caches, then validating across target frameworks.

    140 GitHub stars~1.2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Official

    Lists open pull requests in dotnet/maui and dotnet/docs-maui that are worth reviewing next, ranked by priority labels, milestone and partner or community origin.

    23k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Deep code-only review of a pull request or candidate patch for correctness, safety and .NET MAUI conventions, judging the code before reading the PR description.

    15k GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from dotnet/macios

All 9 skills in this repo
  • Code Review

    dotnet/macios

    Official

    Review dotnet/macios PRs against established rules. An agent skill from dotnet/macios.

    2.9k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Official

    Investigate and triage CI failures for dotnet/macios from Azure DevOps build URLs.

    2.9k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Official

    Update dotnet/macios to a new Xcode beta and validate it end-to-end.

    2.9k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Official

    Investigate and fix flaky/random CI test failures in dotnet/macios.

    2.9k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Official

    Create C bindings for Apple frameworks in dotnet/macios. An agent skill from dotnet/macios.

    2.9k GitHub stars~7.3k tokensUpdated today
    Auto-check passed
  • Official

    Post-mortem analysis of CI failures across recent PRs in dotnet/macios.

    2.9k GitHub stars~7.8k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Gh Stack

What does Gh Stack do?

Manage stacked branches and pull requests with the gh-stack GitHub CLI extension. Gh Stack is an agent skill from dotnet/macios, published by the product's own GitHub organization. Manage stacked branches and pull requests with the gh-stack GitHub CLI extension.

When should I use Gh Stack?

Gh Stack fits situations like: the user wants to create; view stacks of dependent PRs; tasks involving stacked diffs; dependent pull requests.

How do I install Gh Stack in Claude Code?

Run `npx skills add dotnet/macios --skill gh-stack -a claude-code`. Or copy the skill folder (.github/skills/gh-stack in dotnet/macios) 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 dotnet/macios --skill gh-stack -a codex`. Or copy the skill folder (.github/skills/gh-stack in dotnet/macios) 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 dotnet/macios --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?

Going by SKILL.md and its folder, Gh Stack needs the command-line tools its instructions call (gh, git and jq).

Does Gh Stack access the network?

SKILL.md names 2 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: cli.github.com. 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 has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Gh Stack use?

About 10k tokens (SKILL.md is roughly 40k 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: Code Review (jonathanpeppers/dotnes, 780 stars), MAUI PR Performance Analysis (dotnet/maui, 23k stars), Release Roslynator (dotnet/roslynator, 3.5k stars) and Maintain DisCatSharp (Aiko-IT-Systems/DisCatSharp, 140 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gh Stack?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/macios, which has 2,906 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

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