# workspace-isolation

workspace-isolation creates separate Git worktrees for parallel branch work. Use it when changes need their own working directories and a verified starting state.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 130 installs · ★ 50 repo stars
- Author: qodex-ai
- License: LicenseRef-Proprietary · policy=link-only · description only; the file stays with the author
- Source: https://github.com/qodex-ai/ai-agent-skills/tree/HEAD/skills/workspace-isolation/SKILL.md
- Updated: 2026-01-05
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/workspace-isolation

## What it does

The skill chooses a worktree location in a fixed order: an existing `.worktrees/`, then `worktrees/`, a preference in `CLAUDE.md`, or a prompt asking where to create it. For a project-local directory, it checks `.gitignore` first and adds and commits the matching rule when needed.

It creates a new branch with `git worktree add`, enters the directory, and selects setup steps from project files. Node.js, Rust, Python, and Go projects get the corresponding dependency command when their marker file is present. The skill then runs a project-appropriate test command and reports failures before continuing.

The skill targets Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. A local worktree cannot be created safely until `.worktrees/` or `worktrees/` is covered by `.gitignore`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill workspace-isolation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/workspace-isolation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/workspace-isolation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill workspace-isolation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/workspace-isolation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill workspace-isolation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/workspace-isolation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install qodex-ai/ai-agent-skills skills/workspace-isolation
```

2. **Manually: put the files in place**
- File: `.github/skills/workspace-isolation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill workspace-isolation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/qodex-ai/ai-agent-skills --path skills/workspace-isolation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/workspace-isolation/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add qodex-ai/ai-agent-skills --skill workspace-isolation -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/qodex-ai/ai-agent-skills/tree/HEAD/skills/workspace-isolation/SKILL.md

## When to use it
- create a separate working directory for a branch
- develop on several branches at once
- follow project rules when choosing a worktree path
- install dependencies in a fresh worktree
- verify tests before starting implementation

## Example prompts
- Create an isolated worktree for the `feature/auth` branch and prepare the project.
- Check the worktree location and `.gitignore`, then create a new branch workspace.
- Set up a worktree for this task and run the project's baseline tests.

## Similar
- [git-worktree-isolation](https://affpapa.org/en/nevibecode/skills/git-worktree-isolation.md) — skill · 2300 installs
- [worktree-isolation](https://affpapa.org/en/nevibecode/skills/worktree-isolation.md) — skill · 465 installs
- [git-workflow-and-versioning](https://affpapa.org/en/nevibecode/skills/git-workflow-and-versioning.md) — skill · 75700 installs
- [git-advanced-workflows](https://affpapa.org/en/nevibecode/skills/git-advanced-workflows.md) — skill · 19356 installs
- [suede-agent-teams](https://affpapa.org/en/nevibecode/skills/suede-agent-teams.md) — skill · ★ 121 repo stars
- [git-stinger](https://affpapa.org/en/nevibecode/skills/git-stinger.md) — skill · ★ 96 repo stars

From the same set: [qodex-ai/ai-agent-skills](https://affpapa.org/en/nevibecode/by/qodex-ai/ai-agent-skills.md) — 42 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
