← ClaudeAtlas

merge-baselisted

This skill should be used when the user asks to "merge the base branch", "update this feature branch from base", or resolve conflicts while merging base into a feature branch.
lklimek/claudius · ★ 1 · Code & Development · score 74
Install: claude install-skill lklimek/claudius
# Merge Base Branch Merge the remote base branch into the current feature branch: pre-merge analysis, intelligent conflict resolution, behavioral change report. **Output philosophy**: be concise — summaries, not diffs or source code. Never dump raw diffs, full file contents, or initial state unless explicitly requested; the user will ask for details. ## Phase 1: Sync with Remote Fetch all remotes and pull tracked branch changes (merge mode, never rebase). ```bash CURRENT_BRANCH=$(git branch --show-current) TRACKING=$(git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "") git fetch --all --prune if [ -n "$TRACKING" ]; then git pull --no-rebase fi ``` If the pull produces conflicts, resolve them (see Phase 4) before continuing. ## Phase 2: Identify the Base Branch From PR metadata, using the `git-and-github` skill: ```bash BASE_BRANCH=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null) ``` If no PR exists, fall back to the repo default branch: ```bash BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@') ``` If neither works, ask the user. Merge from `origin/$BASE_BRANCH` (the remote-tracking ref, already updated by fetch) — not the local base branch, which may be stale. ## Phase 3: Pre-Merge Analysis Read diffs and logs internally to build context for conflict resolution and behavioral analysis (per Output philosophy — no diff/source output). ```bash MERGE_BASE=$(git merge-base origin/$BASE_B