From gosu-mcp-core
Utility tool to create new git worktrees with proper setup for development environments. Automates creation, copying, symlinking, and ownership management for smooth developer onboarding or isolated task/feature work.
npx claudepluginhub gosu-code/claude-plugin --plugin gosu-mcp-coreThis skill uses the workspace's default tool permissions.
This skill provides tools for creating and managing Git worktrees, handling both the setup of a clean environment and synchronization of relevant files (including gitignored or untracked files). The main entrypoint is the Python script `scripts/create_git_worktree.py`.
Creates isolated git worktrees for parallel development without disrupting the main workspace. Includes safety verification, .gitignore checks, and directory selection. Use for feature work or PR reviews.
Creates isolated git worktrees for feature branches with smart directory selection, gitignore checks, auto project setup detection, and baseline test verification. Use for task isolation from main workspace.
Creates isolated git worktrees for feature branches with directory selection, gitignore safety checks, multi-language project setup, and clean baseline verification.
Share bugs, ideas, or general feedback.
This skill provides tools for creating and managing Git worktrees, handling both the setup of a clean environment and synchronization of relevant files (including gitignored or untracked files). The main entrypoint is the Python script scripts/create_git_worktree.py.
git CLIpython3 scripts/create_git_worktree.py [prompt words ...] [--branch BRANCH | --worktree WORKTREE_DIR] [--plan-file FILE] [--agent-user USER] [--no-copy-staged] [--copy-modified] [--copy-untracked] [--worktree-parent-dir DIR] [--verbose]
prompt (positional, optional): Task description (used to generate branch name, and perform verification checks e.g., "fix login bug in auth module").--branch: Branch name for new worktree (overrides prompt-based naming)--base-branch: Base branch to create the new worktree from (local or remote). If not specified, worktree is created from current HEAD. Examples: develop, origin/main, release-1.0--worktree: Use an existing worktree directory path instead of creating a new one--plan-file: Optional project/plan file to copy into the worktree--agent-user: The OS user to set as owner of new worktree dir (for agent that run with a separate OS user)--no-copy-staged: Prevents copying staged files into the new worktree (default = copy staged files)--copy-modified: Also copy modified-but-not-staged files--copy-untracked: Also copy untracked files--worktree-parent-dir: The parent dir in which to place the new worktree dir--verbose, -v: Enable debug/verbose logging# Create a new worktree with a branch name based on the prompt
python3 scripts/create_git_worktree.py feature add user auth --plan-file path/to/plan.md --agent-user vscode --copy-untracked
# Create with explicit branch and copy all types of files
python3 scripts/create_git_worktree.py --branch feat/apply-fixes --copy-modified --copy-untracked
# Create worktree from a different base branch
python3 scripts/create_git_worktree.py implement new API --branch feature/new-api --base-branch develop
# Create worktree from remote branch
python3 scripts/create_git_worktree.py hotfix critical bug --branch hotfix/security-patch --base-branch origin/release-1.0
# Use an existing worktree dir created earlier
python3 scripts/create_git_worktree.py "apply patch" --worktree /workspaces/worktree-agent-no1 --plan-file path/to/plan.md
AskUserQuestion tool)git worktree list to ensure the worktree is actually created (regardless of whether the script output say success or not)git status inside the new worktree to check for active branch is correctly set to [branch_name].go mod verify if this is a Go project to ensure all dependencies are downloaded and valid.go work sync if this Go project is setup as a Go workspace with go.work file.npm list if this is a Node.js project to ensure all dependencies are installed.pnpm dedupe --check if this this Node.js project is using pnpmpython -m pip freeze -r requirements.txt if this is a Python project contain a requirements file.uv tree if this Python project is using uv--worktree-parent-dir (default: cwd's parent directory) and have the name "worktree-agent-no1" (or "worktree-agent-no2" and so on to avoid directory name conflicts)