update-base-branch

Installation
SKILL.md

Update Base Branch

Move the current worktree onto its intended base branch and update it without discarding work or guessing across ambiguous branches, remotes, or worktrees.

Protect the current worktree

Inspect the branch, status, and worktrees. If dirty, assess the target and upstream read-only, then report any ambiguity with the request to commit or stash local work. Fetch or switch only after verifying a clean worktree; never stash automatically.

Resolve the target

  1. Inspect local and remote branches and upstream configuration.
  2. Use a branch the user named. Otherwise select the current worktree's established base or integration branch when repository evidence makes it unambiguous. Treat an available dev branch as the usual default candidate, not as permission to ignore conflicting evidence.
  3. Ask the user which branch to use when the target remains ambiguous. Include the likely candidates and their upstreams.
  4. Keep the operation inside the current worktree. If the desired branch is checked out in another worktree, ask for a different worktree-specific base branch or tell the user to run the operation in the owning worktree. Do not update the other worktree implicitly.

Resolve the upstream

Installs
14
GitHub Stars
1
First Seen
Aug 12, 2026
update-base-branch — sjunepark/agent-scripts