
Gh Stack
Manage Cherry Studio stacked branches and pull requests with the GitHub gh-stack...
Install
npx skills add CherryHQ/cherry-studio --skill gh-stack -g -a claude-code -y- Repository
- CherryHQ/cherry-studio53.2k
- Category
- Git and review
- Updated
- 3d ago
- License
- AGPL-3.0
- Context cost
- Lightabout 1,284 tokens
- Runs scripts
- No, instructions only
What it does
Manage Cherry Studio stacked branches and pull requests with the GitHub gh-stack extension. Use for planning, creating, inspecting, rebasing, syncing, linking, or recovering a stack of dependent PRs.
GitHub Stack
Use gh stack for branch topology and synchronization. Use the repository's gh-create-pr skill for Cherry-specific PR bodies, Spec approval, AC coverage, verification, and Agent Note lifecycle.
Availability and prerequisites
This public skill is tracked in .agents/skills/ and discovered from the repository. Developers do not install a separate agent skill. pnpm skills:sync maintains the .claude/skills/ compatibility symlink.
Run this preflight before the first gh stack command in a task:
command -v gh >/dev/null 2>&1 || {
echo "GitHub CLI is required: https://cli.github.com/" >&2
exit 1
}
gh auth status
if ! gh stack --help >/dev/null 2>&1; then
gh extension install github/gh-stack
fi
gh stack --help >/dev/null
If GitHub CLI authentication, extension installation, or the final verification fails, stop and report the failing command. Do not guess stack topology with ad hoc branch comparisons.
Before initializing a stack, avoid extension prompts:
git config rerere.enabled true
When multiple remotes exist, resolve the intended remote and pass --remote <name> to commands that accept it. Do not silently change remote.pushDefault for the developer.
Stack model
A stack is a linear dependency chain. The bottom branch is closest to the trunk; each higher branch contains only work that depends on the layer below it.
main
-> spec
-> implementation-core
-> implementation-ui
Plan the complete dependency order before creating branches. Put a newly discovered lower-layer change on its owning branch, then rebase the upstack branches; do not hide it in the current layer.
Agent-safe commands
All commands must be non-interactive:

