using-git-worktrees

Create isolated git worktrees with priority-based directory selection and safety checks.

35|13|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/wildwasser/opencode-agents --skill using-git-worktrees-wildwasser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/wildwasser/opencode-agents/tree/main/.opencode/skills/using-git-worktrees
Command: npx skills add https://github.com/wildwasser/opencode-agents --skill using-git-worktrees-wildwasser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees provide isolated workspaces that share the same repository, enabling concurrent feature work without switching branches. Core principle: Systematic directory selection + safety verification = reliable isolation.

Core Features & Use Cases

  • Directory selection with priority: prefer .worktrees, then worktrees, then CLAUDE.md directives.
  • Safety verification ensures the worktree directory is ignored by git before creating the worktree to prevent accidental commits.
  • Auto-detection and project setup across common ecosystems (Node.js, Rust, Python, Go) based on project files.
  • Clear workflow prompts and reporting for readiness to implement a feature.

Quick Start

Create an isolated worktree for your feature branch and verify ignore rules before proceeding.

Frequently Asked Questions about using-git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an isolated git worktree for feature development?

Git worktrees enable isolated feature development by creating a separate workspace sharing the same repository. The tool automates directory selection, prioritizing .worktrees, then worktrees, then CLAUDE.md directives to establish the isolated branch workspace.

Why does my git worktree show up in commits?

Accidental commits happen when the worktree directory is not ignored. Safety verification checks validate gitignore rules before creating the worktree, ensuring the isolated workspace directory is properly excluded from repository tracking.

Can I set up git worktrees for Node.js, Rust, Python, or Go projects?

Git worktrees support auto-detection and project setup across Node.js, Rust, Python, and Go ecosystems. The tool detects project files and automatically runs the required setup commands to prepare the isolated worktree environment.

What is the best way to manage multiple feature branches without switching?

Git worktrees provide isolated workspaces that share the same repository, enabling concurrent feature development without branch switching. Systematic directory selection and safety verification ensure reliable isolation across multiple active features.

Do I need to configure gitignore before using git worktrees?

Validating gitignore rules is required before creating a git worktree. Safety verification ensures the worktree directory is ignored by git beforehand, preventing accidental commits of the isolated workspace files into the main repository.