← ClaudeAtlas

managing-development-brancheslisted

Covers the full lifecycle of a development branch — creating an isolated git worktree with systematic safety checks, resolving an in-progress merge/rebase conflict by intent, and closing out a finished branch (merge/PR/cleanup). Use when starting feature work that needs isolation from current branch, when `git status` shows unmerged paths or a merge/rebase is stuck on conflicts, or when implementation is complete and all tests pass and you need to decide how to integrate the work.
dariovr1/sixth-sense · ★ 1 · Code & Development · score 72
Install: claude install-skill dariovr1/sixth-sense
# Managing Development Branches Three phases of one lifecycle: **Setup** (isolate a workspace before starting), **Conflicts** (resolve one if it comes up mid-work), **Closure** (integrate and clean up once done). ## Setup ### When to Activate - After design approval and before writing implementation plans - Before executing tasks with parallel agent dispatching - Any time an isolated workspace for a new branch is required Announce: "I'm setting up an isolated workspace for this branch." ### The Process #### Step 1: Directory Selection Follow this priority order: 1. Check for existing `.worktrees/` directory (preferred/hidden) 2. Check for existing `worktrees/` directory 3. Check CLAUDE.md / GEMINI.md / AGENTS.md for directory preference 4. If none found, ask user to choose: - `.worktrees/` (project-local) - `~/.config/sixth-sense/worktrees/<project-name>/` (global location) #### Step 2: Safety Verification Verify the worktree directory is included in `.gitignore`: - **Why critical:** Prevents accidentally committing worktree contents to the repository - **If not ignored:** Add the path to `.gitignore`, commit the change, then proceed #### Step 2b: Uncommitted Work Check A worktree branches from the last **commit** on the source branch, not from the current working tree — any uncommitted or staged changes are invisible to it. Run `git status --short`: - **Clean:** proceed. - **Dirty:** stop and ask the user whether to commit (even a temporary WIP commit) or `git