/superpowers-optimized:using-git-worktreesfrom superpowers-optimized
Creates isolated git worktree environments to keep experimental or risky changes separate from the current branch. Handles setup, dependencies, and baseline tests.
Ships in superpowers-optimized. 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 branch workspace with safe defaults.
Announce: I'm using the using-git-worktrees skill to set up an isolated workspace.
Check in order:
ls -d .worktrees 2>/dev/null # Preferred (hidden)
ls -d worktrees 2>/dev/null # Alternative
.worktrees/ exists — use it. If both exist, .worktrees/ wins.worktrees/ exists — use it.CLAUDE.md) for a stated preference:
grep -i "worktree.*director" CLAUDE.md 2>/dev/null
For project-local worktree directories, verify ignore rules before creating:
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
If not ignored:
.gitignore..gitignore change immediately before proceeding — an uncommitted ignore entry is easy to lose and leaves the worktree contents exposed to accidental staging.project=$(basename "$(git rev-parse --show-toplevel)")
Choose a descriptive BRANCH_NAME for the feature being isolated.
git worktree add <path> -b <BRANCH_NAME>
Critical: The cd <path> in this step does not persist across separate shell calls. Use the full worktree path — cd <path> && <command> — in every subsequent Bash call rather than assuming the working directory carried over.
Auto-detect the project ecosystem and run the appropriate setup:
# 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
If none of these files exist, skip dependency installation and note it in the output.
Run the project-appropriate test command to confirm the worktree starts clean:
# Use whichever applies
npm test
cargo test
pytest
go test ./...
If baseline tests fail, report the failures and ask whether to continue or investigate before proceeding.
Report:
Use with:
writing-planssubagent-driven-development — REQUIRED before executing any tasksexecuting-plans — REQUIRED before executing any tasksCleanup is handled by finishing-a-development-branch.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub repozy/superpowers-optimized --plugin superpowers-optimized24 skills in this plugin
/brainstormingUse when the user wants new features, behavior changes, refactoring with new capabilities, or architecture decisions and no approved design exists yet. Produces a design before any code is written — in the conversation for small changes, as an approved spec document for larger work. Triggers on: "build this", "add a feature", "I want to change", "how should we", "design", "architect", "new project", "refactor", "we need to add/build/create", "implement a new". Routed by using-superpowers, or invoke directly via /brainstorming.
/claude-md-creatorCreates minimal, high-signal CLAUDE.md and AGENTS.md context files based on empirical best practices. Invoke on /init command, "create CLAUDE.md", "update CLAUDE.md", "write AGENTS.md", or "set up Claude Code for this project". Also invoked by brainstorming when repo lacks a context file. tools: Read, Glob, Grep, Bash, Edit
/context-managementOther plugins' skills for the same job