From worktree-ops
Bring the current worktree's branch up to date with a base branch. "Pull" here means **integrate the base branch INTO this worktree** (not `git pull` of the branch's own upstream). Run it from inside the worktree.
How this skill is triggered — by the user, by Claude, or both
Slash command
/worktree-ops:pull-worktreeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Bring the current worktree's branch up to date with a base branch. "Pull" here means **integrate the base branch INTO this worktree** (not `git pull` of the branch's own upstream). Run it from inside the worktree.
Bring the current worktree's branch up to date with a base branch. "Pull" here means integrate the base branch INTO this worktree (not git pull of the branch's own upstream). Run it from inside the worktree.
At any step, if a required input is missing or the safe path is ambiguous, stop and use AskUserQuestion before acting — don't assume a default that rewrites history. Confirm when unclear:
--from is absent and the default base can't be resolved, ask;Run the helper — it reports state and never changes history:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/wt-pull-preflight.sh" [--from <branch>]
It prints branch=, inprogress=, dirty=, source=, fetched=, ahead=, behind= (plus any note=). Act on it:
inprogress set (exit code 3) → a rebase/merge is already underway; don't start another. Help finish it (resolve per §3) or abort (git rebase --abort / git merge --abort), then stop.dirty > 0 → don't integrate onto a dirty tree. Offer (via AskUserQuestion) to stash → integrate → pop, or commit/abort. If stashing, do all three; if the final git stash pop conflicts, resolve it under the §3 policy and don't drop the stash until clean.behind = 0 → already up to date; report and stop.source as the base.Default to rebase (linear history on a feature branch):
git rebase <source>
Use merge instead (git merge <source>) when --merge is passed, or the branch is already pushed and shared. If unclear, ask with AskUserQuestion.
A rebase replays commits one at a time, so conflicts can recur. List them deterministically (complete set + hunks):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/wt-conflicts.sh"
Repeat until the rebase finishes: review the reported conflicts, resolve, git add each, git rebase --continue (or commit, for a merge).
Resolution policy — defer to the user unless it is obvious and safe. Resolve a conflict yourself ONLY when the result is unambiguous and low-risk:
For anything else — overlapping edits to the same logic, deletion vs. edit, or any unclear intent — stop and ask with AskUserQuestion, showing the file and the "ours" vs. "theirs" hunks and the choices (keep ours / keep theirs / combine / I'll describe). Never assume which side is correct; when in doubt, treat it as ambiguous and ask.
Enforced, not just requested: while this skill is active, its
PreToolUseguard blocks anygit commit/--continuewhile unresolved conflicts or leftover conflict markers remain, so a partial or guessed resolution cannot be committed.git rebase --abort/git merge --abortis always the clean escape hatch.
State the new ahead/behind. A rebase rewrites history, so if the branch was already pushed it needs git push --force-with-lease — offer to do that push now so it isn't a forgotten step. Mention /worktree-ops:list-worktrees to confirm.
npx claudepluginhub zakattack9/agentic-coding --plugin worktree-opsCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.