| name | yak |
|---|---|
| description | Stacked PR workflow. Use when the user wants to pause for a quick yak, insert a yak branch beneath current work, create stacked branches, sync a stack, or create a PR. TRIGGER when: user says "yak", "stack", "sync", "stack-pr", or talks about stacking PRs/branches. |
| argument-hint | <yak|stack|sync|stack-pr|tree|done|continue|abort|install> [branch-name|title] |
| allowed-tools | Bash(git *) Bash(gh *) Bash(${CLAUDE_SKILL_DIR}/install.sh *) Bash(chmod *) |
Interpret $ARGUMENTS to decide which command to run.
git yak <name> # pause for a quick yak on the current branch
git yak --branch <name> # insert a yak branch beneath current work
git yak --done # finish the yak
git yak --continue # resume after resolving a rebase conflict (--branch only)
git yak --abort # cancel the yak and discard its commits
git stack <name> # create a new branch on top of the current one
git sync # rebase the stack, auto-detect and remove merged branches
git sync <branch> # rebase after a specific branch was merged
git sync --continue # resume after resolving a rebase conflict
git sync --abort # cancel and restore everything
git stack-pr <title> # push and create a PR for the bottom branch (requires gh)
git stack-tree # print the branch stack/yak fix-auth→git yak fix-auth/yak stack part-2→git stack part-2/yak sync→git sync/yak sync part-1→git sync part-1/yak stack-pr "Add feature"→git stack-pr "Add feature"/yak tree→git stack-tree/yak done→git yak --done/yak continue→ checkgit config yak.in-progressorgit config sync.in-progressto decidegit yak --continueorgit sync --continue/yak abort→ same check, thengit yak --abortorgit sync --abort/yak install→${CLAUDE_SKILL_DIR}/install.sh/yakwith no args → rungit stack-treeand report status
- Branch relationships are stored in
branch.<name>.stack-parentgit config. stack-prfinds the bottom branch automatically — run it from any branch in the stack.- Rerere is enabled automatically so repeated conflicts resolve themselves.
- Always use
--force-with-lease(never--force) when pushing. - When a rebase conflicts, guide the user to resolve, then
--continue.