Help us improve
Share bugs, ideas, or general feedback.
From setup-isolated-env
Use after a git worktree has been created and needs its isolated environment activated. Runs the project's setup-env.sh, then verifies the environment with smoke-test.sh before starting development.
npx claudepluginhub joel611/claude-plugins --plugin setup-isolated-envHow this skill is triggered — by the user, by Claude, or both
Slash command
/setup-isolated-env:activate-worktree-envThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**PER-WORKTREE SKILL** - Runs the project's pre-generated setup-env.sh to provision an isolated environment for a new git worktree, then verifies readiness with smoke-test.sh. **Core principle**: Always verify before developing.
Creates isolated git worktrees for feature branches with dependency installs, port allocation via dev-setup scripts, and baseline test verification. Supports create or setup modes for clean workspaces.
Use when starting feature work that needs isolation from the current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Creates reproducible cross-platform dev environments with Flox for toolchains (Python, Node, Rust, Go), system deps (openssl, BLAS), and services (PostgreSQL, Redis, Kafka) across macOS/Linux.
Share bugs, ideas, or general feedback.
PER-WORKTREE SKILL - Runs the project's pre-generated setup-env.sh to provision an isolated environment for a new git worktree, then verifies readiness with smoke-test.sh. Core principle: Always verify before developing.
PREREQUISITE: Project must already have setup scripts generated by setup-isolated-env:generate-env-scripts. If scripts don't exist, run that skill first.
Announce at start: "i'm using activate-worktree-env skill to set up and verify this worktree environment"
Use when:
.env.local yetDon't use for:
setup-isolated-env:generate-env-scripts)| Step | Command | Run From |
|---|---|---|
| 1. Run setup-env.sh | <worktree_scripts>/setup-env.sh | Project root |
| 2. Navigate to worktree | cd .worktrees/<env-name> | Project root |
| 3. Run smoke test | ../../<worktree_scripts>/smoke-test.sh | Inside worktree |
| 4. Start dev | bun run dev (or project command) | Inside worktree |
Check CLAUDE.md for the worktree scripts location:
## Isolated Development Environments section### Creating a New EnvironmentCommon locations:
.worktrees_scripts/ (default)scripts/# Verify scripts exist
ls <worktree_scripts>/setup-env.sh
If scripts don't exist: Stop. Run setup-isolated-env:generate-env-scripts first.
Run from project root (NOT from inside the worktree):
# From project root
<worktree_scripts>/setup-env.sh
The script will:
.worktrees/<env-name>.env.example → .env.local with unique valuesIf script fails: Read the error output. Common causes:
cd .worktrees/<env-name>
CRITICAL: Smoke test MUST run from WITHIN the worktree (not project root).
# Already inside .worktrees/<env-name>
../../<worktree_scripts>/smoke-test.sh
Smoke test checks:
If smoke test passes: Environment is ready. Start development.
If smoke test fails: Do NOT start development. See Troubleshooting.
Only after smoke test passes:
# Inside .worktrees/<env-name>
bun run dev
# or: npm run dev / yarn dev / pnpm dev
setup-env.sh fails - infrastructure not running:
docker compose up -dsupabase startsetup-env.sh fails - environment name conflict:
<worktree_scripts>/cleanup-env.sh <old-name>Database creation fails (Supabase MCP projects):
Smoke test fails - wrong directory:
cd .worktrees/<env-name> first../../<worktree_scripts>/smoke-test.shSmoke test fails - PORT not set:
.env.local exists in worktreeSmoke test fails - database connectivity:
supabase status or docker compose ps.env.local points to correct host/portpsql "$DATABASE_URL" -c "SELECT 1"Smoke test fails - port in use:
lsof -i :<PORT>.env.local and re-run smoke testWhen finished with the worktree:
# From project root
<worktree_scripts>/cleanup-env.sh <env-name>
This removes the worktree, drops the database, and frees allocated ports.