From superpowers
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated workspaces (git worktrees or jj workspaces) with smart directory selection and safety verification
npx claudepluginhub fzymgc-house/fzymgc-house-skills --plugin superpowersThis skill uses the workspace's default tool permissions.
> **Before running any VCS commands, read `references/vcs-preamble.md` and use
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Before running any VCS commands, read
references/vcs-preamble.mdand use the appropriate commands for the detected VCS (git or jj).
Workspaces create isolated working copies sharing the same repository, allowing work on multiple features simultaneously without switching branches.
jj workspace add, never git worktree add)Core principle: Sibling directory layout + VCS detection + safety verification = reliable isolation.
Announce at start: "I'm using the using-worktrees skill to set up an isolated workspace."
if jj root >/dev/null 2>&1; then
VCS=jj
# jj: always fetch at start
jj git fetch
else
VCS=git
fi
All workspaces use the sibling directory pattern to avoid confusing LSP servers with nested repos:
<repo>/ # main repo
<repo>_worktrees/ # workspace parent (sibling)
feature-auth/ # one workspace per task
fix-bug-123/
The parent directory is ../<repo-basename>_worktrees/. This is determined
automatically — no user prompt needed.
# Get repo root and name
if [ "$VCS" = "jj" ]; then
repo_root=$(jj root)
else
repo_root=$(git rev-parse --show-toplevel)
fi
project=$(basename "$repo_root")
worktree_parent="$(dirname "$repo_root")/${project}_worktrees"
mkdir -p "$worktree_parent"
git:
git worktree add "$worktree_parent/$BRANCH_NAME" -b "$BRANCH_NAME"
cd "$worktree_parent/$BRANCH_NAME"
jj:
jj workspace add "$worktree_parent/$WORKSPACE_NAME" --name "$WORKSPACE_NAME"
cd "$worktree_parent/$WORKSPACE_NAME"
# Create a bookmark for the workspace (needed for pushing/PRs)
jj bookmark create "$WORKSPACE_NAME" -r @
Auto-detect and run appropriate setup:
# Node.js
if [ -f package.json ]; then npm install; fi
# Rust
if [ -f Cargo.toml ]; then cargo build; fi
# Python
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f pyproject.toml ]; then poetry install; fi
# Go
if [ -f go.mod ]; then go mod download; fi
If the repo uses git hooks, install them in the new workspace:
[[ -f lefthook.yaml ]] && lefthook install
[[ -f .pre-commit-config.yaml ]] && pre-commit install
[[ -f .beads/config.yaml ]] && bd hooks install --chain
Run tests to ensure workspace starts clean:
# Examples — use project-appropriate command
npm test
cargo test
pytest
go test ./...
If tests fail: Report failures, ask whether to proceed or investigate.
If tests pass: Report ready.
Workspace ready at <full-path>
VCS: <git|jj>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>
When done with a workspace:
git:
git worktree remove <path>
jj:
jj workspace forget <name>
rm -rf <path>
Note: jj workspace forget de-registers the workspace but does NOT delete
files — you must rm -rf the directory after.
| Situation | Action |
|---|---|
| VCS is git | git worktree add ../<repo>_worktrees/<name> -b <name> |
| VCS is jj | jj workspace add ../<repo>_worktrees/<name> --name <name> |
| Project has package.json | Run npm install after creation |
| Project has lefthook.yaml | Run lefthook install after creation |
| Tests fail during baseline | Report failures + ask |
| No package.json/Cargo.toml | Skip dependency install |
| Cleanup (git) | git worktree remove <path> |
| Cleanup (jj) | jj workspace forget <name> + rm -rf <path> |
<repo>_worktrees/)jj workspace add in jj reposjj bookmark create <name> -r @ after workspace creationjj git fetch before creating workspacegit:
You: I'm using the using-worktrees skill to set up an isolated workspace.
[VCS detected: git]
[Create workspace: git worktree add ../myproject_worktrees/auth -b feature/auth]
[Run npm install]
[Run lefthook install]
[Run npm test — 47 passing]
Workspace ready at /Users/dev/myproject_worktrees/auth
VCS: git
Tests passing (47 tests, 0 failures)
Ready to implement auth feature
jj:
You: I'm using the using-worktrees skill to set up an isolated workspace.
[VCS detected: jj]
[jj git fetch]
[Create workspace: jj workspace add ../myproject_worktrees/auth --name auth]
[jj bookmark create auth -r @]
[Run npm install]
[Run lefthook install]
[Run npm test — 47 passing]
Workspace ready at /Users/dev/myproject_worktrees/auth
VCS: jj
Tests passing (47 tests, 0 failures)
Ready to implement auth feature
Called by:
Pairs with: