---
schema_version: 1
route: /t/gh.md
tool: "gh"
---

# sincecutoff.com /t/gh — GitHub CLI

- name: GitHub CLI
- kind: cli
- children: gh-stack
- homepage: <https://cli.github.com>

Changes to the tools coding agents drive, since a model's training cutoff, each linked to its first-party source. Check installed versions and limitations before acting; a cutoff date does not establish what a model knows.
Original editorial content: [Apache 2.0](https://sincecutoff.com/v1/data-license.txt), by [0xPatrick](https://0xpatrick.dev). Preserve applicable license and [NOTICE](https://sincecutoff.com/notice.txt) attribution when redistributing. Third-party source text and examples retain their own rights. [License scope and attribution](https://sincecutoff.com/v1/license.json).
To stay current, read the changes feed: [`/v1/changes.md?tool=gh`](https://sincecutoff.com/v1/changes.md?tool=gh) (or `.json`), adding `since=YYYY-MM-DD` for your training cutoff. Entries for registered children are included; the registry itself is `/v1/tools.json`. How to page and save your place: [llms.txt](https://sincecutoff.com/llms.txt).

### gh-stack rebase, sync, and modify operate across worktrees (2026-10-02)
- slug: gh-stack-rebase-sync-and-modify-operate-across-worktrees-14e6b34579ad
- tools: gh-stack
- score: 0.98

How to use it:

When a stack’s branches are spread across worktrees, use `gh stack rebase`, `gh stack sync`, or `gh stack modify`; gh-stack runs each change in the worktree owning its branch. If a rebase or modify pauses for conflicts, resolve and stage them in the reported checkout, then continue or abort from any worktree.

Examples:

```
gh stack rebase
```

```
gh stack sync
```

```
gh stack modify
```

- why_it_matters: Rebase, synchronize, or modify a stack whose branches are checked out in different worktrees.
- before: Gather the whole stack into one directory before running these commands.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.2.0>, <https://github.com/github/gh-stack/blob/v0.2.0/README.md>
- gotchas: "Version: v0.2.0"; "Requires gh extension install github/gh-stack"; "gh stack rebase --continue: Continue the rebase after resolving conflicts; stage resolutions with `git add` first."; "gh stack rebase --abort: Abort the rebase and restore branches to their pre-rebase state."; "gh stack modify --continue: Continue modify after resolving conflicts."; "gh stack modify --abort: Abort modify and restore the stack to its pre-modify state."; "Prerequisite: Git 2.36+ and GitHub CLI (`gh`) v2.0+ are required."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`."; "Prerequisite: `modify` requires an active local stack, a clean working tree, no rebase in progress, no queued PR, and linear commit history."; "Requires Git 2.36+."; "gh-stack never creates, removes, or auto-stashes worktrees."

### gh GraphQL securityAdvisories adds severity and withdrawal filters (2026-10-02)
- slug: gh-graphql-securityadvisories-adds-severity-and-withdrawal-filters-9f8f9bdc90c8
- score: 0.98

How to use it:

For severity triage or a withdrawn-advisory audit, call `securityAdvisories` with the relevant `severities` or `isWithdrawn` filter and select the advisory fields you need.

Examples:

```
gh api graphql -F 'severities[]=HIGH' -f query='query($severities: [SecurityAdvisorySeverity!]) { securityAdvisories(severities: $severities, first: 100) { nodes { ghsaId severity summary } } }'
```

```
gh api graphql -F isWithdrawn=true -f query='query($isWithdrawn: Boolean) { securityAdvisories(isWithdrawn: $isWithdrawn, first: 100) { nodes { ghsaId severity summary withdrawnAt } } }'
```

- why_it_matters: Narrow advisory results for a severity-based triage feed or withdrawn-advisory audit.
- before: The release note says integrations previously downloaded results and filtered them client-side.
- sources: <https://github.blog/changelog/2026-10-02-new-fields-for-securityadvisory-graphql-api>, <https://cli.github.com/manual/gh_api>, <https://docs.github.com/en/graphql/reference/security-advisories>, <https://github.blog/changelog/2026-10-02-new-fields-for-securityadvisory-graphql-api/>
- gotchas: "severities: List of advisory severities to filter by; values: `CRITICAL`, `HIGH`, `LOW`, `MODERATE`, `UNKNOWN`."; "isWithdrawn: `true` returns only withdrawn advisories; `false` excludes withdrawn advisories."; "gh api graphql (required): `gh api` makes an authenticated API request; `graphql` selects GitHub API v4."; "-F, --field <key=value>: Adds a typed parameter; for GraphQL, fields other than `query` and `operationName` are variables. Supports array fields with `key[]=value`."; "-f, --raw-field <key=value> (required): Adds a string parameter; used here to pass the GraphQL query."; "Prerequisite: `gh api` makes authenticated requests; this task needs an authenticated GitHub CLI session."; "The new filters work alongside existing filters, including classification, identifier, EPSS, and published or updated since."; "The changes are additive and read-only; existing queries keep working."

### gh programmatic pull request merging with the async merge API (2026-10-01)
- slug: gh-programmatic-pull-request-merging-with-the-async-merge-api-6aa0f446ea95
- score: 0.96

How to use it:

For individual or stacked PRs, submit a merge request with `PUT`; poll the result with `GET` using the returned UUID. Set `merge_action` for direct or queued merges, and set `bypass_rules` only when authorized.

Examples:

```
curl -L -X PUT -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <TOKEN>" -H "X-GitHub-Api-Version: 2026-03-10" "https://api.github.com/repos/<OWNER>/<REPO>/pulls/<PULL_NUMBER>/merge-async" -d '{"merge_action":"default"}'
```

```
curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer <TOKEN>" -H "X-GitHub-Api-Version: 2026-03-10" "https://api.github.com/repos/<OWNER>/<REPO>/pulls/<PULL_NUMBER>/merge-async/<UUID>"
```

- why_it_matters: Programmatically merge individual or stacked pull requests, add pull requests to a merge queue, or merge pull requests directly in a busy repository.
- before: Use the synchronous REST endpoint or GraphQL mutations to merge pull requests.
- sources: <https://github.blog/changelog/2026-10-01-github-async-merge-api-generally-available>, <https://docs.github.com/en/rest/pulls/pulls?apiVersion=2026-03-10#merge-a-pull-request-asynchronously>, <https://docs.github.com/en/rest/pulls/pulls?apiVersion=2026-03-10#get-the-result-of-an-asynchronous-merge>
- gotchas: "Availability: generally available"; "owner (required): Repository account owner."; "repo (required): Repository name without `.git`."; "pull_number (required): Pull request number."; "merge_action: `default` uses a queue if configured or merges directly; `direct_merge` skips the queue; `merge_queue` adds to a queue. Allowed values are mutually exclusive; omission defaults to `default`."; "merge_method: Direct merge method: `merge`, `squash`, or `rebase`; only for direct merges. Values are mutually exclusive."; "commit_title: Automatic commit title; only for direct merges."; "commit_message: Extra detail in automatic commit message; only for direct merges."; "sha: Expected PR head SHA; if omitted, current head is used and a later push before execution cancels the merge."; "bypass_rules: Bypass repository rules the authenticated actor may bypass; defaults to `false`."; "uuid (required): UUID returned by the merge request; identifies the result to fetch."; "Prerequisite: Fine-grained tokens must have `Contents` repository permission (write). Supported token types include GitHub App user and installation tokens, and fine-grained personal access tokens."; "Prerequisite: The async result endpoint also requires `Contents` repository permission (write) for fine-grained tokens."; "Bypassing rules requires permission."

### gh stack add offers to initialize a stack (2026-09-02)
- slug: gh-stack-add-offers-to-initialize-a-stack-bee1403f6bf5
- tools: gh-stack
- score: 0.94

How to use it:

When `gh stack add` runs interactively on a branch outside a stack, accept its offer to initialize a stack; the supplied or generated branch name becomes the first layer.

Examples:

```
gh stack add [branch]
```

- why_it_matters: Add the current branch as the first layer when working from a branch that is not part of a stack.
- before: Previously, running `add` from a branch outside a stack failed.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.1.1>, <https://github.com/github/gh-stack>, <https://github.com/github/docs/blob/main/content/pull-requests/reference/stacked-prs-cli-commands.md>
- gotchas: "Version: v0.1.1"; "branch (optional positional argument): Branch name; when initializing from a non-stack branch, the supplied or auto-generated name becomes the first layer."; "Prerequisite: The documented initialization offer is interactive."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`. Requires GitHub CLI 2.0+ and Git 2.36+; authenticate with `gh auth login` if needed."

### gh stack checkout resolves active remote stacks (2026-09-02)
- slug: gh-stack-checkout-resolves-active-remote-stacks-039ba6fea416
- tools: gh-stack
- score: 0.96

How to use it:

If the current branch or requested branch is not tracked locally but belongs to an active remote stack, run `gh stack checkout` or `gh stack checkout <branch>` and accept the prompt to check it out. The command imports the matching stack through the PR checkout flow; fully merged stacks are omitted. ([v0.1.1 release](https://github.com/github/gh-stack/releases/tag/v0.1.1))

Examples:

```
gh stack checkout
```

```
gh stack checkout <branch>
```

- why_it_matters: Check out a stack when the current branch or a requested branch belongs to an active GitHub stack but is not in a local stack or tracked locally.
- before: For a branch not tracked locally or not part of a local stack, use the existing checkout behavior if remote resolution does not offer a match.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.1.1>, <https://github.com/github/gh-stack/blob/v0.1.1/README.md>
- gotchas: "Version: v0.1.1"; "[<branch>]: Optional branch name to check out; when supplied and not tracked locally, the command searches remote stacks for a match. With no argument, it checks whether the current branch belongs to an active remote stack. ([gh-stack README](https://github.com/github/gh-stack/blob/v0.1.1/README.md))"; "Prerequisite: Install the GitHub CLI extension with `gh extension install github/gh-stack`. ([v0.1.1 release](https://github.com/github/gh-stack/releases/tag/v0.1.1))"; "Prerequisite: The command’s no-argument remote detection is offered in an interactive terminal. ([gh-stack README](https://github.com/github/gh-stack/blob/v0.1.1/README.md))"; "Resolution is best-effort: network failures, no or multiple matches, or a declined prompt fall through to existing behavior."; "Fully merged stacks are ignored."

### gh issue develop checks out a linked branch in a worktree (2026-09-01)
- slug: gh-issue-develop-checks-out-a-linked-branch-in-a-worktree-59f98336f61d
- score: 0.97

How to use it:

When you need to start issue work in a separate Git working copy, run `gh issue develop` with `--checkout` and `--worktree` to create and check out the linked branch there. The documented example uses issue 123 and `/path/to/wt-feature`.

Examples:

```
gh issue develop 123 --checkout --worktree /path/to/wt-feature
```

- why_it_matters: Start work on an issue in a separate Git working copy while preserving the current working copy.
- sources: <https://github.com/cli/cli/releases/tag/v2.99.0>, <https://cli.github.com/manual/gh_issue_develop>, <https://cli.github.com/manual/index>
- gotchas: "Version: v2.99.0"; "<number> (required): Issue number or URL whose linked branch to manage."; "--checkout (required): Check out the branch after creating it."; "--worktree <path> (required): Check out the branch into a worktree at the given path."; "Prerequisite: Authenticate `gh` with `gh auth login` or provide a supported authentication token through an environment variable."; "The new worktree leaves the current working copy unchanged."

### gh issue, pr, and comment commands attach media with --attach (2026-09-01)
- slug: gh-issue-pr-and-comment-commands-attach-media-with-attach-ab2c523691d4
- score: 0.99

How to use it:

When creating or editing an issue or pull request, or adding a comment, use repeatable `--attach <file>` to upload local images or videos and add them to the body. Include optional image alt text after `#`; an existing body reference to the file is rewritten to the uploaded asset URL, otherwise the attachment is appended.

Examples:

```
gh issue create --attach './repro.png#The error state'
```

```
gh issue edit <issue-number> --attach ./walkthrough.mp4
```

```
gh pr comment <number|url|branch> --attach ./result.mp4
```

- why_it_matters: Attach local images or videos while creating or editing an issue or pull request, or adding a comment.
- sources: <https://github.com/cli/cli/releases/tag/v2.99.0>, <https://cli.github.com/manual/gh_issue_create>, <https://cli.github.com/manual/gh_issue_edit>, <https://cli.github.com/manual/gh_pr_comment>
- gotchas: "Version: v2.99.0"; "Availability: Attachments are available on GitHub.com and GitHub Enterprise Cloud."; "--attach <file>: Image or video file to attach, optionally as `<file>#<image alt text>`; repeat the flag for multiple files. Up to 50 files per command."; "issue number or URL (required): Selects the issue to edit or comment on."; "number, URL, or branch: Selects the pull request to comment on; without one, the current branch's pull request is used."; "<file>#<image alt text>: Optional image alt text follows `#`; without it, the filename is used. Video has no alt text."; "Prerequisite: Attachments are supported on GitHub.com and GitHub Enterprise Cloud, per the v2.99.0 release note."; "Prerequisite: The local file must be an attachable image or video; the command documentation limits attachments to images and videos."; "The repeatable `--attach` flag uploads local images and videos."

### gh pr checkout adds --worktree PATH (2026-08-20)
- slug: gh-pr-checkout-adds-worktree-path-bbf09cb8e380
- score: 0.98

How to use it:

When checking out a pull request into a separate Git worktree, use `gh pr checkout` with `--worktree <path>`.

Examples:

```
gh pr checkout 12 --worktree ../wt-feature
```

```
gh pr checkout <number|url|branch> --worktree <path>
```

- why_it_matters: Check out a pull request into a separate Git worktree while working on a repository.
- sources: <https://github.com/cli/cli/releases/tag/v2.98.0>, <https://cli.github.com/manual/gh_pr_checkout>, <https://cli.github.com/manual/index>
- gotchas: "Version: v2.98.0"; "<number|url|branch>: Pull request number, URL, or branch to check out. If omitted, the manual shows interactive selection."; "--worktree <path> (required): Check out the pull request into a worktree at the given path."; "Prerequisite: Use GitHub CLI v2.98.0 or later; the flag was introduced in v2.98.0."; "Prerequisite: Authenticate with `gh auth login` or provide `GITHUB_TOKEN`."

### gh search issues adds semantic and hybrid search types (2026-08-20)
- slug: gh-search-issues-adds-semantic-and-hybrid-search-types-1c05eef7ea2f
- score: 0.94

How to use it:

When searching issues by meaning, use `--search-type semantic`; to combine keyword and semantic ranking, use `--search-type hybrid`.

Examples:

```
gh search issues "<natural-language query>" --search-type semantic
```

```
gh search issues "<query>" --search-type hybrid
```

- why_it_matters: Search issues from a repository or project using semantic or hybrid matching.
- sources: <https://github.com/cli/cli/releases/tag/v2.98.0>, <https://cli.github.com/manual/gh_search_issues>
- gotchas: "Version: v2.98.0"; "--search-type <string>: Selects issue search type: `lexical`, `semantic`, or `hybrid`; defaults to `lexical`. Semantic and hybrid results are relevance-ranked, return one page, and cannot be used with `--sort` or `--order`."; "<query>: Search query; may use GitHub search syntax. Quote a multi-word phrase as in the documented examples."; "Prerequisite: Semantic and hybrid search are unavailable on GitHub Enterprise Server."

### gh project item-edit addresses fields and single-select options by name (2026-07-31)
- slug: gh-project-item-edit-addresses-fields-and-single-select-options-by-name-0295132d3485
- score: 0.98

How to use it:

When editing a GitHub project item by field and single-select option name, run `gh project item-edit` with the project number, owner, item URL, field name, and option name.

Examples:

```
gh project item-edit <project-number> --owner <owner> --url <issue-or-pull-request-url> --field "Status" --value "In Progress"
```

- why_it_matters: Edit a GitHub project item by setting a field using its name.
- sources: <https://github.com/cli/cli/releases/tag/v2.97.0>, <https://cli.github.com/manual/gh_project_item-edit>, <https://cli.github.com/manual/gh_project>
- gotchas: "Version: v2.97.0"; "<project-number> (required): Project number to edit."; "--owner <owner> (required): Project owner's login; use `@me` for the current user."; "--url <issue-or-pull-request-url> (required): URL of the issue or pull request whose project item to edit."; "--field <string> (required): Name of the field to update."; "--value <field-value> (required): Value to set for the named field; for a single-select field, use the option name."; "Prerequisite: The GitHub CLI token needs the `project` scope. Check with `gh auth status`; add it with `gh auth refresh -s project`."

### gh project item-list adds named field columns (2026-07-31)
- slug: gh-project-item-list-adds-named-field-columns-9bb2b091da03
- score: 0.97

How to use it:

When listing project items with selected project fields as columns, run `gh project item-list` with the project number, owner, and one `--field` per field name.

Examples:

```
gh project item-list 1 --owner "@me" --field "Status" --field "Priority"
```

- why_it_matters: List project items with selected project fields displayed as columns.
- sources: <https://github.com/cli/cli/releases/tag/v2.97.0>, <https://github.com/cli/cli/blob/v2.97.0/pkg/cmd/project/item-list/item_list.go>, <https://cli.github.com/manual/gh_project_item-list>, <https://cli.github.com/manual/gh_project>
- gotchas: "Version: v2.97.0"; "<number>: Project number; the documented example uses `1`."; "--owner <string>: Owner login; use `@me` for the current user."; "--field <stringArray>: Name of a field to show as an extra column; repeat once per field."; "Prerequisite: GitHub CLI authentication must have the `project` scope; verify with `gh auth status` or add it with `gh auth refresh -s project`."

### gh-stack adds atomic stack merging with gh stack merge (2026-07-29)
- slug: gh-stack-adds-atomic-stack-merging-with-gh-stack-merge-0647b724a4c1
- tools: gh-stack
- score: 0.95

How to use it:

If merging the current stack or a selected stack or PR, run `gh stack merge` with the appropriate optional target. Choose the merge extent and method interactively, or use `--yes` or a non-interactive terminal with a method flag to merge without prompts; the operation is all-or-nothing.

Examples:

```
gh stack merge
```

```
gh stack merge <stack-number> --yes --squash
```

```
gh stack merge <pr-number> --yes --merge-method rebase
```

- why_it_matters: Merge the current stack or a selected stack or pull request into its base branch.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.1.0>, <https://github.com/github/docs/blob/main/content/pull-requests/reference/stacked-prs-cli-commands.md>
- gotchas: "Version: v0.1.0"; "[<stack-number>]: Selects a stack to merge even when it is not checked out; omitting the target uses the active local stack."; "[<pr-number>]: Selects a PR and merges every PR in its stack up to and including it."; "--yes / -y: Merge without prompting for confirmation; non-interactive terminals also run without prompting."; "--merge-method <method>: Sets the method to `merge`, `squash`, or `rebase`."; "--merge: Shorthand for the `merge` method."; "--squash: Shorthand for the `squash` method."; "--rebase: Shorthand for the `rebase` method."; "Prerequisite: Install with `gh extension install github/gh-stack`. Requires GitHub CLI (`gh`) 2.0 or later and Git 2.36 or later. Authenticate with `gh auth login` if not already authenticated."; "Prerequisite: Each PR must be open and not a draft. GitHub evaluates branch protection and repository rules during the merge."; "Interactive wizard is for terminal use."; "The wizard offers only merge methods allowed by the repository and defaults to the last-used method."

### gh-stack branch names no longer use stack prefixes or numbered naming (2026-07-15)
- slug: gh-stack-branch-names-no-longer-use-stack-prefixes-or-numbered-naming-98eee258a6ae
- tools: gh-stack
- score: 0.94

How to use it:

When adding a named branch, use its name directly; `gh stack add refactor/foo` creates that branch. To create a branch from a message, run `gh stack add -m "<message>"`; the v0.0.8 release says an omitted name generates `MM-DD-slug`.

Examples:

```
gh stack add refactor/foo
```

```
gh stack add -m "<message>"
```

- why_it_matters: When adding a branch with a chosen name or generating one from a message, use the branch name directly or the new generated-name form.
- before: Use the stack branch-name prefix or coupled numbered naming; `init` accepts `-p/--prefix` and `-n/--numbered`.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.8>, <https://github.com/github/gh-stack>
- gotchas: "Version: v0.0.8"; "branch: Optional branch name; if omitted, `add` prompts for one, or auto-generates one when `-m` is provided."; "-m, --message <string>: Create a commit with this message before creating the branch; with no branch name, generates the branch name."; "-A, --all: Stage all changes, including untracked files; requires `-m`."; "-u, --update: Stage changes to tracked files only; requires `-m`."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`; requires GitHub CLI (`gh`) v2.0 or later."; "Prerequisite: For an existing stack, run `add` while on its topmost branch."; "Existing stack files carrying `prefix`/`numbered` keys still load; the fields are ignored and dropped on the next save."; "Docs conflict: The current README is newer than v0.0.8 and gives an auto-generated-name example `03-24-auth_middleware`; the release states the v0.0.8 form is `MM-DD-slug`."; "Docs conflict: The current README documents only `-b, --base <branch>` for `init` and omits the removed `-p/--prefix` and `-n/--numbered` flags; it does not document legacy `prefix`/`numbered` file handling."

### gh stack checkout opens an interactive stack picker (2026-07-15)
- slug: gh-stack-checkout-opens-an-interactive-stack-picker-76fc5f8b58f0
- tools: gh-stack
- score: 0.96

How to use it:

When you need to choose a stack without knowing its identifier, run `gh stack checkout` in an interactive terminal and select it from the picker. Use the All/Local/Remote tabs or `/` search; selecting a remote-only stack clones it locally before switching to it.

Examples:

```
gh stack checkout
```

- why_it_matters: When choosing a local or GitHub stack without already knowing its identifier, run `gh stack checkout` with no argument and select the desired stack.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.8>, <https://github.com/github/gh-stack/blob/38aba1b/README.md>
- gotchas: "Version: v0.0.8"; "stack-number, pr-number, pr-url, branch: Optional checkout target; omitting it opens the picker in an interactive terminal."; "All / Local / Remote tabs: Filter the picker by all available stacks, locally tracked stacks, or remote stacks."; "/: Start searching the picker; the v0.0.8 release says search matches the stack number, base, and every stack branch, including mid-stack branches."; "Prerequisite: The picker opens when run without arguments in an interactive terminal."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`; requires GitHub CLI `gh` v2.0+. Stacked PRs must be enabled for the repository."; "The picker searches stack number, base branch, and every branch in the stack, including mid-stack branches."

### gh-stack commands reference stacks by number (2026-07-15)
- slug: gh-stack-commands-reference-stacks-by-number-a284b3dc9565
- tools: gh-stack
- score: 0.92

How to use it:

When checking out or unstacking a tracked stack by its GitHub UI number, use that number: run `gh stack checkout <stack-number>` to check it out or `gh stack unstack <stack-number>` to unstack it. Find the number in the GitHub UI or gh-stack output.

Examples:

```
gh stack checkout <stack-number>
```

```
gh stack unstack <stack-number>
```

- why_it_matters: When checking out or unstacking a tracked stack by its GitHub stack UI identifier, use its stack number.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.8>, <https://github.com/github/gh-stack/blob/v0.0.8/README.md>
- gotchas: "Version: v0.0.8"; "<stack-number> (checkout): A stack number; checkout also accepts a PR number, PR URL, or branch. A bare number is matched as a stack or PR number before being tried as a branch name."; "<stack-number> (unstack): The GitHub UI stack number; targets that stack from anywhere in the repository. If omitted, targets the active stack."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`; requires GitHub CLI (`gh`) v2.0+."; "Prerequisite: Stacked PRs must be enabled for the repository. Authenticate with GitHub CLI to run stack operations."

### gh stack link appends pull requests to an existing stack (2026-07-15)
- slug: gh-stack-link-appends-pull-requests-to-an-existing-stack-ccd877353da0
- tools: gh-stack
- score: 0.96

How to use it:

When appending pull requests to an existing stack, run `gh stack link <stack-number> <pr-number-or-url> <branch-name>`; the stack number selects the target, and the remaining arguments are ordered bottom to top.

Examples:

```
gh stack link 7 48 ui-polish
```

- why_it_matters: When adding pull requests to the top of an existing stack, link them by stack number without restating the stack's existing pull requests.
- before: Restate every PR already in the stack along with the PRs to append.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.8>, <https://github.com/github/docs/blob/main/content/pull-requests/reference/stacked-prs-cli-commands.md>
- gotchas: "Version: v0.0.8"; "<stack-number> (required): Target existing stack number; the task’s release example uses it as the first argument."; "<branch-or-pr> (required): One or more branch names, PR numbers, or PR URLs, in stack order from bottom to top. Branches are pushed automatically; mismatched PR base branches are corrected."; "Prerequisite: Install GitHub CLI 2.0+ and Git 2.36+; install the extension with `gh extension install github/gh-stack`. Authenticate with `gh auth login` if needed."; "The operation appends PRs to the top of an existing stack."; "PRs that belong to a different stack are rejected."

### gh stack unstack dissolves a remote stack by number (2026-07-15)
- slug: gh-stack-unstack-dissolves-a-remote-stack-by-number-4c892239ce17
- tools: gh-stack
- score: 0.94

How to use it:

When dissolving a stack that may not be tracked locally, run `gh stack unstack <stack-number>` from within the repository. It dissolves the stack through GitHub’s API and removes local tracking when present.

Examples:

```
gh stack unstack <stack-number>
```

- why_it_matters: When dissolving a stack that may not be tracked locally, unstack it by its stack number from within the repository.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.8>, <https://github.com/github/gh-stack/blob/v0.0.8/README.md>
- gotchas: "Version: v0.0.8"; "<stack-number> (required): Stack number shown in the GitHub stack UI; targets that stack for unstacking."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`; requires GitHub CLI (`gh`) v2.0 or later."; "Prerequisite: The Stacked PRs feature must be enabled for the repository; authenticate with GitHub CLI to run stack operations."; "The command works from anywhere in the repository, whether or not the stack is tracked locally."

### gh release download works without authentication on public repositories (2026-07-02)
- slug: gh-release-download-works-without-authentication-on-public-repositories-2bddb3382adb
- score: 0.97

How to use it:

When downloading a release asset from a public repository without gh authentication, run `gh release download` with the release tag and `--repo OWNER/REPO`. A token is still used if present.

Examples:

```
gh release download v2.96.0 --repo cli/cli
```

- why_it_matters: Download a release asset from a public repository while working on a repository without gh authentication.
- sources: <https://github.com/cli/cli/releases/tag/v2.96.0>, <https://cli.github.com/manual/gh_release_download>, <https://cli.github.com/manual/gh_release>
- gotchas: "Version: v2.96.0"; "<tag> (required): Selects the release to download from; without it, the latest release is used."; "--repo <[HOST/]OWNER/REPO> (required): Selects the repository to download from."; "Prerequisite: The repository must be public for unauthenticated downloading."; "Applies to public repositories."; "A token is still used when one is present."

### gh stack submit TUI customizes a whole stack (2026-06-30)
- slug: gh-stack-submit-tui-customizes-a-whole-stack-e5fc2aba50b3
- tools: gh-stack
- score: 0.96

How to use it:

When preparing PRs for a stack, run `gh stack submit` in an interactive terminal to choose branches, edit each PR’s title and description, and set ready or draft state. Submit the choices together with Ctrl+S.

Examples:

```
gh stack submit
```

- why_it_matters: Before creating PRs for a stack, customize which branches become PRs and each PR’s details.
- before: Previously, submit could only customize each PR’s title.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.7>, <https://github.com/github/gh-stack/blob/e208dfc/README.md>
- gotchas: "Version: v0.0.7"; "branch selection (Ctrl+X): Deselect a branch; deselecting it also deselects branches above it. Re-including a branch re-includes branches below it. Branches without PRs are included by default."; "PR title: Edit each PR’s title in the editor."; "PR description: Edit each PR’s description; the editor provides markdown preview and a `$EDITOR` escape."; "ready/draft toggle: Choose ready for review or draft for each PR. New PRs default to ready for review in the editor."; "Ctrl+S (required): Submit the edited PRs together."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`; requires GitHub CLI (`gh`) v2.0+."; "Prerequisite: Stacked PRs is in private preview; the feature must be enabled for the repository."; "Prerequisite: Run in an interactive terminal to open the editor."; "The interface is keyboard- and mouse-driven."

### gh repo read-file and read-dir inspect remote repository content (2026-06-17)
- slug: gh-repo-read-file-and-read-dir-inspect-remote-repository-content-41a732a2ff05
- score: 0.99

How to use it:

When using GitHub CLI v2.95.0 or later to inspect a remote repository without cloning, run `gh repo read-file <path> --repo <owner>/<repo>` to read a file or `gh repo read-dir [<path>] --repo <owner>/<repo>` to list a directory.

Examples:

```
gh repo read-file <path> --repo <owner>/<repo>
```

```
gh repo read-dir [<path>] --repo <owner>/<repo>
```

```
gh repo read-file <path> --repo <owner>/<repo> --ref <branch|tag|commit>
```

- why_it_matters: Inspect files or browse directories in a remote repository from your terminal without cloning it.
- sources: <https://github.blog/changelog/2026-06-17-read-remote-repository-content-with-github-cli>, <https://cli.github.com/manual/gh_repo_read-file>, <https://cli.github.com/manual/gh_repo_read-dir>, <https://github.com/cli/cli/releases/tag/v2.95.0>
- gotchas: "Version: v2.95.0 or later"; "Availability: Available to all GitHub users, including those on GitHub Enterprise Server (GHES)."; "Requires Install or upgrade GitHub CLI to v2.95.0 or later."; "<path> (read-file) (required): Path of the file to read."; "[<path>] (read-dir): Directory to list; omitted means repository root."; "--repo <[HOST/]OWNER/REPO> (required): Select the repository to inspect."; "--ref <string>: Branch, tag, or commit to read or list from; default is the repository’s default branch."; "--output <path>: For read-file, write the file to a path instead of stdout."; "--clobber: For read-file, overwrite the output path if it already exists."; "--allow-escape-sequences: For read-file, allow printing terminal escape sequences."; "--json <fields>: Output JSON with selected fields."; "--jq <expression>: Filter JSON output using a jq expression."; "--template <string>: Format JSON output using a Go template."; "Prerequisite: Install or upgrade GitHub CLI to v2.95.0 or later for these commands."; "Prerequisite: Both commands are in preview and may change without notice."; "The commands allow exploration without cloning."

### gh repo read-file and read-dir inspect repository contents (2026-06-17)
- slug: gh-repo-read-file-and-read-dir-inspect-repository-contents-ef3a7f403c99
- score: 0.99

How to use it:

When you need to inspect a GitHub repository without cloning it, use `gh repo read-file` to read a file or save it locally, and `gh repo read-dir` to list directory entries. Both use the default branch unless you pass `--ref`; both commands are in preview.

Examples:

```
gh repo read-file <path> --repo <owner>/<repo>
```

```
gh repo read-file <path> --repo <owner>/<repo> --ref <branch|tag|commit> --output <local-path>
```

```
gh repo read-dir <directory-path> --repo <owner>/<repo>
```

- why_it_matters: Inspect a repository’s files or directory without cloning it.
- sources: <https://github.com/cli/cli/releases/tag/v2.95.0>, <https://cli.github.com/manual/gh_repo_read-file>, <https://cli.github.com/manual/gh_repo_read-dir>
- gotchas: "Version: v2.95.0"; "Availability: Preview; subject to change without notice."; "<path> (required): Repository file path for `read-file`."; "<directory-path>: Directory to list; omit to list the repository root."; "--repo <[HOST/]OWNER/REPO>: Select a repository."; "--ref <branch|tag|commit>: Read or list at the specified branch, tag, or commit; defaults to the repository’s default branch."; "--output <path>: Write file contents to a local path instead of stdout."; "--clobber: Overwrite the output path if it already exists."; "--json <fields>: Output JSON with selected fields."; "--jq <expression>: Filter JSON output using a jq expression."; "--template <string>: Format JSON output using a Go template."; "Prerequisite: Both commands are in preview and subject to change without notice."; "Both commands default to the repository’s default branch."; "`--ref` targets a branch, tag, or commit."

### gh stack rebase adds --no-trunk (2026-06-15)
- slug: gh-stack-rebase-adds-no-trunk-0fb30cb2dc67
- tools: gh-stack
- score: 0.94

How to use it:

When you need to align stack branches without fetching or rebasing trunk, run `gh stack rebase --no-trunk`.

Examples:

```
gh stack rebase --no-trunk
```

- why_it_matters: Rebase the branches in a stack without network access.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.6>, <https://github.com/github/gh-stack>
- gotchas: "Version: v0.0.6"; "--no-trunk: Skip trunk; rebase stack branches onto each other with no fetch or trunk rebase."; "Runs only the inter-branch cascade rebase; skips all remote fetch and trunk operations."

### gh discussion commands cover repository discussion workflows (2026-06-10)
- slug: gh-discussion-commands-cover-repository-discussion-workflows-a5bf9df7b224
- score: 0.99

How to use it:

When a repository has GitHub Discussions enabled, use GitHub CLI v2.94.0 or later to list, view, create, edit, and comment on discussions with `gh discussion` commands.

Examples:

```
gh discussion list --repo <owner>/<repo>
gh discussion view <number> --repo <owner>/<repo> --comments
gh discussion create --repo <owner>/<repo> --title "<title>" --category "<category>" --body "<body>"
gh discussion edit <number> --repo <owner>/<repo> --title "<new-title>" --body "<new-body>"
gh discussion comment <number> --repo <owner>/<repo> --body "<comment>"
```

- why_it_matters: When working in a repository with GitHub Discussions enabled, list, read, create, edit, or comment on discussions from the terminal.
- sources: <https://github.blog/changelog/2026-06-10-list-view-and-create-discussions-in-github-cli>, <https://raw.githubusercontent.com/cli/cli/v2.94.0/pkg/cmd/discussion/create/create.go>, <https://raw.githubusercontent.com/cli/cli/v2.94.0/pkg/cmd/discussion/view/view.go>, <https://raw.githubusercontent.com/cli/cli/v2.94.0/pkg/cmd/discussion/list/list.go>, <https://raw.githubusercontent.com/cli/cli/v2.94.0/pkg/cmd/discussion/comment/comment.go>, <https://cli.github.com/manual/index>, <https://github.com/cli/cli/releases/tag/v2.94.0>
- gotchas: "Version: v2.94.0"; "Requires Install or upgrade to GitHub CLI v2.94.0."; "<number> (required): Discussion number for view, edit, or comment; view also accepts a discussion URL."; "--repo <owner>/<repo>: Select a repository; otherwise the command uses the repository inferred from context."; "--comments: Fetch and display discussion comments with `view`."; "--title <title> (required): Discussion title when creating non-interactively; new title when editing."; "--category <name-or-slug> (required): Discussion category name or slug when creating non-interactively."; "--body <text> (required): Discussion body when creating non-interactively; replacement body when editing; comment text when commenting. `--body` and `--body-file` are mutually exclusive where both are supported."; "--body-file <file>: Read discussion or comment body from a file; `-` reads standard input. Mutually exclusive with `--body`."; "Authentication (required): Authenticate with `gh auth login` or provide `GH_TOKEN`/`GITHUB_TOKEN`; the docs do not specify discussion-specific scopes."; "Prerequisite: Install or upgrade to GitHub CLI v2.94.0 or later."; "Prerequisite: The target repository must have GitHub Discussions enabled."; "Prerequisite: Authenticate with GitHub CLI or set `GH_TOKEN`/`GITHUB_TOKEN`."; "Use on repositories where GitHub Discussions is enabled."

### gh issue adds hierarchy, type, and dependency workflows (2026-06-10)
- slug: gh-issue-adds-hierarchy-type-and-dependency-workflows-6e8d184fe3e9
- score: 0.97

How to use it:

When managing issue types, hierarchy, or dependencies, use `gh` v2.94.0 or later in a supported repository; create or edit issues with the documented flags, then read structure with `gh issue view` or `gh issue list --json`.

Examples:

```
gh issue create --title "<title>" --body "<body>" --type <type> --parent <parent-number> --blocked-by <issue-number>
```

```
gh issue edit <issue-number> --type <type> --add-sub-issue <sub-issue-number> --add-blocking <issue-number>
```

```
gh issue list --type <type> --json number,title,issueType,parent,subIssues,blockedBy,blocking
```

- why_it_matters: When organizing repository work or automating issue workflows, create and inspect issue types, parent and sub-issue relationships, and dependencies from the terminal.
- sources: <https://github.blog/changelog/2026-06-10-manage-sub-issues-types-and-dependencies-from-github-cli>, <https://cli.github.com/manual/gh_issue_create>, <https://github.com/cli/cli/releases/tag/v2.94.0>, <https://cli.github.com/manual/gh_issue_list>, <https://cli.github.com/manual/gh_issue_view>
- gotchas: "Version: v2.94.0"; "Requires Install or upgrade to GitHub CLI v2.94.0."; "--title <string>: Supply the new issue title; otherwise prompted."; "--body <string>: Supply the new issue body; otherwise prompted."; "--type <name>: Set or filter by issue type name."; "--parent <number>: Create the issue as a sub-issue of the specified parent number or URL."; "--blocked-by <numbers>: Mark the new issue as blocked by the listed issue numbers or URLs."; "--add-sub-issue <number>: Add the specified issue as a sub-issue."; "--add-blocking <numbers>: Add issue numbers or URLs that this issue blocks."; "--json <fields>: Output selected comma-separated JSON fields."; "issueType: JSON field for issue type."; "parent: JSON field for parent issue."; "subIssues: JSON field for sub-issues."; "blockedBy: JSON field for issues blocking this issue."; "blocking: JSON field for issues this issue blocks."; "Prerequisite: Use GitHub CLI v2.94.0 or later. Issue types and sub-issues are available on GitHub.com and GHES 3.17+; issue relationships require GHES 3.19+."; "Prerequisite: Issue type support applies in organizations that have defined issue types."; "Hierarchy and dependency support is available in repositories where those features are available."; "Issue types are configured at the organization level; type support applies to issues in organizations that have defined them."

### gh discussion preview command set (2026-06-10)
- slug: gh-discussion-preview-command-set-abc827c4b39b
- score: 0.98

How to use it:

When reviewing or maintaining repository discussions from the CLI, use `gh discussion` to list, view, create, edit, comment on, or reply to a discussion. Run `gh discussion --help` for command details.

Examples:

```
gh discussion list
```

```
gh discussion view 123 --comments
```

```
gh discussion comment <url>
```

- why_it_matters: When reviewing or maintaining repository discussions from the CLI, list, view, create, edit, comment on, or reply to a discussion.
- sources: <https://github.com/cli/cli/releases/tag/v2.94.0>, <https://cli.github.com/manual/gh_help_reference>, <https://cli.github.com/manual/index>
- gotchas: "Version: v2.94.0"; "Availability: Preview; subject to change without notice."; "discussion number (required): Discussion identifier for the documented view, edit, or comment examples."; "--comments: View discussion comments; for replies to a comment, pass the comment URL instead."; "comment URL (required): Use the comment URL to reply to that comment."; "Prerequisite: Authenticate with `gh auth login` or provide `GITHUB_TOKEN`."; "Docs conflict: The current manual documents additional identifiers and operations for `gh discussion view` and `comment`, including comment IDs and editing or deleting comments. These are broader than the v2.94.0 release note; this card uses the release-note examples."

### gh issue create, edit, view, and list support issue types, sub-issues, and relationships (2026-06-10)
- slug: gh-issue-create-edit-view-and-list-support-issue-types-sub-issues-and-relationsh-859cce174462
- score: 0.98

How to use it:

When organizing repository work with GitHub CLI v2.94.0 or later, use `gh issue create` or `gh issue edit` to set types, parent/sub-issue links, and blocking relationships; use `view` or `list` to inspect them.

Examples:

```
gh issue create --title "<title>" --body "<body>" --type Bug --parent <parent-number> --blocked-by <issue-number>
```

```
gh issue edit <issue-number> --type Bug --parent <parent-number>
```

```
gh issue edit <issue-number> --add-blocking <issue-number> && gh issue view <issue-number> --json issueType,parent,subIssues,blockedBy,blocking && gh issue list --type Bug --json issueType,parent,subIssues,blockedBy,blocking
```

- why_it_matters: When organizing repository work from the CLI, set issue types, add sub-issues, or track blocking relationships.
- sources: <https://github.com/cli/cli/releases/tag/v2.94.0>, <https://cli.github.com/manual/gh_issue_create>, <https://cli.github.com/manual/gh_issue_edit>, <https://cli.github.com/manual/gh_issue_view>
- gotchas: "Version: v2.94.0"; "Availability: Issue types and sub-issues are available on GitHub.com and GHES 3.17+; relationships require GHES 3.19+."; "--type <name>: Set the issue type by name; on `gh issue list`, filter by issue type name."; "--parent <number|URL>: On create, make the new issue a sub-issue of the specified parent; on edit, set the parent issue."; "--add-sub-issue <number|URL>: Add the specified issue as a sub-issue."; "--blocked-by <numbers|URLs>: On create, mark the new issue as blocked by the specified issues."; "--add-blocking <number|URL>: Add a blocking relationship by issue number or URL."; "--json <fields>: Output selected JSON fields; `issueType`, `parent`, `subIssues`, `blockedBy`, and `blocking` are available on `view` and `list`."; "Prerequisite: Use GitHub CLI v2.94.0 or later for the release-described support."; "Prerequisite: Issue types and sub-issues are available on GitHub.com and GHES 3.17+; blocked-by/blocking relationships require GHES 3.19+."; "The stated GHES versions are required for the corresponding features."

### gh skill install --all installs every skill in a repository (2026-06-10)
- slug: gh-skill-install-all-installs-every-skill-in-a-repository-9d58fa50e1b3
- score: 0.96

How to use it:

When installing every skill from a repository, run `gh skill install <owner>/<repo> --all`. The flag installs all skills without prompting for skill selection.

Examples:

```
gh skill install <owner>/<repo> --all
```

- why_it_matters: When adding all skills from a repository to an agent setup, install every skill in that repository.
- before: The release note states that v2.94.0 added `--all` to `gh skill install`.
- sources: <https://github.com/cli/cli/releases/tag/v2.94.0>, <https://github.com/cli/cli/blob/v2.94.0/pkg/cmd/skills/install/install.go>
- gotchas: "Version: v2.94.0"; "<owner>/<repo> (required): Repository to install skills from."; "--all (required): Install every discovered skill without prompting for skill selection."; "Prerequisite: Use GitHub CLI v2.94.0 or later for this flag."

### gh stack modify inserts empty branches (2026-05-26)
- slug: gh-stack-modify-inserts-empty-branches-f8ea69991bea
- tools: gh-stack
- score: 0.94

How to use it:

When restructuring a stack, run `gh stack modify`; in its TUI press `i` to stage an empty branch below the cursor or `I` to stage one above, then press `Ctrl+S` to apply the staged changes. [v0.0.5 README](https://github.com/github/gh-stack/blob/v0.0.5/README.md#L388-L424)

Examples:

```
gh stack modify
```

- why_it_matters: Insert an empty branch above or below a branch while restructuring a stack.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.5>, <https://github.com/github/gh-stack/blob/v0.0.5/README.md#L388-L438>, <https://github.com/github/gh-stack/blob/v0.0.5/README.md#L403-L424>, <https://github.com/github/gh-stack/blob/v0.0.5/README.md#L411-L425>, <https://github.com/github/gh-stack/blob/v0.0.5/README.md#L428-L434>, <https://github.com/github/gh-stack/blob/v0.0.5/README.md#L199-L203>
- gotchas: "Version: v0.0.5"; "i: Stage insertion of an empty branch below the cursor."; "I: Stage insertion of an empty branch above the cursor."; "Ctrl+S (required): Apply all staged changes."; "Prerequisite: Requires an active local stack, a clean working tree, no rebase in progress, no stack PR queued for merge, and linear commit history."; "Prerequisite: Requires GitHub CLI (`gh`) v2.0+ and installation of the extension with `gh extension install github/gh-stack`."

### gh-stack init adopts multiple branches and derives their prefix (2026-05-15)
- slug: gh-stack-init-adopts-multiple-branches-and-derives-their-prefix-1450b30dea80
- tools: gh-stack
- score: 0.90

How to use it:

When initializing a stack from multiple existing branches, run `gh stack init <branch1> <branch2> ...`; existing branches are adopted automatically and v0.0.4 derives the prefix from their names.

Examples:

```
gh stack init <branch1> <branch2>
```

- why_it_matters: Initialize a stack from multiple existing branches with a shared prefix.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.4>, <https://github.com/github/gh-stack/blob/v0.0.4/README.md>
- gotchas: "Version: v0.0.4"; "branches... (required): One or more branch names, processed in order; existing branches are adopted automatically. For this task, supply multiple names."; "--adopt: Deprecated, hidden, but still accepted; existing branches no longer require it to be adopted."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`; the README says GitHub CLI (`gh`) must be installed first."; "The `--adopt` flag is deprecated and hidden but still accepted."; "Docs conflict: Later official docs say automatic prefix detection was removed; branch names with slashes are taken literally. That behavior is newer than v0.0.4 and does not apply to this card's version: https://github.com/github/gh-stack/releases."

### gh-stack sync --prune deletes merged-PR refs during sync (2026-05-15)
- slug: gh-stack-sync-prune-deletes-merged-pr-refs-during-sync-ec7e15ba10cc
- tools: gh-stack
- score: 0.94

How to use it:

When syncing a stack with merged PRs, run `gh stack sync --prune` to automatically delete their local branches. The documentation does not confirm deletion of remote-tracking refs.

Examples:

```
gh stack sync --prune
```

- why_it_matters: During sync, remove local branches and remote-tracking refs for merged pull requests.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.4>, <https://github.com/github/gh-stack>
- gotchas: "Version: v0.0.4"; "--prune: Automatically delete local branches for merged PRs during sync."; "Prerequisite: Install the GitHub CLI extension with `gh extension install github/gh-stack`; the docs require GitHub CLI v2.0+ and Git 2.36+."; "Docs conflict: The release note says pruning deletes local branches and remote-tracking refs. The command documentation describes deletion of local branches only and does not confirm remote-tracking ref deletion."

### gh-stack gh stack modify restructures a branch stack (2026-05-11)
- slug: gh-stack-gh-stack-modify-restructures-a-branch-stack-996d4c53c39b
- tools: gh-stack
- score: 0.96

How to use it:

When you have an active stack checked out, a clean working tree, no rebase in progress, no PR queued to merge, and linear history, run `gh stack modify` to open the TUI and stage branch changes. Save to apply them; if a conflict occurs, resolve it and run `gh stack modify --continue`, or restore the pre-modify state with `gh stack modify --abort`.

Examples:

```
gh stack modify
```

```
gh stack modify --continue
```

```
gh stack modify --abort
```

- why_it_matters: Restructure a branch stack by dropping, folding, renaming, or reordering branches.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.3>, <https://github.com/github/gh-stack>, <https://docs.github.com/en/pull-requests/reference/stacked-prs-cli-commands>
- gotchas: "Version: v0.0.3"; "--continue: Continue after resolving conflicts."; "--abort: Abort the modify session and restore the stack to its pre-modify state."; "x: Drop a branch and its commits from the stack."; "d: Fold the selected branch into the branch below it, toward trunk."; "u: Fold the selected branch into the branch above it, away from trunk."; "r: Rename a branch locally and in stack metadata."; "Shift+↓ / Shift+↑: Move a branch down toward trunk or up away from trunk."; "Ctrl+S: Apply staged changes."; "Prerequisite: Requires an active stack checked out locally, a clean working tree, no rebase in progress, no PR in the stack queued for merge, and linear commit history."; "Prerequisite: Install GitHub CLI 2.0 or later and Git 2.36 or later; install the extension with `gh extension install github/gh-stack`. Authenticate with `gh auth login` if needed."; "Prerequisite: The release notes state Stacked PRs must be enabled for the repository for the CLI functionality to work."; "The command is interactive."

### gh skill install discovers hidden and nested skills (2026-04-22)
- slug: gh-skill-install-discovers-hidden-and-nested-skills-ef944277d5d9
- score: 0.96

How to use it:

When the repository’s skills are in hidden or nested `skills/` directories, run `gh skill install` with `--allow-hidden-dirs` to include hidden directories in discovery and install the selected skill.

Examples:

```
gh skill install <owner>/<repo> --allow-hidden-dirs
```

- why_it_matters: Find and install skills stored in hidden or nested skills directories in a repository.
- sources: <https://github.com/cli/cli/releases/tag/v2.91.0>, <https://cli.github.com/manual/gh_skill_install>
- gotchas: "Version: v2.91.0"; "<owner>/<repo> (required): GitHub repository to install a skill from."; "--allow-hidden-dirs: Include skills in hidden directories during discovery; required for this task when skills are in hidden directories."; "Prerequisite: Use GitHub CLI v2.91.0 or later for the `--allow-hidden-dirs` flag."

### gh skill install offers upstream source for republished skills (2026-04-22)
- slug: gh-skill-install-offers-upstream-source-for-republished-skills-8ba296407826
- score: 0.97

How to use it:

If the selected skill was republished from an upstream source, use `--upstream` to install directly from that source. Otherwise, install from the repository as usual.

Examples:

```
gh skill install <owner>/<repo> <skill-name> --upstream
```

```
gh skill install <owner>/<repo> <skill-path> --upstream
```

- why_it_matters: Install a repository skill that was republished from an upstream source.
- sources: <https://github.com/cli/cli/releases/tag/v2.91.0>, <https://cli.github.com/manual/gh_skill_install>, <https://github.com/cli/cli/blob/v2.91.0/pkg/cmd/skills/install/install.go>
- gotchas: "Version: v2.91.0"; "<owner>/<repo> (required): GitHub repository containing the republished skill."; "<skill-name> or <skill-path> (required): Select the skill by name or exact path within the repository."; "--upstream: Install from the upstream source when a republished skill is detected; cannot be combined with `--from-local`."; "Prerequisite: Use GitHub CLI v2.91.0 or later for this flag."; "The upstream option is offered when the CLI detects that the skill was republished from an upstream source."

### gh skill install supports multiple agent hosts (2026-04-22)
- slug: gh-skill-install-supports-multiple-agent-hosts-e8e106f25904
- score: 0.91

How to use it:

When setting up a repository’s coding-agent workflow, run `gh skill install --help` to see supported hosts, then run `gh skill install <owner>/<repo> <skill>` and select the needed host or hosts when prompted.

Examples:

```
gh skill install --help
```

```
gh skill install <owner>/<repo> <skill>
```

- why_it_matters: Install a skill for an agent host while setting up a repository's coding-agent workflow.
- sources: <https://github.com/cli/cli/releases/tag/v2.91.0>, <https://github.com/cli/cli/blob/v2.91.0/pkg/cmd/skills/install/install.go>
- gotchas: "Version: v2.91.0"; "<owner>/<repo> (required): GitHub repository containing the skill; required when running non-interactively."; "<skill>: Skill name or repository path; interactive mode prompts when omitted."; "--agent <id>: Select a target agent host. Without it, interactive mode prompts for one or more hosts."; "--scope <project|user>: Choose project or user installation scope; defaults to project."; "Prerequisite: Use GitHub CLI v2.91.0 or later for the release-note change."; "Docs conflict: The current manual describes a newer version and its host list; use `gh skill install --help` on the installed version for its available values."

### gh stack switch interactively selects a branch in the current stack (2026-04-20)
- slug: gh-stack-switch-interactively-selects-a-branch-in-the-current-stack-fad9d2f35cab
- tools: gh-stack
- score: 0.96

How to use it:

When you need to switch to a branch in the current stack, run `gh stack switch` in an interactive terminal and select the branch from the ordered picker.

Examples:

```
gh stack switch
```

- why_it_matters: Interactively switch to a branch in the current stack.
- sources: <https://github.com/github/gh-stack/releases/tag/v0.0.2>, <https://github.com/github/docs/blob/main/content/pull-requests/reference/stacked-prs-cli-commands.md>, <https://github.com/github/gh-stack/blob/v0.0.2/README.md>
- gotchas: "Version: v0.0.2"; "Prerequisite: Requires an interactive terminal."; "Prerequisite: Install the extension with `gh extension install github/gh-stack`; requires GitHub CLI `gh` v2.0 or later."; "Interactive picker command."

### gh skill manages and publishes agent skills (2026-04-16)
- slug: gh-skill-manages-and-publishes-agent-skills-70f71668c6ab
- score: 0.97

How to use it:

When managing a skill from a GitHub repository, use `gh skill` to search, preview, install, or update it; to validate or publish your own skills, run `gh skill publish` from the local repository. Installation can target an agent and project or user scope.

Examples:

```
gh skill install <owner>/<repo> <skill> --agent <agent> --scope <project|user>
```

```
gh skill update --all
```

```
gh skill publish --dry-run
```

- why_it_matters: Manage or publish an agent skill from a GitHub repository for a supported coding agent host.
- sources: <https://github.com/cli/cli/releases/tag/v2.90.0>, <https://cli.github.com/manual/gh_skill_install>, <https://cli.github.com/manual/gh_skill_update>, <https://cli.github.com/manual/gh_skill_publish>
- gotchas: "Version: v2.90.0"; "Availability: Public Preview; subject to change without notice."; "<owner>/<repo> (required): GitHub repository containing the skill."; "<skill>: Skill name, namespaced name, or repository path; required for a specific skill unless using `--all`."; "--agent <agent>: Select the target agent; install documentation gives supported values."; "--scope <project|user>: Choose installation scope; default is `project`."; "--pin <tag-or-SHA>: Pin installation to a Git tag or commit SHA."; "--all: Update all installed skills without prompting."; "--dry-run: Validate publishing without publishing."; "Prerequisite: Install command requires a GitHub repository in `OWNER/REPO` format; skills are discovered from `SKILL.md` files."; "Prerequisite: Publishing validates skills in a local repository and creates a GitHub release after validation."; "Prerequisite: The release identifies `gh skill` as public preview in GitHub CLI v2.90.0."; "Skills are automatically installed to the correct directory for the agent host."; "Supported hosts are GitHub Copilot, Claude Code, Cursor, Codex, Gemini CLI, and Antigravity."; "Docs conflict: The current install manual lists additional agent hosts beyond the six named in the v2.90.0 release note; the manual reflects a newer, broader host list."; "Docs conflict: The current publish manual describes release creation but does not document the release note's auto-push of unpushed commits."

### gh skill discovers and installs skills for agent hosts (2026-04-16)
- slug: gh-skill-discovers-and-installs-skills-for-agent-hosts-27c8f963eee7
- score: 0.95

How to use it:

When installing a repository skill for your coding host, preview it first, then run `gh skill install <OWNER>/<REPOSITORY> <SKILL> --agent <HOST> --scope <project|user>`. Search for candidates with `gh skill search <QUERY>`; skill commands are documented as preview features.

Examples:

```
gh skill search mcp-apps
```

```
gh skill preview <OWNER>/<REPOSITORY> <SKILL>
```

```
gh skill install <OWNER>/<REPOSITORY> <SKILL> --agent <HOST> --scope <project|user>
```

- why_it_matters: Install a repository skill for the agent host used by the coding workflow.
- sources: <https://github.blog/changelog/2026-04-16-manage-agent-skills-with-github-cli>, <https://cli.github.com/manual/gh_skill_search>, <https://cli.github.com/manual/gh_skill_preview>, <https://cli.github.com/manual/gh_skill_install>, <https://cli.github.com/manual/gh_skill>
- gotchas: "Version: v2.90.0 or later"; "Availability: Public preview; subject to change without notice."; "<QUERY> (required): Keyword to match against skill names or descriptions."; "<OWNER>/<REPOSITORY> (required): Repository containing the skill."; "<SKILL>: Skill name, namespaced name, or exact repository path. Omit to browse/select interactively; in non-interactive use, omit only with `--all`."; "--agent <HOST>: Target host. Current docs list `github-copilot`, `claude-code`, `cursor`, `codex`, `gemini-cli`, `antigravity`, and others."; "--scope <project|user>: Installation scope; defaults to `project`. Allowed values are `project` and `user`."; "Prerequisite: The manual labels skill commands as preview features, subject to change without notice."; "Prerequisite: The release note says GitHub CLI v2.90.0 or later is required."; "Skills are not verified by GitHub and may contain prompt injections, hidden instructions, or malicious scripts; inspect contents before installation."; "Docs conflict: Current manual lists `gemini-cli` as the `--agent` value; the release note’s example uses `gemini`. Do not treat those values as interchangeable without version-specific documentation."

### gh pr edit and gh pr create can request Copilot code review (2026-03-11)
- slug: gh-pr-edit-and-gh-pr-create-can-request-copilot-code-review-3c7dc9f04037
- score: 0.98

How to use it:

When the account has access to Copilot code review and GitHub CLI v2.88.0 or later, add `@copilot` as a reviewer when editing or creating a pull request.

Examples:

```
gh pr edit <number|url|branch> --add-reviewer "@copilot"
```

```
gh pr create --reviewer "@copilot"
```

- why_it_matters: Request Copilot code review while editing an existing pull request or creating a new one.
- sources: <https://github.blog/changelog/2026-03-11-request-copilot-code-review-from-github-cli>, <https://cli.github.com/manual/gh_pr_edit>, <https://cli.github.com/manual/gh_pr_create>, <https://docs.github.com/en/copilot/concepts/agents/code-review>
- gotchas: "Version: v2.88.0 or later"; "Availability: Available on all plans that include Copilot code review."; "Requires Install or upgrade GitHub CLI to v2.88.0 or later."; "--add-reviewer <login>: Adds or re-requests a reviewer; use `@copilot` to request Copilot review. The flag takes a login when supplied."; "<number|url|branch>: Selects the pull request to edit; omitted target selection is supported by the command syntax."; "--reviewer <handle>: Requests reviews from people or teams by handle; use `@copilot` for Copilot as stated in the release note."; "Prerequisite: Use GitHub CLI v2.88.0 or later; Copilot code review must be available on the account's plan."; "Prerequisite: If Copilot is provided by an organization, its Copilot code review policy must be enabled."; "Interactive reviewer selection is available through the interactive prompts."; "Docs conflict: The current `gh pr edit` manual says `@copilot` review requests are not supported on GitHub Enterprise Server; the release note does not state that limitation."; "Docs conflict: The current `gh pr create` manual documents `--reviewer <handle>` generically but does not name `@copilot`; the Copilot reviewer option is documented in the supplied release note."

### gh browse opens blame view with --blame (2026-03-10)
- slug: gh-browse-opens-blame-view-with-blame-5379a7370c5f
- score: 0.97

How to use it:

When investigating a repository file’s history, run `gh browse <path> --blame` to open its blame view.

Examples:

```
gh browse <path> --blame
```

- why_it_matters: Open a repository file's blame view while investigating its history.
- sources: <https://github.com/cli/cli/releases/tag/v2.88.0>, <https://cli.github.com/manual/gh_browse>
- gotchas: "Version: v2.88.0"; "<path> (required): Repository file path to open."; "--blame: Open the file’s blame view."

### gh issue close links duplicates and sets the duplicate reason (2026-03-10)
- slug: gh-issue-close-links-duplicates-and-sets-the-duplicate-reason-a29ae44864c1
- score: 0.99

How to use it:

When closing an issue as a duplicate, run `gh issue close` with `--duplicate-of` and the original issue number or URL to link it. To set the duplicate close reason without linking an issue, use `--reason duplicate`.

Examples:

```
gh issue close <issue-number> --duplicate-of <original-issue-number-or-url>
```

```
gh issue close <issue-number> --reason duplicate
```

- why_it_matters: Close a repository issue as a duplicate while maintaining its issue status.
- sources: <https://github.com/cli/cli/releases/tag/v2.88.0>, <https://cli.github.com/manual/gh_issue_close>, <https://github.com/cli/cli/blob/v2.88.0/pkg/cmd/issue/close/close.go>, <https://cli.github.com/manual/gh_auth_login>
- gotchas: "Version: v2.88.0"; "<number> | <url> (required): Issue to close; provide its number or URL."; "--duplicate-of <string>: Mark the issue as a duplicate of another issue by number or URL."; "--reason <string>: Close reason: `completed`, `not planned`, or `duplicate`."; "Prerequisite: Authenticate `gh` with a GitHub host before use."; "Prerequisite: With `--duplicate-of`, the referenced item must be an issue; the v2.88.0 source rejects pull requests and the current issue itself."; "`--duplicate-of` accepts an issue number or URL."

### gh pr create and gh pr edit request Copilot Code Review (2026-03-10)
- slug: gh-pr-create-and-gh-pr-edit-request-copilot-code-review-25f28e64c1aa
- score: 0.96

How to use it:

When creating a pull request, request Copilot review with `gh pr create --reviewer @copilot` or select Copilot in the interactive reviewer prompt. For an existing pull request, use `gh pr edit [<number> | <url> | <branch>] --add-reviewer @copilot` (provide the PR number if its branch is not checked out).

Examples:

```
gh pr create --reviewer @copilot
```

```
gh pr edit <PR-NUMBER> --add-reviewer @copilot
```

- why_it_matters: Request Copilot Code Review when creating or editing a pull request.
- sources: <https://github.com/cli/cli/releases/tag/v2.88.0>, <https://docs.github.com/en/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review?tool=cli>, <https://cli.github.com/manual/gh_pr_create>, <https://cli.github.com/manual/gh_pr_edit>, <https://docs.github.com/en/pull-requests/how-tos/create-pull-requests/requesting-a-pull-request-review>
- gotchas: "Version: v2.88.0"; "gh pr create --reviewer <handle>: Request reviews from people or teams by handle; `@copilot` requests Copilot review."; "gh pr edit [<number> | <url> | <branch>]: Select the pull request to edit; without an argument, selects the pull request for the current branch."; "gh pr edit --add-reviewer <login>: Add or re-request a reviewer; `@copilot` requests Copilot review."; "Prerequisite: GitHub CLI must be installed and authenticated; access to Copilot is required."; "Prerequisite: Requesting a pull request review requires write access to the repository."; "Docs conflict: The current `gh pr edit` manual says `@copilot` review requests are not supported on GitHub Enterprise Server. The cited CLI Copilot review docs do not state this platform limitation."

### gh pr diff excludes selected files from diff output (2026-03-10)
- slug: gh-pr-diff-excludes-selected-files-from-diff-output-e9ae326eaa46
- score: 0.94

How to use it:

When reviewing a pull request, run `gh pr diff` with `--exclude` for each glob pattern to omit matching files from the diff output.

Examples:

```
gh pr diff <number> --exclude '*.yml' --exclude 'generated/*'
```

- why_it_matters: Review a pull request diff while omitting selected files from its output.
- sources: <https://github.com/cli/cli/releases/tag/v2.88.0>, <https://cli.github.com/manual/gh_pr_diff>
- gotchas: "Version: v2.88.0"; "<number>: Pull request number; without an argument, selects the pull request for the current branch."; "-e, --exclude <patterns>: Exclude files matching glob patterns; repeat the flag for multiple patterns. Patterns use forward slashes as path separators on all platforms."

### gh repo clone accepts --no-upstream (2026-03-10)
- slug: gh-repo-clone-accepts-no-upstream-f96f0b9da92a
- score: 0.93

How to use it:

When cloning a fork without an upstream remote, run `gh repo clone <repository> --no-upstream`.

Examples:

```
gh repo clone <fork> --no-upstream
```

- why_it_matters: Clone a repository without configuring an upstream remote.
- sources: <https://github.com/cli/cli/releases/tag/v2.88.0>, <https://cli.github.com/manual/gh_repo_clone>
- gotchas: "Version: v2.88.0"; "repository (required): Repository to clone; use OWNER/REPO, a GitHub URL, or another supported selector."; "--no-upstream: Do not add an upstream remote when cloning a fork; also skips setting the parent as the default remote."

### gh repo edit configures the squash-merge commit message (2026-03-10)
- slug: gh-repo-edit-configures-the-squash-merge-commit-message-59105f98aacc
- score: 0.96

How to use it:

When configuring a repository’s squash-merge behavior, run `gh repo edit` with `--squash-merge-commit-message` and one documented value. The flag is documented for use with `--enable-squash-merge`.

Examples:

```
gh repo edit <owner>/<repo> --enable-squash-merge --squash-merge-commit-message <default|pr-title|pr-title-commits|pr-title-description>
```

- why_it_matters: Edit repository settings to configure the squash-merge commit message.
- sources: <https://github.com/cli/cli/releases/tag/v2.88.0>, <https://cli.github.com/manual/gh_repo_edit>, <https://github.com/cli/cli/blob/v2.88.0/pkg/cmd/repo/edit/edit.go>
- gotchas: "Version: v2.88.0"; "<repository>: Repository in `OWNER/REPO` format; omit to use the current repository."; "--enable-squash-merge: Enables merging pull requests via squashed commit; the docs describe the message setting in this context."; "--squash-merge-commit-message <string>: Sets the default squash-merge commit message behavior. Allowed values: `default`, `pr-title`, `pr-title-commits`, `pr-title-description`."; "default: Uses commit title and message for one commit, or pull request title and commit list for two or more."; "pr-title: Uses the pull request title."; "pr-title-commits: Uses the pull request title and commit list."; "pr-title-description: Uses the pull request title and description."

### GitHub Actions artifacts support unzipped upload and download (2026-02-26)
- slug: github-actions-artifacts-support-unzipped-upload-and-download-f44cfccd3d08
- score: 0.94

How to use it:

When a workflow needs an unzipped artifact, upload one file with `actions/upload-artifact@v7` and `archive: false`. If the workflow downloads it with the download action, use `actions/download-artifact@v8` and specify the uploaded file name.

Examples:

```
- uses: actions/upload-artifact@v7
  with:
    path: <file>
    archive: false
```

```
- uses: actions/download-artifact@v8
  with:
    name: <uploaded-file-name>
```

- why_it_matters: When a workflow needs to preserve artifacts without automatic zipping, configure the upload and download actions for unzipped artifacts.
- before: Previously, upload-artifact automatically zipped artifacts; downloading with the action or browser also returned a zipped file.
- sources: <https://github.blog/changelog/2026-02-26-github-actions-now-supports-uploading-and-downloading-non-zipped-artifacts>, <https://github.com/actions/upload-artifact/blob/main/README.md>, <https://github.com/marketplace/actions/download-a-build-artifact>, <https://github.blog/changelog/2026-02-26-github-actions-now-supports-uploading-and-downloading-non-zipped-artifacts/>
- gotchas: "Version: actions/upload-artifact v7; actions/download-artifact v8 is required when using that action"; "upload path (required): File, directory, or wildcard path to upload. With `archive: false`, only one file can be uploaded."; "upload archive: Whether to zip the artifact files; defaults to `true`. Set to `false` for an unzipped upload."; "download name: Artifact name to download; for unzipped files, use the uploaded file name. If omitted, all artifacts for the run are downloaded."; "download path: Destination path; defaults to `$GITHUB_WORKSPACE`."; "download artifact-ids: Comma-separated artifact IDs. Use either `artifact-ids` or `name`, not both."; "Prerequisite: Use upload-artifact v7; if downloading with the action, use download-artifact v8."; "Prerequisite: The action documentation says upload-artifact v4+ and download-artifact v4+ are not supported on GitHub Enterprise Server."; "Only applies to artifacts uploaded with `actions/upload-artifact` v7 where `archive` is set to `false`."; "`archive` currently defaults to `true` for backwards compatibility."; "Previously uploaded artifacts and artifacts uploaded with older action versions continue to be zipped."; "Update to `actions/download-artifact` v8 if using that action."

### gh project item-list adds --query (2026-02-18)
- slug: gh-project-item-list-adds-query-0ed1d62d258f
- score: 0.97

How to use it:

When filtering project items, pass a Projects filter expression to `--query`; advanced search works only if the API host supports it.

Examples:

```
gh project item-list <number> --owner <owner> --query "label:bug -status:Done"
```

- why_it_matters: List project items filtered by a query.
- sources: <https://github.com/cli/cli/releases/tag/v2.87.0>, <https://cli.github.com/manual/gh_project_item-list>, <https://cli.github.com/manual/gh_project>
- gotchas: "Version: v2.87.0"; "<number>: Project number."; "--owner <string>: Project owner's login; use `@me` for the current user."; "--query <string>: Filter items using Projects filter syntax, such as `assignee:octocat -status:Done`."; "Prerequisite: GitHub Projects commands require the `project` token scope."

### gh copilot installs and runs GitHub Copilot CLI (2026-01-21)
- slug: gh-copilot-installs-and-runs-github-copilot-cli-d72169b5e018
- score: 0.97

How to use it:

To use Copilot CLI from a terminal, run `gh copilot`; on its first run, follow the prompt to install it. The command runs Copilot CLI and forwards arguments and flags that `gh` does not support.

Examples:

```
gh copilot [flags] [args]
```

- why_it_matters: Use GitHub Copilot CLI from a terminal while working in a repository with GitHub CLI users.
- sources: <https://github.blog/changelog/2026-01-21-install-and-use-github-copilot-cli-directly-from-the-github-cli>, <https://cli.github.com/manual/gh_help_reference>, <https://github.com/github/copilot-cli>
- gotchas: "Requires Run `gh copilot`; it prompts to install Copilot CLI on first run."; "flags and args: Arguments and flags not supported by `gh` are forwarded to Copilot CLI."; "--remove: Remove the downloaded Copilot CLI."; "Prerequisite: An active Copilot subscription; organization or enterprise users need Copilot CLI enabled by their administrator."; "The installation prompt occurs when `gh copilot` is run for the first time."; "Arguments and flags that the `gh` command does not support are forwarded to Copilot CLI."

### gh cache delete can delete all caches for a ref (2026-01-21)
- slug: gh-cache-delete-can-delete-all-caches-for-a-ref-0332e9a5061d
- score: 0.98

How to use it:

When deleting all GitHub Actions caches for a ref, run `gh cache delete --all --ref <ref>`; use a fully qualified branch or pull request ref.

Examples:

```
gh cache delete --all --ref refs/heads/<branch-name>
```

```
gh cache delete --all --ref refs/pull/<PR-number>/merge
```

- why_it_matters: Delete all GitHub Actions caches associated with a ref.
- sources: <https://github.com/cli/cli/releases/tag/v2.86.0>, <https://cli.github.com/manual/gh_cache_delete>
- gotchas: "Version: v2.86.0"; "--all (required): Delete all caches; combine with `--ref` to target one ref."; "--ref <string> (required): Target a ref formatted as `refs/heads/<branch name>` or `refs/pull/<number>/merge`."; "Prerequisite: Deletion requires authorization with the `repo` scope."

### gh browse adds --actions flag (2026-01-14)
- slug: gh-browse-adds-actions-flag-168b26db7812
- score: 0.94

How to use it:

To open the Actions page for a repository, run `gh browse --actions` from that repository. Use `--repo <HOST/OWNER/REPO>` to select another repository.

Examples:

```
gh browse --actions
```

```
gh browse --actions --repo <HOST/OWNER/REPO>
```

- why_it_matters: Open a repository's Actions page from the CLI.
- sources: <https://github.com/cli/cli/releases/tag/v2.85.0>, <https://cli.github.com/manual/gh_browse>
- gotchas: "Version: v2.85.0"; "--actions: Open repository Actions."; "--repo <HOST/OWNER/REPO>: Select another repository; format is [HOST/]OWNER/REPO."

### gh repo set-default accepts git remote names (2026-01-14)
- slug: gh-repo-set-default-accepts-git-remote-names-89c02178765f
- score: 0.93

How to use it:

When setting a local clone’s default repository to a named Git remote, run `gh repo set-default <remote-name>`.

Examples:

```
gh repo set-default origin
```

- why_it_matters: Set a repository's default using a named git remote.
- sources: <https://github.com/cli/cli/releases/tag/v2.85.0>, <https://cli.github.com/manual/gh_repo_set-default>
- gotchas: "Version: v2.85.0"; "<repository>: Repository to set as default; the documented example accepts a Git remote name."
