Git Worktrees Management

VerifiedSafe

Manage git worktrees to develop multiple features in parallel without conflicts. Supports creating, listing, removing, checking status, and switching between worktrees.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#git#worktrees#parallel-development#branching

Recommended for

Automated summary

Manages Git worktrees to allow parallel development of multiple features without conflicts.

Strengths

  • Full isolation between working branches
  • Quick context switching without stashing
  • Simplified cleanup after merge or abandonment
  • Support for both features and hotfixes

Limitations

  • Disk space usage (each worktree is a partial clone)
  • Requires solid understanding of Git worktrees
  • May be overkill for small projects
When to use it

When working on multiple features or fixes simultaneously that need isolated development environments.

When not to use it

For quick fixes or projects with limited disk space.

Security analysis

Safe
Quality score90/100

The skill performs standard git worktree operations (create, list, remove, status, switch) and writes metadata to a local JSON file. It does not execute destructive commands, exfiltrate data, or disable safety features. The use of Bash is limited to safe git commands and file operations.

No concerns found

How this analysis is made

Examples

Create a new worktree for a feature
/dev:worktree create oauth-auth
List all active worktrees
/dev:worktree list
Remove a worktree after merging
/dev:worktree remove oauth-auth

name: dev:worktree description: Gestion des git worktrees pour développement parallèle argument-hint: <action> [args] model: sonnet allowed-tools: [Bash, Read, Write, Edit, Grep, AskUserQuestion] version: 1.0.0 license: MIT

Objectif

Instructions à Exécuter

IMPORTANT : Exécute ce workflow étape par étape :

Gérer les git worktrees pour permettre le développement de plusieurs features en parallèle sans conflits.

Actions disponibles

create

Créer un nouveau worktree pour une feature.

Usage :

/dev:worktree create <feature-name> [base-branch]

Arguments :

  • feature-name : Nom de la feature (ex: "oauth-auth", "refactor-payment")
  • base-branch : Branche de base (défaut: main ou master)

Exemple :

/dev:worktree create oauth-auth
/dev:worktree create hotfix-payment main

Comportement :

  1. Détecter la branche principale (main/master)
  2. Normaliser le nom de la feature (kebab-case)
  3. Créer la branche feature/<feature-name> ou hotfix/<feature-name>
  4. Créer le worktree dans .worktrees/<feature-name>
  5. Mettre à jour .claude/data/.dev-worktrees.json avec les métadonnées
  6. Afficher les instructions pour basculer vers le worktree

list

Lister tous les worktrees actifs.

Usage :

/dev:worktree list

remove

Supprimer un worktree (après merge ou abandon).

Usage :

/dev:worktree remove <feature-name>

Comportement :

  1. Vérifier qu'il n'y a pas de modifications non commitées
  2. Demander confirmation si des commits non poussés existent
  3. Supprimer le worktree avec git worktree remove
  4. Optionnellement supprimer la branche (demander confirmation)
  5. Mettre à jour .claude/data/.dev-worktrees.json

status

Afficher le statut détaillé d'un ou tous les worktrees.

Usage :

/dev:worktree status [feature-name]

switch

Basculer vers un worktree existant (utilitaire de navigation).

Usage :

/dev:worktree switch <feature-name>

Comportement : Afficher les commandes pour changer de répertoire

Règles de nommage

  • Features : feature/<name> → worktree dans .worktrees/<name>
  • Hotfixes : hotfix/<name> → worktree dans .worktrees/<name>
  • Nom normalisé : kebab-case uniquement (convertir espaces et caractères spéciaux)

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/git-worktrees-management-mm78nnx6/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/git-worktrees-management-mm78nnx6' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-worktrees-management-mm78nnx6/download' --output '.skill-downloads/git-worktrees-management-mm78nnx6/SKILL.md.part' && mv '.skill-downloads/git-worktrees-management-mm78nnx6/SKILL.md.part' '.skill-downloads/git-worktrees-management-mm78nnx6/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/git-worktrees-management-mm78nnx6/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills