using-git-worktrees

Create isolated git worktrees with project detection and baseline verification.

141|20|Updated Dec 19, 2025
One-click install
npx skills add https://github.com/julianromli/opencode-template --skill using-git-worktrees-julianromli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/julianromli/opencode-template/tree/main/skill/using-git-worktrees
Command: npx skills add https://github.com/julianromli/opencode-template --skill using-git-worktrees-julianromli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers safely isolate feature work by creating and managing git worktrees, preventing changes from leaking into the main workspace and enabling clean experimentation.

Core Features & Use Cases

  • Safe isolation: automatically selects or creates a dedicated worktree directory, keeping work separate from the main repo.
  • Robust discovery & safety: prioritizes existing local worktrees, respects CLAUDE.md preferences, and verifies ignore rules to avoid accidental commits.
  • End-to-end workflow: detects project name, creates the worktree, installs or builds necessary tooling, and validates a clean baseline before implementation.
  • Use Case: when starting a feature branch, run the setup to automatically provision an isolated environment ready for development.

Quick Start

Tell me to set up an isolated git worktree for the new feature branch.

Frequently Asked Questions about using-git-worktrees

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

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

To set up an isolated git worktree, you can trigger an automated setup that auto-detects the project name, resolves a safe directory path, creates the worktree, and runs project tooling installation to validate a clean baseline for development.

What is the best way to isolate feature branches without impacting my main workspace?

Isolating feature branches is best achieved by creating git worktrees in local or global locations, which separates new changes from the main repo while automatically verifying gitignore rules to prevent accidental commits.

Can I use git worktrees with custom CLAUDE.md project preferences?

Yes, git worktree setup respects CLAUDE.md preferences during directory pre-checks and dynamic path resolution, ensuring your isolated environment aligns with existing project configurations and toolchain requirements.

Does git worktree setup automatically handle dependency installation and builds?

Git worktree setup automatically handles dependency installation and builds by detecting the project type, applying common toolchain configurations, and performing post-creation baseline verification to ensure readiness.

Why do I need directory pre-checks and gitignore verification before creating a worktree?

Directory pre-checks and gitignore verification are needed before creating a worktree to prevent path collisions, ensure safe isolation, and stop worktree-specific files from accidentally leaking into your main repository's commit history.