Habilidades using-git-worktrees
📦

using-git-worktrees

Seguro ⚙️ Comandos externos📁 Acceso al sistema de archivos

Create isolated git workspaces for feature development

También disponible en: obra,Cycleaddict,davila7,Cygnusfear,Doyajin174,DYAI2025,ZhanlinCui,CodingCossack

Developers struggle with context switching when working on multiple branches. This skill creates isolated git worktrees so you can work on features in parallel without losing your current workspace state.

Soporta: Claude Codex Code(CC)
🥉 74 Bronce
1

Descargar el ZIP de la skill

2

Subir en Claude

Ve a Configuración → Capacidades → Skills → Subir skill

3

Activa y empieza a usar

Pruébalo

Usando "using-git-worktrees". Create a worktree for the new payment feature

Resultado esperado:

I'm using the using-git-worktrees skill to set up an isolated workspace.

Worktree ready at /projects/myapp/.worktrees/feature/payments
Tests passing (47 tests, 0 failures)
Ready to implement payment feature

Usando "using-git-worktrees". Set up a workspace to review the api-v2 branch

Resultado esperado:

I'm using the using-git-worktrees skill to set up an isolated workspace.

Detected existing .worktrees directory
Verified directory is git-ignored
Created worktree: git worktree add .worktrees/api-v2 -b api-v2
Installed dependencies: npm install
Baseline tests: 23 passing

Worktree ready at /projects/myapp/.worktrees/api-v2

Auditoría de seguridad

Seguro
v1 • 2/25/2026

All 43 static findings evaluated as false positives. External commands are standard git and build tools with hardcoded or trusted arguments. Filesystem operations are legitimate directory checks. No command injection vectors, credential exposure, or malicious patterns detected.

1
Archivos escaneados
223
Líneas analizadas
2
hallazgos
1
Auditorías totales
Auditado por: claude

Puntuación de calidad

38
Arquitectura
100
Mantenibilidad
87
Contenido
50
Comunidad
100
Seguridad
91
Cumplimiento de la especificación

Lo que puedes crear

Feature Development Isolation

Start work on a new feature branch without losing uncommitted changes or breaking the current workspace state

Code Review Preparation

Create a clean isolated workspace to review and test pull request changes without affecting local development

Bug Fix Reproduction

Isolate bug investigation work in a separate worktree while maintaining stable development environment

Prueba estos prompts

Basic Worktree Setup
Set up an isolated workspace for the feature/auth-improvements branch using git worktrees
Worktree with Custom Directory
Create a worktree for bugfix/memory-leak in the .worktrees directory and run the project setup
PR Review Workspace
Create an isolated worktree from the pull-request-123 branch so I can review changes without affecting my current work
Multi-Branch Development
I need to work on the experimental/caching branch while keeping my current changes intact. Set up a worktree and verify tests pass

Mejores prácticas

  • Always verify worktree directories are git-ignored before creation to prevent accidental commits
  • Run baseline tests immediately after worktree creation to establish a clean starting point
  • Follow the directory priority order: existing directory > CLAUDE.md preference > ask user

Evitar

  • Creating worktrees without verifying git ignore status, causing workspace pollution in version control
  • Skipping baseline test verification, making it impossible to distinguish new bugs from pre-existing issues
  • Hardcoding directory locations instead of checking existing directories and user preferences first

Preguntas frecuentes

What is a git worktree and why use it?
A git worktree is a linked working directory that shares the same repository. It allows you to work on multiple branches simultaneously without switching, keeping each workspace isolated and preserving uncommitted changes.
Where are worktrees created?
Worktrees are created in either .worktrees/ (project-local), worktrees/ (alternative project-local), or ~/.config/superpowers/worktrees/<project>/ (global location). The skill follows a priority order and asks if no preference exists.
Do I need to install dependencies in each worktree?
Yes, each worktree has its own working directory. The skill automatically detects your project type (npm, cargo, pip, poetry, go) and runs the appropriate install command.
What happens if baseline tests fail?
The skill reports the test failures and asks whether you want to proceed with investigation or continue anyway. This ensures you know the starting state before making new changes.
Can I have multiple worktrees at the same time?
Yes, git supports multiple worktrees. Each worktree operates independently, allowing you to work on different branches in parallel with separate terminal sessions.
How do I clean up worktrees after finishing?
Use the finishing-a-development-branch skill or run 'git worktree remove <path>' to delete a worktree. The main repository and other worktrees remain unaffected.

Detalles del desarrollador

Estructura de archivos

📄 SKILL.md