This skill should be used when the user asks to "create an isolated worktree", "set up worktree for feature", "create a feature branch worktree", or needs workspace isolation with automatic dependency setup and test verification.
Creates isolated git worktrees for feature development with automatic dependency setup and test verification.
/plugin marketplace add edwinhu/workflows/plugin install workflows@edwinhu-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Create an isolated git worktree for feature work, ensuring workspace isolation and clean baseline.
CRITICAL: Verify worktree directory is gitignored to prevent accidental commits.
Run:
if ! git check-ignore -q .worktrees 2>/dev/null; then
echo "Adding .worktrees/ to .gitignore"
echo ".worktrees/" >> .gitignore
git add .gitignore
git commit -m "chore: add .worktrees/ to gitignore
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"
fi
Description: dev-worktree: check if .worktrees is gitignored and add if missing
Extract from .claude/PLAN.md first line or infer from feature name:
Run:
# Extract from PLAN.md if exists
feature_name=$(grep -m1 '^# ' .claude/PLAN.md 2>/dev/null | sed 's/^# //' | tr '[:upper:] ' '[:lower:]-' | sed 's/[^a-z0-9-]//g')
# Or ask user if needed
Description: dev-worktree: extract or prompt for feature name
Branch name format: feature/${feature_name}
Run:
# Create worktree with new branch
git worktree add .worktrees/${feature_name} -b feature/${feature_name}
# Change to worktree directory
cd .worktrees/${feature_name}
Description: dev-worktree: create isolated git worktree with feature branch
Auto-detect and run setup based on project files:
Run:
# Node.js
if [ -f package.json ]; then
npm install
fi
# Python
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
if [ -f pyproject.toml ]; then
poetry install || pip install -e .
fi
if [ -f pixi.toml ]; then
pixi install
fi
# Rust
if [ -f Cargo.toml ]; then
cargo build
fi
# Go
if [ -f go.mod ]; then
go mod download
fi
Description: dev-worktree: auto-detect project type and install dependencies
Run tests to verify baseline if project has test suite:
Run:
# Examples - auto-detect test command
if [ -f package.json ] && grep -q '"test"' package.json; then
npm test
elif [ -f Cargo.toml ]; then
cargo test
elif [ -f pytest.ini ] || [ -f pyproject.toml ]; then
pytest
elif [ -f go.mod ]; then
go test ./...
fi
Description: dev-worktree: auto-detect and run project test suite
If tests fail: Report failures and note that baseline has issues. If tests pass: Report clean baseline.
Report completion status:
✓ Worktree created: .worktrees/${feature_name}
✓ Branch: feature/${feature_name}
✓ Dependencies installed
✓ Tests passing (or note if failed)
Ready for implementation.
Execute before creating worktree:
Execute after creating worktree:
Critical - Never deviate from these rules:
Critical - Always follow these rules:
# .worktrees/ gitignored → create worktree → npm install → npm test
# .worktrees/ gitignored → create worktree → pixi install → pytest
# .worktrees/ gitignored → create worktree → cargo build → cargo test
After worktree creation, the workspace is ready. Proceed to dev-implement to start implementing tasks.
Current working directory: .worktrees/${feature_name}
All implementation work happens here, keeping main workspace clean.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.