/fiddle:worktreesfrom fiddle
Creates isolated git worktrees for feature work with smart directory selection and safety verification. Automatically detects project toolchain and runs setup.
Ships in fiddle. 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.
None: SKILL.md is the whole skill.
Create an isolated workspace for feature work: pick the worktree directory systematically, verify it is safe, then set it up and confirm a clean baseline.
Follow this priority order: an existing worktree directory, then a CLAUDE.md preference, then ask.
# Check in priority order
ls -d .worktrees 2>/dev/null # Preferred (hidden)
ls -d worktrees 2>/dev/null # Alternative
If one is found, use it. If both exist, .worktrees wins.
grep -i "worktree.*director" CLAUDE.md 2>/dev/null
If a preference is specified there, use it without asking.
If no directory exists and CLAUDE.md has no preference:
No worktree directory found. Where should I create worktrees?
1. .worktrees/ (project-local, hidden)
2. ~/.config/fiddle/worktrees/<project-name>/ (global location)
Which would you prefer?
Guessing the location instead of asking creates inconsistency with the project's own conventions.
A project-local worktree directory (.worktrees or worktrees) is confirmed git-ignored before the worktree is created, because an unignored one puts every file of every branch you check out into this repository's git status and eventually into a commit.
# Check if directory is ignored (respects local, global, and system gitignore)
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
If it is not ignored, fix it before proceeding: add the line to .gitignore, commit that change, then create the worktree.
The global directory (~/.config/fiddle/worktrees) needs no such check, being outside the project entirely.
project=$(basename "$(git rev-parse --show-toplevel)")
# Determine full path
case $LOCATION in
.worktrees|worktrees)
path="$LOCATION/$BRANCH_NAME"
;;
~/.config/fiddle/worktrees/*)
path="~/.config/fiddle/worktrees/$project/$BRANCH_NAME"
;;
esac
# Create worktree with new branch
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"
Auto-detect the toolchain from the project's own files rather than assuming a fixed command:
# 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
Run the project's test suite before any work starts, so a failure later can be attributed to the work rather than inherited from the branch:
# Examples - use project-appropriate command
npm test
cargo test
pytest
go test ./...
If tests fail, report the failures and ask whether to proceed or investigate. If they pass, report ready.
Worktree ready at <full-path>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>
Called by:
Pairs with:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub peel/fiddle --plugin fiddleOther plugins' skills for the same job
28 skills in this plugin
/adrUse when recording a consequential technical decision; captures context, the chosen option, and consequences in a new architecture decision record./backlogUse when capturing an idea, technical debt, or observation that is not ready for a planned bean./brainstormUse before creative work or behavior changes to clarify intent, explore tradeoffs, and produce an approved design./challengeUse when a plan or design needs assumptions, constraints, and decision branches resolved before progressing.