[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DDW5NATT1505HSZCXHV0EP":3,"skill-same:01M7DDW5NATT1505HSZCXHV0EP":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7DDW5NATT1505HSZCXHV0EP","gh-stack",null,"Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack. Use for stack creation, viewing, edits, push, submit, sync, rebase, merge, or checkout; when asked to split or isolate work for review; whenever a user mentions a stack, branch layers, dependent PRs, or gh stack; or when a stack is checked out.","pascalandy\u002Fskills","pascalandy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6694151?v=4","01M7DDRR1T4AMR6J3FV6RHHV5M","Pascal Andy","01M7DDRR2B04BJ8S7QZYZV1WFK",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fgh-stack\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"gh-stack\"\ndescription: \"Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack. Use for stack creation, viewing, edits, push, submit, sync, rebase, merge, or checkout; when asked to split or isolate work for review; whenever a user mentions a stack, branch layers, dependent PRs, or gh stack; or when a stack is checked out.\"\nkind: \"dev\"\n---\n\n# gh-stack\n\nA stack is a chain of branches, or layers, on a trunk. Each layer has one PR based on the layer\nbelow, so a reviewer reads one layer at a time. `gh stack`, a GitHub CLI extension, builds stacks\nthat GitHub groups natively. `gh stack \u003Ccommand> --help` is authoritative for flags, and the\n[official guide](https:\u002F\u002Fgithub.github.com\u002Fgh-stack\u002F) for the rest. This skill holds what they\nleave out: the shape a project needs, how to run `gh stack` without a terminal, and what GitHub\nrefuses in a native stack.\n\n## Pick the shape\n\nAn active playbook decides which work to stack; this section decides how. Read how the project\nmerges in its `AGENTS.md`, then take the first case that matches:\n\n- **The parts touch the same lines, or cannot land apart:** one PR, no stack\n- **The project merges by pushing a head to its trunk, such as `git push origin \u003Cbranch>:main`:**\n  a [plain stack](#plain-stack), since GitHub refuses to retarget a PR in a native stack, so the\n  push would leave it open. When the project's land steps run `gh stack unstack` first, use a\n  [native stack](#native-stack), which [Land](#land) unstacks before the push\n- **Otherwise:** a [native stack](#native-stack)\n\nPlan the layers before writing code: one concern per layer, foundations at the bottom, each change\nin the lowest layer that needs it. A layer you cannot describe in one sentence is two layers. Name\nbranches `\u003Ctopic>\u002F\u003Cconcern>` unless the project has a convention. A stack is linear, so unrelated\nwork gets its own PR or stack.\n\nBranch the bottom layer from the remote trunk, since the local trunk can lag, for example when\nanother worktree holds it: `git fetch \u003Cremote>`, then `git switch -c \u003Cbottom> \u003Cremote>\u002F\u003Ctrunk>`.\n\nOpening PRs needs `gh auth status --active --hostname github.com` to pass; local layers do not.\nWhen it fails, push the layers with git, open no PR, and say the PRs wait for a signed-in `gh`.\n\nA stack is consistent when `git merge-base --is-ancestor \u003Clower> \u003Cupper>` succeeds for each pair of\nadjacent layers. Run each `git rebase --update-refs` from `\u003Ctop>`, the top layer checked out: git\nmoves the branch it rebases, but skips without an error every other branch checked out in a\nworktree when the rebase starts, the one you started from included. Check that the stack is\nconsistent before you push, and report a layer that another worktree holds instead of pushing it\nstale.\n\n## Native stack\n\nCheck `gh stack --version` first; when it fails, run `gh extension install github\u002Fgh-stack`. Once\nper clone, run `git config rerere.enabled true`, which `init` otherwise asks about under a\nterminal. With several remotes, set `git config remote.pushDefault \u003Cname>`.\n\nUnder a terminal, `gh stack` opens prompts or a full-screen view that block an agent forever.\nAlways run these forms:\n\n| Run | Instead of |\n|---|---|\n| `gh stack view --json` | `gh stack view` |\n| `gh stack init --base \u003Ctrunk> \u003Cbranch>...`, `gh stack add \u003Cbranch>` | `init` or `add` without a branch |\n| `gh stack submit --auto --open` | `gh stack submit` |\n| `gh stack sync > \u002Fdev\u002Fnull` | `gh stack sync`, which prompts on a divergence |\n| `gh stack merge \u003CPR or stack-number> --yes` | `gh stack merge` alone |\n| `gh stack checkout \u003Ctarget>`, `up`, `down`, `top`, `bottom` | `checkout` alone, `switch`, `modify` |\n\n1. **Start.** Branch the bottom layer as [Pick the shape](#pick-the-shape) says, then run\n   `gh stack init --base \u003Ctrunk> \u003Cbottom>`, which adopts it. Commit, then run `gh stack add \u003Cnext>`\n   for each layer above, which branches from the current layer, and commit there. Done when\n   `gh stack view --json` names `\u003Ctrunk>` as `trunk` and lists the layers bottom to top. Stop here\n   when the user asked for local layers only\n2. **Open the PRs.** Run `gh stack submit --auto --open`; `--auto` writes the titles, and\n   `gh pr edit \u003Cnumber>` changes one. `submit` and `sync` can exit 0 after a push or GitHub\n   failed. Done when, after `git fetch \u003Cremote>`, `git rev-parse \u003Clayer> \u003Cremote>\u002F\u003Clayer>` prints\n   one commit twice for each layer, `gh pr view \u003Cnumber> --json baseRefName,isDraft` shows each PR\n   ready and based on the layer below, and, from two PRs up,\n   `gh api 'repos\u002F{owner}\u002F{repo}\u002Fstacks?pull_request=\u003Cbottom PR>' --jq '.[] | {number, prs: [.pull_requests[].number]}'`\n   lists every PR bottom to top; no output means GitHub holds no stack\n3. **Change a layer.** Check out the layer that owns the change, found with `gh stack view --json`\n   or `git log --all -- \u003Cpath>`, and commit there. Then run `gh stack rebase --upstack`, or\n   `gh stack rebase --upstack --no-trunk` when another worktree holds the trunk, as\n   `git worktree list` shows, and `gh stack push`, or follow [Force pushes](#force-pushes). Done\n   when the stack is consistent from that layer up and step 2's check passes\n4. **Sync with the trunk.** When another worktree holds the trunk, leave it alone, since `sync` and\n   `rebase` without `--no-trunk` can fast-forward it there: run `git fetch \u003Cremote>`, then, from\n   `\u003Ctop>`, `git rebase --update-refs \u003Cremote>\u002F\u003Ctrunk> \u003Ctop>`, check that the stack is consistent,\n   and run `gh stack push`. Otherwise run `gh stack sync > \u002Fdev\u002Fnull`. Done when stderr has no\n   `Sync aborted`, `git merge-base --is-ancestor \u003Cremote>\u002F\u003Ctrunk> \u003Cbottom>` succeeds, and step 2's\n   check passes\n\nTo stack open PRs, or a new PR on an open PR in no stack, run\n`gh stack link --open --base \u003Cbottom PR's base> \u003CPR or branch>...`, bottom to top; without\n`--base`, `link` retargets the bottom PR to the default branch.\n`gh stack link --open \u003Cstack-number> \u003Cbranch>` appends a layer to an existing stack. `link` tracks\nnothing locally, so run `gh stack checkout \u003Cstack-number>` before a local `gh stack` command.\n\nGitHub refuses, in a native stack:\n\n- `gh pr merge` on any PR: land with `gh stack merge`\n- a draft in `gh stack merge`: pass `--open` to `submit` or `link`\n- `gh pr edit --base` on any PR: run `gh stack unstack \u003Cstack-number>` first, which keeps the PRs\n  and branches, retarget, then relink with\n  `gh stack link --open --base \u003Ctrunk> \u003CPRs bottom to top>` when the stack should stay. Once a PR\n  of the stack merged, `unstack` leaves the stack in place, and step 2's `gh api` check still\n  prints it\n\n## Plain stack\n\nUse git and `gh pr` only, no `gh stack` command, so GitHub never groups the PRs.\n\n1. Branch each layer from the one below, commit, and push it. Open its PR with\n   `gh pr create --fill --base \u003Clayer below>`, or `--base \u003Ctrunk>` for the bottom one. Done when\n   `gh pr view \u003Cnumber> --json baseRefName` names the layer below for each PR\n2. To change a layer, commit on it, then, from `\u003Ctop>`, run `git rebase --update-refs \u003Clayer> \u003Ctop>`,\n   which replays the layers above and moves their branches. When you amended or rebased the layer\n   instead, run `git rebase --update-refs --onto \u003Clayer> \u003Cits old tip> \u003Ctop>`. To take in the\n   trunk, run `git fetch \u003Cremote>` and `git rebase --update-refs \u003Cremote>\u002F\u003Ctrunk> \u003Ctop>`. To fold\n   fixes committed on `\u003Ctop>` with `git commit --fixup=\u003Ccommit>` into their layers, run\n   `top_before=$(git rev-parse HEAD)` after the last fixup, then\n   `GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash --update-refs \"$(git merge-base \u003Cremote>\u002F\u003Ctrunk> \u003Cbottom>)\"`,\n   and check that `git diff --exit-code \"$top_before\" HEAD` exits 0: a conflict resolved wrong can\n   drop a line while the stack stays consistent. Push each moved branch with\n   `git push --force-with-lease \u003Cremote> \u003Cbranch>...`, or follow [Force pushes](#force-pushes).\n   Done when the stack is consistent\n\n## Force pushes\n\n`gh stack submit`, `sync`, `push`, and `rebase` rewrite or force-push layers, with\n`--force-with-lease`. When a rule says to ask before any force push and a layer is already on the\nremote, add commits instead: commit on the owning layer and run `git push \u003Cremote> \u003Clayer>`. Then,\nfor each layer above, bottom to top, run `git switch \u003Cupper>`,\n`git merge --no-ff --no-edit \u003Clayer below>`, and `git push \u003Cremote> \u003Cupper>`. To take in the trunk,\nmerge `\u003Cremote>\u002F\u003Ctrunk>` into the bottom layer the same way, instead of `sync` or a rebase.\n\n## Land\n\nLand the PRs you were asked to land, from the bottom. Done when `gh pr view \u003Cnumber> --json state`\nprints `MERGED` for each of them and, for each PR merged outside the default branch, you reported\nevery issue its closing keywords name that is still open, as the last item below says.\n\nWhen the bottom PR's base is a branch whose own PR merged outside the stack, retarget the bottom\nPR to the trunk first, in a native stack as the refusals above say.\n\n- **The project merges through GitHub:** in a native stack, `gh stack merge \u003CPR> --yes` with the\n  project's method flag, such as `--squash`, lands that PR and every unmerged PR below it, all or\n  nothing unless a merge queue takes them; a stack number lands the whole stack. Pass the method\n  each time, since the last one used is reused otherwise. A plain stack lands with the project's\n  merge command, one PR at a time. After each merge, run `gh pr edit \u003Cnext> --base \u003Ctrunk>`, then,\n  from `\u003Ctop>`, `git rebase --update-refs --onto \u003Cremote>\u002F\u003Ctrunk> \u003Cmerged layer's old tip> \u003Ctop>`,\n  and push the moved branches\n- **The project merges by pushing a head to its trunk:** in a native stack, first run\n  `gh stack unstack \u003Cstack-number>`. Then retarget every PR to the trunk, bottom to top, with\n  `gh pr edit \u003Cnumber> --base \u003Ctrunk>`, push every layer you rebased, and apply the project's method\n  once to the top layer. A PR turns `MERGED` when its head on GitHub reaches its base. When the\n  stack remains after the unstack, apply the method, then, for each PR still open, bottom to top,\n  run `git push \u003Cremote> \u003Clayer>:refs\u002Fheads\u002F\u003Clayer below>`, a fast-forward that marks it merged\n  into the layer below. GitHub ignores the closing keywords of a PR whose base is not the default\n  branch, so list the issues each such PR body names with a closing keyword, as `#N` in the PR's\n  repository or `owner\u002Frepo#N`, check each with `gh issue view \u003CN> -R \u003Cowner\u002Frepo> --json state`,\n  and report every one still open with its PR\n\n## Recovery\n\n- **Exit 3, a rebase conflict:** after `gh stack rebase`, resolve the files, run `git add`, then\n  `gh stack rebase --continue`, or `--abort` to restore every layer. After `gh stack sync`, the\n  stack is already restored: run `gh stack rebase` to replay the conflict\n- **Exit 9:** stacked PRs are off for the repository; use a plain stack\n- **`Sync aborted`, the local and GitHub stacks diverged:** keep GitHub's with\n  `gh stack unstack --local` and `gh stack checkout \u003Cstack-number>`, or rebuild from the local\n  branches as the next item says\n- **Rebuild from local branches, or reorder or drop a layer:** rewrite the branches with git, run\n  `gh stack unstack`, which also drops local tracking, then\n  `gh stack init --base \u003Ctrunk> \u003Cbranches bottom to top>`, which adopts them, and\n  `gh stack submit --auto --open`\n- **Another exit code:** read stderr, then the\n  [CLI reference](https:\u002F\u002Fgithub.github.com\u002Fgh-stack\u002Freference\u002Fcli\u002F)\n","# gh-stack\n\nA stack is a chain of branches, or layers, on a trunk. Each layer has one PR based on the layer\nbelow, so a reviewer reads one layer at a time. `gh stack`, a GitHub CLI extension, builds stacks\nthat GitHub groups natively. `gh stack \u003Ccommand> --help` is authoritative for flags, and the\n[official guide](https:\u002F\u002Fgithub.github.com\u002Fgh-stack\u002F) for the rest. This skill holds what they\nleave out: the shape a project needs, how to run `gh stack` without a terminal, and what GitHub\nrefuses in a native stack.\n\n## Pick the shape\n\nAn active playbook decides which work to stack; this section decides how. Read how the project\nmerges in its `AGENTS.md`, then take the first case that matches:\n\n- **The parts touch the same lines, or cannot land apart:** one PR, no stack\n- **The project merges by pushing a head to its trunk, such as `git push origin \u003Cbranch>:main`:**\n  a [plain stack](#plain-stack), since GitHub refuses to retarget a PR in a native stack, so the\n  push would leave it open. When the project's land steps run `gh stack unstack` first, use a\n  [native stack](#native-stack), which [Land](#land) unstacks before the push\n- **Otherwise:** a [native stack](#native-stack)\n\nPlan the layers before writing code: one concern per layer, foundations at the bottom, each change\nin the lowest layer that needs it. A layer you cannot describe in one sentence is two layers. Name\nbranches `\u003Ctopic>\u002F\u003Cconcern>` unless the project has a convention. A stack is linear, so unrelated\nwork gets its own PR or stack.\n\nBranch the bottom layer from the remote trunk, since the local trunk can lag, for example when\nanother worktree holds it: `git fetch \u003Cremote>`, then `git switch -c \u003Cbottom> \u003Cremote>\u002F\u003Ctrunk>`.\n\nOpening PRs needs `gh auth status --active --hostname github.com` to pass; local layers do not.\nWhen it fails, push the layers with git, open no PR, and say the PRs wait for a signed-in `gh`.\n\nA stack is consistent when `git merge-base --is-ancestor \u003Clower> \u003Cupper>` succeeds for each pair of\nadjacent layers. Run each `git rebase --update-refs` from `\u003Ctop>`, the top layer checked out: git\nmoves the branch it rebases, but skips without an error every other branch checked out in a\nworktree when the rebase starts, the one you started from included. Check that the stack is\nconsistent before you push, and report a layer that another worktree holds instead of pushing it\nstale.\n\n## Native stack\n\nCheck `gh stack --version` first; when it fails, run `gh extension install github\u002Fgh-stack`. Once\nper clone, run `git config rerere.enabled true`, which `init` otherwise asks about under a\nterminal. With several remotes, set `git config remote.pushDefault \u003Cname>`.\n\nUnder a terminal, `gh stack` opens prompts or a full-screen view that block an agent forever.\nAlways run these forms:\n\n| Run | Instead of |\n|---|---|\n| `gh stack view --json` | `gh stack view` |\n| `gh stack init --base \u003Ctrunk> \u003Cbranch>...`, `gh stack add \u003Cbranch>` | `init` or `add` without a branch |\n| `gh stack submit --auto --open` | `gh stack submit` |\n| `gh stack sync > \u002Fdev\u002Fnull` | `gh stack sync`, which prompts on a divergence |\n| `gh stack merge \u003CPR or stack-number> --yes` | `gh stack merge` alone |\n| `gh stack checkout \u003Ctarget>`, `up`, `down`, `top`, `bottom` | `checkout` alone, `switch`, `modify` |\n\n1. **Start.** Branch the bottom layer as [Pick the shape](#pick-the-shape) says, then run\n   `gh stack init --base \u003Ctrunk> \u003Cbottom>`, which adopts it. Commit, then run `gh stack add \u003Cnext>`\n   for each layer above, which branches from the current layer, and commit there. Done when\n   `gh stack view --json` names `\u003Ctrunk>` as `trunk` and lists the layers bottom to top. Stop here\n   when the user asked for local layers only\n2. **Open the PRs.** Run `gh stack submit --auto --open`; `--auto` writes the titles, and\n   `gh pr edit \u003Cnumber>` changes one. `submit` and `sync` can exit 0 after a push or GitHub\n   failed. Done when, after `git fetch \u003Cremote>`, `git rev-parse \u003Clayer> \u003Cremote>\u002F\u003Clayer>` prints\n   one commit twice for each layer, `gh pr view \u003Cnumber> --json baseRefName,isDraft` shows each PR\n   ready and based on the layer below, and, from two PRs up,\n   `gh api 'repos\u002F{owner}\u002F{repo}\u002Fstacks?pull_request=\u003Cbottom PR>' --jq '.[] | {number, prs: [.pull_requests[].number]}'`\n   lists every PR bottom to top; no output means GitHub holds no stack\n3. **Change a layer.** Check out the layer that owns the change, found with `gh stack view --json`\n   or `git log --all -- \u003Cpath>`, and commit there. Then run `gh stack rebase --upstack`, or\n   `gh stack rebase --upstack --no-trunk` when another worktree holds the trunk, as\n   `git worktree list` shows, and `gh stack push`, or follow [Force pushes](#force-pushes). Done\n   when the stack is consistent from that layer up and step 2's check passes\n4. **Sync with the trunk.** When another worktree holds the trunk, leave it alone, since `sync` and\n   `rebase` without `--no-trunk` can fast-forward it there: run `git fetch \u003Cremote>`, then, from\n   `\u003Ctop>`, `git rebase --update-refs \u003Cremote>\u002F\u003Ctrunk> \u003Ctop>`, check that the stack is consistent,\n   and run `gh stack push`. Otherwise run `gh stack sync > \u002Fdev\u002Fnull`. Done when stderr has no\n   `Sync aborted`, `git merge-base --is-ancestor \u003Cremote>\u002F\u003Ctrunk> \u003Cbottom>` succeeds, and step 2's\n   check passes\n\nTo stack open PRs, or a new PR on an open PR in no stack, run\n`gh stack link --open --base \u003Cbottom PR's base> \u003CPR or branch>...`, bottom to top; without\n`--base`, `link` retargets the bottom PR to the default branch.\n`gh stack link --open \u003Cstack-number> \u003Cbranch>` appends a layer to an existing stack. `link` tracks\nnothing locally, so run `gh stack checkout \u003Cstack-number>` before a local `gh stack` command.\n\nGitHub refuses, in a native stack:\n\n- `gh pr merge` on any PR: land with `gh stack merge`\n- a draft in `gh stack merge`: pass `--open` to `submit` or `link`\n- `gh pr edit --base` on any PR: run `gh stack unstack \u003Cstack-number>` first, which keeps the PRs\n  and branches, retarget, then relink with\n  `gh stack link --open --base \u003Ctrunk> \u003CPRs bottom to top>` when the stack should stay. Once a PR\n  of the stack merged, `unstack` leaves the stack in place, and step 2's `gh api` check still\n  prints it\n\n## Plain stack\n\nUse git and `gh pr` only, no `gh stack` command, so GitHub never groups the PRs.\n\n1. Branch each layer from the one below, commit, and push it. Open its PR with\n   `gh pr create --fill --base \u003Clayer below>`, or `--base \u003Ctrunk>` for the bottom one. Done when\n   `gh pr view \u003Cnumber> --json baseRefName` names the layer below for each PR\n2. To change a layer, commit on it, then, from `\u003Ctop>`, run `git rebase --update-refs \u003Clayer> \u003Ctop>`,\n   which replays the layers above and moves their branches. When you amended or rebased the layer\n   instead, run `git rebase --update-refs --onto \u003Clayer> \u003Cits old tip> \u003Ctop>`. To take in the\n   trunk, run `git fetch \u003Cremote>` and `git rebase --update-refs \u003Cremote>\u002F\u003Ctrunk> \u003Ctop>`. To fold\n   fixes committed on `\u003Ctop>` with `git commit --fixup=\u003Ccommit>` into their layers, run\n   `top_before=$(git rev-parse HEAD)` after the last fixup, then\n   `GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash --update-refs \"$(git merge-base \u003Cremote>\u002F\u003Ctrunk> \u003Cbottom>)\"`,\n   and check that `git diff --exit-code \"$top_before\" HEAD` exits 0: a conflict resolved wrong can\n   drop a line while the stack stays consistent. Push each moved branch with\n   `git push --force-with-lease \u003Cremote> \u003Cbranch>...`, or follow [Force pushes](#force-pushes).\n   Done when the stack is consistent\n\n## Force pushes\n\n`gh stack submit`, `sync`, `push`, and `rebase` rewrite or force-push layers, with\n`--force-with-lease`. When a rule says to ask before any force push and a layer is already on the\nremote, add commits instead: commit on the owning layer and run `git push \u003Cremote> \u003Clayer>`. Then,\nfor each layer above, bottom to top, run `git switch \u003Cupper>`,\n`git merge --no-ff --no-edit \u003Clayer below>`, and `git push \u003Cremote> \u003Cupper>`. To take in the trunk,\nmerge `\u003Cremote>\u002F\u003Ctrunk>` into the bottom layer the same way, instead of `sync` or a rebase.\n\n## Land\n\nLand the PRs you were asked to land, from the bottom. Done when `gh pr view \u003Cnumber> --json state`\nprints `MERGED` for each of them and, for each PR merged outside the default branch, you reported\nevery issue its closing keywords name that is still open, as the last item below says.\n\nWhen the bottom PR's base is a branch whose own PR merged outside the stack, retarget the bottom\nPR to the trunk first, in a native stack as the refusals above say.\n\n- **The project merges through GitHub:** in a native stack, `gh stack merge \u003CPR> --yes` with the\n  project's method flag, such as `--squash`, lands that PR and every unmerged PR below it, all or\n  nothing unless a merge queue takes them; a stack number lands the whole stack. Pass the method\n  each time, since the last one used is reused otherwise. A plain stack lands with the project's\n  merge command, one PR at a time. After each merge, run `gh pr edit \u003Cnext> --base \u003Ctrunk>`, then,\n  from `\u003Ctop>`, `git rebase --update-refs --onto \u003Cremote>\u002F\u003Ctrunk> \u003Cmerged layer's old tip> \u003Ctop>`,\n  and push the moved branches\n- **The project merges by pushing a head to its trunk:** in a native stack, first run\n  `gh stack unstack \u003Cstack-number>`. Then retarget every PR to the trunk, bottom to top, with\n  `gh pr edit \u003Cnumber> --base \u003Ctrunk>`, push every layer you rebased, and apply the project's method\n  once to the top layer. A PR turns `MERGED` when its head on GitHub reaches its base. When the\n  stack remains after the unstack, apply the method, then, for each PR still open, bottom to top,\n  run `git push \u003Cremote> \u003Clayer>:refs\u002Fheads\u002F\u003Clayer below>`, a fast-forward that marks it merged\n  into the layer below. GitHub ignores the closing keywords of a PR whose base is not the default\n  branch, so list the issues each such PR body names with a closing keyword, as `#N` in the PR's\n  repository or `owner\u002Frepo#N`, check each with `gh issue view \u003CN> -R \u003Cowner\u002Frepo> --json state`,\n  and report every one still open with its PR\n\n## Recovery\n\n- **Exit 3, a rebase conflict:** after `gh stack rebase`, resolve the files, run `git add`, then\n  `gh stack rebase --continue`, or `--abort` to restore every layer. After `gh stack sync`, the\n  stack is already restored: run `gh stack rebase` to replay the conflict\n- **Exit 9:** stacked PRs are off for the repository; use a plain stack\n- **`Sync aborted`, the local and GitHub stacks diverged:** keep GitHub's with\n  `gh stack unstack --local` and `gh stack checkout \u003Cstack-number>`, or rebuild from the local\n  branches as the next item says\n- **Rebuild from local branches, or reorder or drop a layer:** rewrite the branches with git, run\n  `gh stack unstack`, which also drops local tracking, then\n  `gh stack init --base \u003Ctrunk> \u003Cbranches bottom to top>`, which adopts them, and\n  `gh stack submit --auto --open`\n- **Another exit code:** read stderr, then the\n  [CLI reference](https:\u002F\u002Fgithub.github.com\u002Fgh-stack\u002Freference\u002Fcli\u002F)\n",{"kind":24,"name":5,"description":7},"dev","main","c2b929d1a54305e77aad0296872e90e08d68a637","authoring\u002Fandy\u002Fgh-stack",1,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills","https:\u002F\u002Fgithub.com\u002Fpascalandy","https:\u002F\u002Fblog.pascalandy.com","The question: how can I build the default one-stop place where entrepreneurs can start their mobile-first websites and blog? Psst psst… play-with-ghost.com","2026-11-15 03:34:59",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add pascalandy\u002Fskills --skill gh-stack",{"tool":40,"command":41},"bunx","bunx skills add pascalandy\u002Fskills --skill gh-stack",{"tool":43,"command":44},"pnpm","pnpm dlx skills add pascalandy\u002Fskills --skill gh-stack","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fgh-stack\u002FSKILL.md",true,[48,54,58,64,68,72],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"evals\u002Fevals.json","REFERENCE","参考文档",2079,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fgh-stack\u002Fevals\u002Fevals.json",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"evals\u002Ffixtures\u002Fagents-md.md",171,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fgh-stack\u002Fevals\u002Ffixtures\u002Fagents-md.md",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"evals\u002Ffixtures\u002Ffirst-layer.sh","SCRIPT","脚本",612,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fgh-stack\u002Fevals\u002Ffixtures\u002Ffirst-layer.sh",{"path":65,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":66,"sourceHtmlUrl":67},"evals\u002Ffixtures\u002Fpushed-stack.sh",887,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fgh-stack\u002Fevals\u002Ffixtures\u002Fpushed-stack.sh",{"path":69,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":70,"sourceHtmlUrl":71},"evals\u002Ffixtures\u002Fstale-trunk.sh",696,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fgh-stack\u002Fevals\u002Ffixtures\u002Fstale-trunk.sh",{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002FLICENSE","LICENSE","许可证",1060,"https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fauthoring\u002Fandy\u002Fgh-stack\u002Freferences\u002FLICENSE",[79,86,93,100,107,114],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7DEA67FREYEGQJYTWD9D0GB","writing-great-skills","Use when creating, modifying, evaluating a skill.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-great-skills\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7DEA3ZN566HSV6YJ8KPE824","writing-for-agents","Use when creating, editing, or reviewing a skill, AGENTS.md, CLAUDE.md, or another document agents read.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7DEA0FRE0FEYV9XS0YTTBPJ","why","Use for questions about design rationale, the history of regressions or incidents, or the evidence behind thresholds and tradeoffs. Use `how` for runtime behavior. Do not use for plain commit or date lookups.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7DE9XVZASJS9PC1A5BVMVHG","verify-video-archive","Use when validating the macOS or Linux archive workflow reached by `just convert-video`, including real media, prerequisites, terminal progress, source safety, locking, and recovery.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fverify-video-archive\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":19},"01M7DE9VTG6ZEQH1M10J66T8MR","verify-transcript","Use when validating transcript CLI behavior, locating its verification features, or running the paid YouTube end-to-end check.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fverify-transcript\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":19},"01M7DE9RWQ6WNVG455HQFHVNFR","verify-skills","Use when verifying `just compile-skills`, `just remote-skills`, `just install-skills`, or `just skills-discover` in the skills repository, such as after changing their scripts or adding, renaming, or moving a skill.","https:\u002F\u002Fgithub.com\u002Fpascalandy\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fverify-skills\u002FSKILL.md",[],[]]