flow-next-worktree-kit
Manage git worktrees (create/list/switch/cleanup) and copy .env files. Use for parallel feature work, isolated review, clean workspace, or when user mentions worktrees.
When & Why to Use This Skill
The flow-next-worktree-kit is a specialized Git management tool designed to enhance developer productivity by automating worktree operations. It enables seamless creation, switching, and cleanup of isolated workspaces, allowing developers to handle multiple branches simultaneously without the overhead of constant stashing or context switching. By integrating environment variable synchronization, it ensures that new development environments are ready for immediate use, maintaining a clean and efficient coding workflow.
Use Cases
- Parallel Feature Development: Work on multiple features or bug fixes at the same time by creating dedicated worktrees for each branch, eliminating the need to stash or commit unfinished changes when switching tasks.
- Isolated Code Reviews: Check out pull requests into separate directories to perform thorough reviews and run tests in an isolated environment without disrupting your primary development workspace.
- Environment Configuration Sync: Automatically copy .env files to new worktrees during creation to ensure consistent local configurations and immediate project readiness across different branches.
- Workspace Maintenance: Efficiently manage local repository health by listing active worktrees and safely cleaning up completed task directories without risking data loss or branch deletion.
| name | flow-next-worktree-kit |
|---|---|
| description | Manage git worktrees (create/list/switch/cleanup) and copy .env files. Use for parallel feature work, isolated review, clean workspace, or when user mentions worktrees. |
Worktree kit
Use the manager script for all worktree actions.
bash ${CLAUDE_PLUGIN_ROOT}/skills/flow-next-worktree-kit/scripts/worktree.sh <command> [args]
Commands:
create <name> [base]listswitch <name>(prints path)cleanupcopy-env <name>
Safety notes:
createdoes not change the current branchcleanupdoes not force-remove worktrees and does not delete branchescleanupdeletes the worktree directory (including ignored files); removal fails if the worktree is not clean.env*is copied with no overwrite (symlinks skipped)- refuses to operate if
.worktrees/or any worktree path component is a symlink copy-envonly targets registered worktreesoriginfetch is optional; local base refs are allowed- fetch from
originonly when base looks like a branch - Worktrees live under
.worktrees/