synaptic-labs-ai/pact-plugin/worktree-setup
Claude Code and agent skill by synaptic-labs-ai/pact-plugin
- community
Checking that the SKILL.md file is still in the repository.
Create an isolated git worktree with a feature branch for PACT workflows. Use when: starting a new feature, beginning orchestrate or comPACT, creating sub-scope isolation for ATOMIZE, or manually isolating work. Triggers on: worktree setup, feature isolation, parallel workflow, new worktree.
Install
npx vskill@latest install synaptic-labs-ai/pact-plugin/worktree-setupSKILL.md
Worktree Setup
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.
When to Use
- Starting a new feature workflow (
/PACT:orchestrate,/PACT:comPACT) - ATOMIZE phase creating sub-scope isolation
- Manually isolating work for a feature branch
Process
Follow these steps in order. Stop and report any errors to the user.
Step 1: Check for Existing Worktree
Before creating anything, check if a worktree already exists for this branch.
- If a worktree for the target branch already exists, reuse it. Report: "Reusing existing worktree at {path}" and skip to Step 4.
- If the worktree appears in the list but is marked prunable, run
git worktree prunefirst and proceed to create a new one. - If the branch exists but has no worktree, ask the user: "Branch
{branch}already exists. Check out existing branch, or create a new branch name?"
Step 2: Ensure .worktrees/ Directory
All worktrees live in .worktrees/ relative to the repo root.
Step 3: Create the Worktree
Where {branch} is the feature branch name (e.g., feature-auth or feature-auth--backend for sub-scopes).
If creation fails:
- Branch already exists: Ask user whether to check out the existing branch (
git worktree add "$REPO_ROOT/.worktrees/{branch}" {branch}without-b) - Disk/permissions error: Surface git's error message and offer fallback to working in the main repo directory
Step 4: Report
Output the result:
Return the worktree path so it can be passed to subsequent phases and agents.
Edge Cases
| 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 |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpact-plugin/skills/worktree-setup/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/synaptic-labs-ai/pact-plugin/worktree-setup)