Skip to content
Back to skills

Git Worktree

ASecurity

Manage git worktrees for parallel agent development. Create, sync, and remove isolated dev environments.

  • 24 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 29, 2026
ai-agentsbashsqlgitfrontend

Security analysis

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

Pro shows the line behind each finding and how to fix it

Scanned May 29, 2026

npx -y skills add J-StaR-Films-Studios/VibeCode-Protocol-Suite --skill git-worktree --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Worktree?

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

Security grade badge for Git Worktree
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/j-star-films-studios-git-worktree/badge)](https://www.skillsdirectory.com/skills/j-star-films-studios-git-worktree)

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: git-worktree
description: Manage git worktrees for parallel agent development. Create, sync, and remove isolated dev environments.
---

# Git Worktree Skill

Manage parallel development environments without manual path juggling.

## When to Use
- Setting up parallel agents
- Multi-agent development
- When "worktree" is mentioned
- Need isolated environments for different features

## Status Check
```bash
git worktree list
git branch --list
```

## Actions

### [NEW] Create Agent Environment

1. **Name the Agent**: Short identifier (e.g., `frontend-refactor`, `agent-3`)
2. **Define Paths**:
   - Branch: `[agent-name]`
   - Folder: `../[repo-name]-[agent-name]`

3. **Execute**:
```bash
git branch [branch_name]
git worktree add [folder_path] [branch_name]
```

4. **Validate**: `git worktree list`

5. **Context Migration** (ask user):
```bash
cp .env [worktree_path]/.env
# If SQLite:
mkdir -p [worktree_path]/prisma
cp prisma/dev.db [worktree_path]/prisma/dev.db
```

6. **Initialize**: `pnpm install` in new worktree

---

### [SYNC] Synchronize Agents

1. Ask: Sync **ALL** or **SPECIFIC** worktree?
2. Execute:
```bash
git fetch origin
cd [worktree_path]
git merge origin/main  # or rebase
cd -
```

---

### [KILL] Teardown Agent

1. Select worktree from list
2. Execute:
```bash
git worktree remove [worktree_path]
git branch -d [branch_name]  # Ask before deleting!
git worktree prune
```

## Troubleshooting

- **"already checked out"**: Use a new branch name
- **Stale entries**: Run `git worktree prune`
- **Files still tracked**: Directory was deleted manually—prune first

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.