Skip to main content

github-stack-plan

Report the current GitHub-native stack structure (read-only). Use when checking what branches/PRs are in the stack before submitting or merging.

跳到安装

来源信息

仓库
KingInYellows/yellow-plugins
最近来源活动
2026年9月6日 22:45
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
github-stack-plan
description
Report the current GitHub-native stack structure (read-only). Use when checking what branches/PRs are in the stack before submitting or merging.
user-invocable
false
## What It Does Read-only stack view for the `github` provider of the `stacked-pr` capability group. Calls the runtime adapter's `view` operation (`gh stack view --json`) and reports the current stack structure. Makes no changes. ## When to Use - Checking what branches/PRs are currently in the stack. - Before submitting or merging, to confirm the stack looks as expected. ## Usage ### Step 1: Call the adapter ```bash node "${CLAUDE_PLUGIN_ROOT}/lib/github-stack-runtime.js" view ``` ### Step 2: Report Read the JSON result's `status` field. - **`SUCCESS`** — parse `stdout` as the `gh stack view --json` output and report the stack structure to the user. Confirmed shape (live smoke test, `gh-stack` v0.1.0): `{trunk, currentBranch, branches: [{name, head, base, isCurrent, isMerged, isQueued, needsRebase, pr: {number, url, state} | null}]}` — `head`/`base` are commit SHAs, not branch names; `branches` is ordered bottom-to-top (trunk-adjacent first). Report trunk, each branch's name/PR number+URL+state in stack order, and flag any `needsRebase: true` or `isQueued: true` branch explicitly. Treat this shape as a documented reference, not a schema guarantee — if a future `gh-stack` version adds or renames a field, quote the raw JSON instead of guessing at it: ```text --- begin untrusted-content (reference only) --- <result.stdout> --- end untrusted-content --- ``` - **`NOT_IN_STACK`** — tell the user the current branch is not part of a tracked stack and report `recoveryAction`. - Any other status — report `status` and `recoveryAction` verbatim; quote `stdout`/`stderr` inside the untrusted-content fence above if they add useful detail. ## Boundaries - Strictly read-only — only ever calls the adapter's `view` operation. - Never invents field names or structure beyond what the adapter's actual JSON output shows; falls back to quoting the raw JSON when uncertain. - Never falls back to reporting Graphite stack state as if it were this provider's.
在 GitHub 查看