/rpikit:git-worktreesfrom rpikit
Creates isolated git worktrees for parallel development without disrupting the main workspace. Includes safety verification to prevent committing worktree contents.
Ships in rpikit. 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 isolated workspaces for parallel development without disrupting current work.
Git worktrees allow multiple branches to be checked out simultaneously in separate directories. This enables parallel work without stashing, context switching, or polluting the main workspace. This skill provides structured worktree creation with safety verification.
implementing-plans - Offers worktree isolation before implementation/rpikit:git-worktreesfinishing-work - Handles worktree cleanup after implementationwriting-plans - Plans may specify worktree isolation for high-stakes changesUse worktrees when:
Skip worktrees when:
When creating worktrees, check these locations in order:
Look for:
- .worktrees/ (hidden, preferred)
- worktrees/ (visible)
If both exist, prefer .worktrees/
Look in CLAUDE.md or project documentation for:
- Stated worktree location preference
- Project-specific conventions
If no preference found:
"Where should worktrees be created?"
- .worktrees/ (project-local, recommended, must be in .gitignore)
- worktrees/ (project-local, visible, must be in .gitignore)
- External location (e.g., ~/worktrees/project-name/)
Critical for project-local worktrees:
Before creating a worktree in .worktrees/ or worktrees/, verify the specific directory you're using is ignored:
# For .worktrees/ (check returns 0 if ignored)
git check-ignore -q .worktrees
# For worktrees/ (check returns 0 if ignored)
git check-ignore -q worktrees
If the command returns exit code 0, the directory is properly ignored.
If NOT ignored:
1. Add to .gitignore
echo ".worktrees/" >> .gitignore
(or "worktrees/" depending on choice)
2. Commit the change
git add .gitignore
git commit -m "Add worktree directory to .gitignore"
3. Then proceed with worktree creation
Why this matters: Accidentally committing worktree contents creates massive, confusing commits with duplicate code.
| Situation | Action |
|---|---|
.worktrees/ exists and is ignored | Use it |
worktrees/ exists and is ignored | Use it |
| Neither exists | Create .worktrees/, add to .gitignore, commit |
| Directory exists but not ignored | Add to .gitignore first, commit, then proceed |
| Baseline tests fail | Investigate before proceeding (may need deps/config) |
Get project name: basename $(git rev-parse --show-toplevel)
Get current branch: git branch --show-current
Get default branch: git symbolic-ref refs/remotes/origin/HEAD
For new feature branch:
git worktree add <worktree-path> -b <branch-name>
For existing branch:
git worktree add <worktree-path> <existing-branch>
From specific base:
git worktree add <worktree-path> -b <branch-name> origin/main
Detect project type and run appropriate setup:
If package.json exists:
npm install (or yarn, pnpm based on lockfile)
If Cargo.toml exists:
cargo build
If requirements.txt exists:
pip install -r requirements.txt (in venv if present)
If Gemfile exists:
bundle install
If go.mod exists:
go mod download
Verify clean state before starting work:
# Run project test command
npm test / cargo test / pytest / etc.
If tests fail:
"Baseline tests fail in the new worktree.
This could mean:
- Missing dependencies
- Environment configuration needed
- Pre-existing failures on the base branch
Options:
- Investigate and fix (recommended)
- Proceed anyway (acknowledge failures exist)
- Abort worktree creation"
"Worktree created and ready:
Location: <worktree-path>
Branch: <branch-name>
Base: <base-branch>
Tests: <pass/fail status>
To work in this worktree:
cd <worktree-path>
To return to main workspace:
cd <main-repo-path>"
git worktree list
# From main repository
git worktree remove <worktree-path>
# If worktree has changes, force removal
git worktree remove --force <worktree-path>
# Remove worktrees whose directories no longer exist
git worktree prune
When planning involves isolated implementation:
Plan approved
→ Create worktree for implementation
→ Run setup in worktree
→ Verify baseline tests
→ Begin implementation in isolated environment
After implementation in worktree:
Implementation complete
→ Use finishing-work skill
→ If merging locally: cleanup worktree
→ If creating PR: keep worktree for review cycle
→ If discarding: cleanup worktree
Pros:
Cons:
Pros:
Cons:
git check-ignore first.worktrees/Before removing a worktree:
User: Create a worktree for implementing the new auth feature
Assistant: I will create a worktree for the auth feature.
[Checks for existing .worktrees/ directory]
[Runs: git check-ignore -q .worktrees]
[Exit code 0 - directory is ignored]
Creating worktree at .worktrees/auth-feature...
[Runs: git worktree add .worktrees/auth-feature -b auth-feature origin/main]
Installing dependencies...
[Detects package.json, runs: npm install]
Running baseline tests...
[Runs: npm test]
All tests pass.
Worktree created and ready:
Location: .worktrees/auth-feature
Branch: auth-feature
Base: origin/main
Tests: passing
# Create worktree with new branch
git worktree add <path> -b <new-branch> <base>
# Create worktree with existing branch
git worktree add <path> <existing-branch>
# List all worktrees
git worktree list
# Remove worktree
git worktree remove <path>
# Force remove (with uncommitted changes)
git worktree remove --force <path>
# Prune stale entries
git worktree prune
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bostonaholic/rpikit --plugin rpikit16 skills in this plugin
/brainstormingCollaborative design methodology for creative work. Use before research or planning when requirements are unclear, multiple approaches exist, or the idea needs exploration. Refines ideas through progressive questioning.
/documenting-decisionsRecord architectural decisions as ADRs from design documents. Use after brainstorming or planning to capture what was decided, why, and what alternatives were considered. Produces sequentially numbered ADR files in docs/decisions/.
/finishing-workStructured completion workflow for implementation work. Use when implementation is complete, all tests pass, and you need to decide how to integrate the work. Guides merge, PR creation, or cleanup decisions.
/implementing-plansDisciplined plan execution with checkpoint validation, progress tracking, and verification at each step. Follows an approved plan strictly, running verification criteria before proceeding./parallel-agentsConcurrent agent dispatch for independent problems. Use when facing multiple independent tasks that can be worked on simultaneously. Reduces total time by parallelizing work that has no shared state.
/receiving-code-reviewVerification-first approach to code review feedback. Use when receiving review comments during the implement phase. Evaluate suggestions rigorously before implementing - no performative agreement.
Other plugins' skills for the same job