From worktrees
Use when making a repository worktree-ready for parallel development — per-worktree isolation (ports, containers, caches, secrets), lifecycle hooks, and the main-checkout enforcement guard.
How this skill is triggered — by the user, by Claude, or both
Slash command
/worktrees:setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Make a repository support isolated, parallel worktree development. This is
Make a repository support isolated, parallel worktree development. This is goal-driven: realize the isolation goals below for this project's stack — do not copy a fixed bootstrap. The reference scripts in this plugin are starting points to tailor, not drop-in solutions.
./.worktrees/ unless the user confirms another location..env search (the app or .envrc
walks up to the main checkout's .env) plus a per-worktree override file.target/, _build/, deps/, node_modules/, .direnv/, …). Copy
(rsync) when tools dislike symlinked caches; link when they don't.COMPOSE_PROJECT_NAME), so parallel worktrees never clobber each other.scripts/worktree-ports.sh <worktree> (slot-based, idempotent,
configurable bases) and write the result into the worktree's env.post-checkout hook (lefthook/husky/plain git) to the bootstrap, and run
teardown (docker compose … down --volumes, then git worktree remove)
before deleting a worktree. Generate plain shell scripts first; convenience
command wrappers are optional and must fit the project.scripts/worktree-guard.sh)../.worktrees/<name> as the default checkout path in generated examples
and helper scripts. Ensure .worktrees/ is ignored before relying on it.templates/bootstrap-worktree.sh)
wired into the project's hook manager, and a teardown (adapt
templates/worktree-teardown.sh).justfile, Makefile, package.json scripts, project-specific task runners,
or no wrapper at all. Do not assume just, npm, make, or any other runner is
present across projects.bats tests for the generated scripts and any confirmed wrapper.pre-commit and pre-push hooks.AGENTS.md.Guides users through a choose-your-own-adventure writing process that turns raw markdown material into a structured article by grounding concepts before they are used.
npx claudepluginhub jwilger/ai-plugins --plugin worktrees