From PACT
Creates isolated git worktree with feature branch for PACT workflows. Use for starting new features, orchestrate/comPACT, ATOMIZE sub-scope isolation, or manual work isolation.
npx claudepluginhub synaptic-labs-ai/pact-plugin --plugin PACTThis skill uses the workspace's default tool permissions.
Create an isolated git worktree with a feature branch for PACT workflows. This provides filesystem isolation so multiple features or sub-scopes can run in parallel without interference.
Sets up isolated workspaces for feature work using native tools or git worktrees. Detects existing isolation first and skips creation if already in one.
Sets up isolated workspaces for feature work using native tools or git worktrees, detecting existing isolation first and protecting main branch.
Creates isolated git worktrees for feature branches with smart directory selection, gitignore safety verification, project setup, and baseline tests. Use before isolated feature work.
Share bugs, ideas, or general feedback.
Create an isolated git worktree with a feature branch for PACT workflows. This provides filesystem isolation so multiple features or sub-scopes can run in parallel without interference.
/PACT:orchestrate, /PACT:comPACT)Follow these steps in order. Stop and report any errors to the user.
Before creating anything, check if a worktree already exists for this branch.
git worktree list
git worktree prune first and proceed to create a new one.{branch} already exists. Check out existing branch, or create a new branch name?".worktrees/ DirectoryAll worktrees live in .worktrees/ relative to the repo root.
# Get main repo root (from a worktree, returns absolute path; from main repo, returns relative .git — the cd && pwd wrapper normalizes both to absolute)
MAIN_GIT_DIR=$(git rev-parse --git-common-dir)
REPO_ROOT=$(cd "$(dirname "$MAIN_GIT_DIR")" && pwd)
# Create directory and ensure gitignored
mkdir -p "$REPO_ROOT/.worktrees"
grep -q '\.worktrees' "$REPO_ROOT/.gitignore" 2>/dev/null || echo '.worktrees/' >> "$REPO_ROOT/.gitignore"
git worktree add "$REPO_ROOT/.worktrees/{branch}" -b {branch}
Where {branch} is the feature branch name (e.g., feature-auth or feature-auth--backend for sub-scopes).
If creation fails:
git worktree add "$REPO_ROOT/.worktrees/{branch}" {branch} without -b)Output the result:
Worktree ready at {REPO_ROOT}/.worktrees/{branch}
Branch: {branch}
Return the worktree path so it can be passed to subsequent phases and agents.
| Case | Handling |
|---|---|
| Already in a worktree for this feature | Detect via git worktree list, reuse existing |
| Worktree directory exists but is stale | Run git worktree prune first, then retry |
| Branch name already exists | Ask user: check out existing or create new name |
| Creation fails (disk/permissions) | Surface error, offer fallback to main repo |