基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SocketDev/action --skill gh-stack命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Propagate a wheelhouse template change across fleet repos: worktrees, push/PR fallback, cleanup.
Run this repo's GitHub Actions locally with Agent-CI before pushing CI-sensitive changes.
Audit package exports for dead, internal-only, or weakly-consumed subpaths before pruning.
| name | gh-stack |
| description | Runs gh stack for dependent PRs and preview feedback. |
| user-invocable | true |
| allowed-tools | AskUserQuestion, Bash(gh:*), Bash(git:*), Read |
| model | sonnet |
| context | fork |
Use GitHub's private-preview Stacked PRs feature to split one change into a linear chain of focused pull requests. Each branch is one review layer and targets the branch directly below it; the bottom branch targets trunk.
Keep one stack in one dedicated checkout. Branches and remote stack state can collide across worktrees, so never operate on the same stack concurrently.
Run every command and stop on the first failure:
git --version
gh --version
gh auth status
gh stack --version
Require:
gh) 2.0 or later.github/gh-stack extension at the version pinned by
external-tools.json. If missing or stale, install the pin with
gh extension install github/gh-stack --force --pin v<VERSION>.Before initializing a stack, make conflict handling non-interactive:
git config rerere.enabled true
Read reference.md before the first stack operation in a
session. Re-check gh stack <command> --help before using a destructive or
unfamiliar command because the extension is still in preview.
Write the branch chain from trunk to top. Put foundations low and dependents high:
main -> data-model -> api -> ui -> integration-tests
Each layer must be independently reviewable, have one concern, and pass its relevant checks. Use a separate stack for unrelated work. Confirm the intended trunk, remote, branch names, and layer boundaries before creating branches.
Supply every argument that avoids a prompt or TUI:
gh stack init --base main data-model
# Commit the data-model layer, then add and commit each dependent layer.
gh stack add api
gh stack add ui
gh stack view --json
gh stack submit --auto --remote origin
Rules:
init, add, and checkout.git add <paths> plus normal git commit; never default to
gh stack add -A or a repository-wide stage.--auto to submit and --remote <name> when remote choice is not
unambiguous.modify, switch, bare view, bare checkout, or
a prompt-producing form of submit from an agent session.submit, show and confirm the stack order, base branch,
remote, and PR readiness. PR creation and pushes are public mutations.gh stack view --json and the repo's relevant
checks. Do not infer success from exit code alone when output says a sync was
aborted.When review feedback belongs in a lower layer:
gh stack rebase --upstack so every dependent layer receives it.gh stack push --remote origin or
gh stack submit --auto --remote origin.On a rebase conflict, resolve only the reported files, stage them surgically,
then run gh stack rebase --continue. If intent is unclear, run
gh stack rebase --abort and report the blocker. Never replace this recovery
with an ad hoc force-push.
Treat a repeatable gh-stack defect as useful preview feedback:
gh stack <command> --help and reproduce once with the smallest safe
stack. Record the exact command, exit code, expected behavior, actual
behavior, and recovery outcome.git --version, gh --version, gh stack --version, OS, and a
sanitized gh stack view --json when available.reference.md. Remove
private repository names, branch names, URLs, tokens, customer data, commit
contents, and unrelated logs.gh stack feedback "<title>" to open GitHub's feedback
form, or post through an approved GitHub surface. Opening the form does not
submit it; confirm the final body and submission state.Do not silently work around a preview bug and lose the reproduction. Recover the user's stack first, then preserve a sanitized report.
The stack order matches its dependency order; every layer is focused and verified; local branches, PR bases, and GitHub's stack agree; no command waited for interactive input; and any reproducible preview defect has a sanitized, approved feedback draft or discussion link.