feat: add /worktree skill — git worktree lifecycle management#588
Open
agi-bootstrap wants to merge 1 commit intogarrytan:mainfrom
Open
feat: add /worktree skill — git worktree lifecycle management#588agi-bootstrap wants to merge 1 commit intogarrytan:mainfrom
agi-bootstrap wants to merge 1 commit intogarrytan:mainfrom
Conversation
Adds a new skill for creating, merging, and cleaning up git worktrees for isolated feature development. Wraps Claude Code's built-in EnterWorktree/ExitWorktree with a structured workflow: base branch confirmation, dependency bootstrap, state tracking, and safe merge/clean with unmerged-work guards. Subcommands: start, merge, clean, list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/worktreeskill for git worktree lifecycle managementstart,merge,clean,listEnterWorktree/ExitWorktreewith a structured workflow: base branch confirmation, dependency bootstrap (npm/yarn/pnpm/bun/pip/poetry/bundler), state tracking via~/.gstack/worktree-active.json, and safe merge/clean with unmerged-work guardsWhy
Worktrees are central to the parallel sprint workflow described in the README — Conductor creates isolated workspaces,
/shipand/reviewrun in them. But there's no skill for the manual worktree lifecycle: starting a feature branch in isolation, merging it back, or discarding it safely. This fills that gap.What it does
/worktree start <name> [--from <branch>]/worktree merge/worktree clean [--force]--force), confirms with user, removes worktree + branch/worktree listSafety: merge gates on uncommitted changes, clean refuses to discard unmerged work without
--force, and even with--forceit confirms before deleting.Test plan
/worktree start test-feature— creates worktree, switches session, bootstraps deps/worktree list— shows the new worktree and active state/worktree merge— merges back to base branch/worktree start throwaway, then/worktree clean— refuses (has unmerged commit)/worktree clean --force— confirms and removes🤖 Generated with Claude Code