# Using Git Worktrees

> Use when starting feature work that needs isolation from current workspace or before executing implementation plans.

- Skill: `majiayu000/using-git-worktrees-3` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add majiayu000/using-git-worktrees-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/using-git-worktrees-3/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools, AI & ML, Marketing & Growth
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/using-git-worktrees-3

---


# Using Git Worktrees

## Overview

Create isolated workspaces sharing the same repository. Systematic directory selection + safety verification.

**Core principle:** Isolated workspace before implementation.

## Process

1. Check existing directories (.worktrees/ or worktrees/)
2. Verify directory is gitignored
3. Create worktree with new branch
4. Run project setup (auto-detect npm/cargo/pip/go)
5. Verify clean test baseline
6. Report ready

## Safety

- Always verify worktree directory is gitignored
- Always run baseline tests
- Report failures before proceeding

## Agents Used

- Process agents referenced in `superpowers-workflow.js`

## Tool Use

Referenced by `executing-plans` and `subagent-driven-development` processes.

