Skip to content
Back to skills

Worktree Isolation

ASecurity

Git worktree management for safe, isolated feature development. Creates, manages, and cleans up worktrees with branch naming and dependency setup.

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentsgoshellbashgitbackend

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add a5c-ai/babysitter --skill worktree-isolation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Worktree Isolation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Worktree Isolation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-worktree-isolation-babysitter/badge)](https://www.skillsdirectory.com/skills/a5c-ai-worktree-isolation-babysitter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: worktree-isolation
description: Git worktree management for safe, isolated feature development. Creates, manages, and cleans up worktrees with branch naming and dependency setup.
allowed-tools: Bash(*) Read Write Edit Glob Grep
metadata:
  author: babysitter-sdk
  version: "1.0.0"
  category: pilot-shell-git
  attribution: "Adapted from Pilot Shell by Max Ritter (https://github.com/maxritter/pilot-shell)"
graph:
  domains: [domain:software-engineering]
  skillAreas: [skill-area:agentic-loops, skill-area:orchestration-loop]
  workflows: [workflow:feature-development]
  topics: [topic:developer-experience]
  roles: [role:tech-lead, role:backend-engineer]
```bash
---

# Create worktree with feature branch
git worktree add .claude/worktrees/<slug> -b feature/<slug>
cd .claude/worktrees/<slug>
npm install  # or equivalent package manager
```

### 2. Worktree Detection
- Check if currently inside a worktree
- Identify the base branch
- Detect worktree state (clean, dirty, conflicts)

### 3. Worktree Sync
- Pull latest changes from base branch into worktree
- Rebase feature branch on updated base
- Resolve conflicts if needed

### 4. Worktree Diff
- Generate diff between worktree and base branch
- Summarize changes by file and type
- Calculate diff statistics

### 5. Worktree Cleanup
- Remove worktree after successful merge
- Delete feature branch
- Prune stale worktree references

### 6. Worktree Status
- List all active worktrees
- Show branch and status for each
- Identify orphaned worktrees

## Branch Naming Convention

| Mode | Pattern | Example |
|------|---------|---------|
| Feature | `feature/<slug>` | `feature/add-user-auth` |
| Bugfix | `bugfix/<slug>` | `bugfix/fix-payment-race` |
| Quick | `quick/<number>` | `quick/042` |

## Multiple Parallel Sessions

Worktrees enable multiple Pilot Shell sessions to work simultaneously without interference, as each operates in its own filesystem directory with its own branch.

Files in this skill

  • README.md667 B
  • SKILL.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…