From majestic-engineer
Manages git worktrees via unified bash script for parallel development: creates isolated feature environments, lists/switches status, copies .env files, cleans up merged/stale worktrees.
How this skill is triggered — by the user, by Claude, or both
Slash command
/majestic-engineer:git-worktreeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides a unified interface for managing git worktrees, enabling isolated parallel development. Worktrees allow you to have multiple branches checked out simultaneously in separate directories.
This skill provides a unified interface for managing git worktrees, enabling isolated parallel development. Worktrees allow you to have multiple branches checked out simultaneously in separate directories.
Key features:
.env file copying from main repo to new worktrees.worktrees/ directoryAlways use the worktree-manager.sh script rather than raw git worktree commands. The script handles:
.env file copying to new worktrees.worktrees/ directory.gitignore managementAll operations use the unified worktree-manager.sh script:
bash scripts/worktree-manager.sh <command> [options]
worktree-manager.sh create <branch-name> [source-branch]
Creates a new worktree in .worktrees/<branch-name>. If the branch exists, it checks it out. If not, creates a new branch from the source (defaults to main/master).
worktree-manager.sh list
Shows all worktrees with their branch, commit, and status (clean/dirty/missing).
worktree-manager.sh switch <branch-name|path>
Provides information for switching to a worktree by branch name or path.
worktree-manager.sh cleanup [--force]
Identifies and removes:
Use --force to skip confirmation prompt.
worktree-manager.sh copy-env [worktree-path|branch-name]
Copies .env* files (excluding .env.example) from the main repo to a worktree. Useful for:
If run inside a worktree without arguments, copies to current location.
Worktrees are stored in .worktrees/ within the repository root. This directory is automatically added to .gitignore.
# Start new feature
worktree-manager.sh create feature-auth
# Work in the new worktree
cd .worktrees/feature-auth
# List all worktrees
worktree-manager.sh list
# When done, clean up
worktree-manager.sh cleanup
If you have existing worktrees created before the automatic env copying feature:
bash scripts/worktree-manager.sh copy-env feature-branch
Or from within the worktree directory:
bash scripts/worktree-manager.sh copy-env
npx claudepluginhub majesticlabs-dev/majestic-marketplace --plugin majestic-engineerManage Git worktrees for isolated parallel development. Automates creation, switching, and cleanup with .env copying and .gitignore management. Useful for code reviews and feature work.
Manages Git worktrees for parallel development: create from main with .env copying, list status, switch, cleanup interactively via bash script.
Manages git worktrees via bash script: create/list/switch/cleanup and copy .env files. Enables parallel feature work, isolated reviews, or clean workspaces.