# Git Worktree

> Parallel development workflow using git worktrees. Each agent gets an isolated worktree for safe concurrent work.

- Skill: `nwiizo/git-worktree` (Agent Skill)
- Install (CLI): `npx skillmds@latest add nwiizo/git-worktree`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nwiizo/git-worktree/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: nwiizo (https://skillmd.com/u/nwiizo)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/nwiizo/git-worktree

---


Multi-step workflow for parallel development using git worktrees.

## Create Worktree

```bash
# Feature worktree
git worktree add ../ccswarm-feature-$ARGUMENTS feature/$ARGUMENTS

# Bug fix worktree
git worktree add ../ccswarm-bugfix-$ARGUMENTS hotfix/$ARGUMENTS
```

## Agent Team Integration

With Agent Teams, each agent automatically gets `isolation: worktree`. For manual worktree setup:

```bash
git worktree add ../ccswarm-frontend feature/ui-redesign    # Frontend agent
git worktree add ../ccswarm-backend feature/api-enhancement  # Backend agent
git worktree add ../ccswarm-devops feature/ci-cd-improvement # DevOps agent
```

## Management

```bash
git worktree list                              # List all worktrees
git worktree remove ../ccswarm-feature-$ARGUMENTS  # Remove after merge
git worktree prune                             # Clean stale entries
```

## Best Practices

1. One worktree per feature/bug
2. Naming: `ccswarm-<type>-<description>`
3. Clean up after merging
4. Run `git worktree prune` periodically

