一键导入
sync
Use this skill to sync a gh-stack stack with its remote and trunk. Triggers: sync, update from main, update from trunk, pull trunk, refresh stack.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill to sync a gh-stack stack with its remote and trunk. Triggers: sync, update from main, update from trunk, pull trunk, refresh stack.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use this skill to rebase gh-stack branches and resolve conflicts. Replaces raw git rebase for stack workflows. Triggers: restack, rebase, rebase on main, branches out of date, resolve conflicts.
Use this skill for GitHub Stacked PRs (gh-stack) stack status, branch creation, stack navigation, restructuring a stack, or general gh-stack operations. Replaces raw git checkout -b, git rebase, git push, and gh pr create for stack workflows.
Use this skill to push a gh-stack stack and create or update stacked pull requests. Replaces git push and gh pr create for stack workflows. Triggers: push, ship it, send this up, submit, update PRs, create PR, push stack, send PRs.
Use this skill for GitHub Stacked PRs (gh-stack) stack status, branch creation, stack navigation, restructuring a stack, or general gh-stack operations. Replaces raw git checkout -b, git rebase, git push, and gh pr create for stack workflows.
Use this skill to sync a gh-stack stack with its remote and trunk. Triggers: sync, update from main, update from trunk, pull trunk, refresh stack.
Create a new branch using the repo-preferred stack tool. Use when the user asks to start work, create a branch, switch to a new task branch, or begin an issue.
| name | sync |
| description | Use this skill to sync a gh-stack stack with its remote and trunk. Triggers: sync, update from main, update from trunk, pull trunk, refresh stack. |
| user-invocable | true |
| agent | general-purpose |
| allowed-tools | ["Bash(gh stack:*)","Bash(git status)","Skill"] |
Use gh stack sync to fetch, rebase, push, and refresh PR state in one pass. Do not use raw git pull plus git rebase for stack synchronization.
Command contracts are based on the upstream CLI reference at https://github.github.com/gh-stack/reference/cli/.
Check current stack state: gh stack view --short 2>&1.
Run sync:
gh stack sync 2>&1
Add --prune when the user asks to clean up local branches for merged PRs:
gh stack sync --prune 2>&1
If sync reports a rebase conflict, it restores every branch to its original state — use the restack skill to resolve the conflicts interactively.
If sync reports that the local and remote stacks have diverged, it aborts without pushing anything. Report the divergence and let the user choose: adopt the remote stack, delete the stack on GitHub and recreate it with submit, or restructure locally first.
Report the trunk update, branches rebased or pushed, PR statuses, and any pruned branches.
gh stack sync never opens new PRs — use the submit skill for that.