[skills] add gh-stack skill for stacked PRs - #12255
Merged
Merged
Conversation
Adds the `gh-stack` agent skill from github/gh-stack v0.0.8 so agents
(and humans) have guidance for creating and maintaining stacks of
dependent pull requests.
Requires the GitHub CLI plus the `github/gh-stack` extension:
gh extension install github/gh-stack
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9482ddb9-95d2-49ba-84ab-1ae263e31f9e
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new agent skill document for gh-stack to this repo’s .github/skills/ collection, documenting how to manage stacked PR workflows non-interactively using the github/gh-stack GitHub CLI extension.
Changes:
- Added
.github/skills/gh-stack/SKILL.md(v0.0.8) describing stacked-PR concepts, command reference, and agent-safe non-interactive usage patterns.
Member
|
@copilot Please mirror this PR to |
Contributor
|
@dalexsoto I've opened a new pull request, #12256, to work on those changes. Once the pull request is ready, I'll request review from you. |
rolfbjarne
approved these changes
Jul 29, 2026
dalexsoto
added a commit
to dotnet/macios
that referenced
this pull request
Jul 29, 2026
Mirrors `dotnet/android#12255`, adding the upstream `gh-stack` v0.0.8 agent skill to macios. ## Changes - Added `.github/skills/gh-stack/SKILL.md`. - Documented stack creation, navigation, synchronization, rebasing, and recovery. - Captured non-interactive agent requirements, including explicit branch arguments, `submit --auto`, and `view --json`. ## Example ```bash gh stack submit --auto gh stack view --json ``` Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dalexsoto <204671+dalexsoto@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
gh-stackagent skill (v0.0.8) to.github/skills/gh-stack/SKILL.md, alongside our existing skills (ci-status,tests,android-reviewer, etc.).The skill teaches agents how to build and maintain stacked PRs: a chain of branches where each branch is based on the one below it, so each PR only shows the diff for its own layer.
What you need to install
This skill is just documentation — it does nothing on its own. Two things are required:
1. GitHub CLI (
gh) v2.0+, authenticatedwinget install --id GitHub.cli(Windows),brew install gh(macOS), or see https://github.com/cli/cli#installationgh auth login2. The
github/gh-stackextensiongh extension listandgh stack --help3. Recommended git config (avoids interactive prompts that hang agents)
The skill itself was installed with the GitHub CLI's skill support:
(Installed into
.agents/skills/by default; moved to.github/skills/to match this repo's layout. Docs: https://cli.github.com/manual/gh_skill and the Agent Skills spec at https://agentskills.io/specification.)Example commands
Create a stack from scratch:
Inspect and navigate:
Keep it healthy after a merge or an upstream
mainupdate:Tear down:
Agent-relevant gotchas captured in the skill: always pass branch names positionally, always use
--autowithsubmitand--jsonwithview, and use--remote <name>when multiple remotes exist — otherwise the commands drop into a TUI or prompt and hang.Note
Skills are not verified by GitHub, so
SKILL.mdshould get the usual review pass before merge. Content here is unmodified fromgithub/gh-stack@v0.0.8other than the file's location.