/fw:worktreefrom fw
Manage isolated git worktrees. Use for branch work, isolated review targets, parallel checkouts, or cleanup.
Ships in fw. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
$fw:worktree is Flywheel's isolated-workspace manager.
Use it when the right move is not "switch branches in place", but "open a clean parallel checkout with the branch, template env files, and ignore hygiene already handled."
Always use the bundled manager script instead of typing raw git worktree
commands by hand.
Script path:
<repo-root>/skills/worktree/scripts/worktree-manager.sh
The manager script handles the Flywheel defaults that raw git worktree add
does not:
.worktrees/.worktrees/ is ignored.env* files exist without copying them automaticallyFollow ../references/host-interaction-contract.md.
Call the exact host question tool named in
../references/host-interaction-contract.md when that tool is available. Do
not ask for raw 1/2/3 replies when the host already offers a choice surface.
When the workflow spans multiple material steps, use the host task-tracking
tool named in ../references/host-interaction-contract.md to create and
maintain a short task list.
Prefer calling the host question tool with a concise choice surface when the user has not already named an action:
Interpret the input or user intent as one of:
create <branch> [base]listpath <branch>copy-env <branch>cleanup <branch>If the user only says they want isolated work, infer create.
Run the manager script directly:
bash "$(git rev-parse --show-toplevel)/skills/worktree/scripts/worktree-manager.sh" <command> ...
Use:
bash "$(git rev-parse --show-toplevel)/skills/worktree/scripts/worktree-manager.sh" create <branch-name> [base-branch]
Creation rules:
Use:
bash "$(git rev-parse --show-toplevel)/skills/worktree/scripts/worktree-manager.sh" list
Use:
bash "$(git rev-parse --show-toplevel)/skills/worktree/scripts/worktree-manager.sh" path <branch-name>
The script returns the worktree path and a cd command suggestion.
Use:
bash "$(git rev-parse --show-toplevel)/skills/worktree/scripts/worktree-manager.sh" copy-env <branch-name>
This is the explicit escape hatch for copying real top-level .env and
.env.* files when that worktree genuinely needs local secrets.
If the repo has a durable local preference recorded in
.flywheel/config.local.yaml, honor it by setting
FW_WORKTREE_ENV_COPY_MODE=none, templates-only, or real-files when
invoking the script. The default remains templates-only.
Use:
bash "$(git rev-parse --show-toplevel)/skills/worktree/scripts/worktree-manager.sh" cleanup <branch-name>
Cleanup is intentionally conservative:
Flywheel's default worktree posture is:
FW_WORKTREE_ENV_COPY_MODE when the
repo truly needs a different defaultUse copy-env only when the worktree actually needs those local secrets.
Review-only and documentation-only worktrees should usually not copy them.
$fw:work should recommend $fw:worktree whenever work starts from the
default branch and isolation is preferable.$fw:review should prefer $fw:worktree when a PR or branch must be
reviewed without switching the shared checkout.$fw:commit may suggest $fw:worktree cleanup <branch> after merge or after a
shipped branch no longer needs an isolated checkout.Return:
cd <path>, copy-env <branch>, or a
cleanup follow-upWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
32 skills in this plugin
/architecture-strategyAssess repo-grounded architecture choices and improvements. Use for boundaries, service splits, dependency direction, or distributed posture./brainstormExplore requirements and approaches. Use for a fuzzy idea, open scope, or one direction that needs sharper behavior before planning./browser-testRun browser acceptance checks with playwright-cli. Use when browser-visible behavior needs fresh proof before review or commit./commitFinish a branch cleanly. Use to verify readiness, make logical commits, push, and create or refresh a PR with evidence.npx claudepluginhub mopeyjellyfish/flywheel --plugin flywheel