Use Git Worktrees
skill · v1.0.0
Ensure an isolated workspace exists for feature work via git worktrees. Creates a worktree at the canonical location before any implementation. Single-repo work: <repo>/.worktrees/<name>/. Cross-repo or persistent: ~/.ai/worktrees/<name>/. Use at the start of any non-trivial feature or before executing implementation plans.
Tags: gitworktreeisolation
Invocation contract
Inputs
branch_name(string, required) — The feature branch name (kebab-case).base_branch(string) — The base branch to branch from. Defaults to main.global(boolean) — When true, place at ~/.ai/worktrees/ (cross-repo/persistent). Defaults to false.
Outputs
worktree_path(string) — Absolute path to the created worktree.
Side effects
creates git worktreecreates feature branch