using-git-worktrees

Create an isolated git worktree with baseline test verification.

Updated May 28, 2026
One-click install
npx skills add https://github.com/haryelramalho/skills --skill using-git-worktrees-haryelramalho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/haryelramalho/skills/tree/main/skills/community/using-git-worktrees
Command: npx skills add https://github.com/haryelramalho/skills --skill using-git-worktrees-haryelramalho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents feature work from clobbering your current checkout by creating or reusing an isolated workspace before implementation begins.

Core Features & Use Cases

  • Isolation Detection: Checks whether you are already in a linked worktree or a submodule before doing anything.
  • Native-First Setup: Uses platform-native worktree tooling when available so the harness can manage the workspace cleanly.
  • Git Fallback with Guardrails: Falls back to manual git worktree creation only when needed, with ignore verification, directory selection rules, and sandbox-aware handling.
  • Baseline Validation: Automatically installs dependencies and runs the project’s baseline tests before work starts.
  • Use Case: Start a risky branch implementation without polluting your active branch, then confirm the environment is ready before you edit code.

Quick Start

Ask the assistant to set up an isolated worktree for this repository and verify the baseline tests before beginning your changes.

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 workspace for feature branch development?

Git worktree isolation creates a separate linked working directory for your branch, allowing you to start risky feature implementations without polluting your current checkout. The Skill detects existing isolation, uses native worktree tools when available, or falls back to manual git worktree creation with guardrails.

What's the best way to prevent feature work from disturbing my current git checkout?

To prevent feature work from disturbing your current git checkout, use a linked git worktree. This Skill detects whether you are already in an isolated worktree or submodule, then uses native worktree tooling or a git fallback to create a separate working directory for your branch.

Can I run baseline tests automatically before starting branch work in a git worktree?

Yes, you can run baseline tests automatically. After creating the isolated git worktree, the Skill installs project dependencies and runs the baseline test suite to validate the environment, ensuring your workspace is ready before you begin editing code.

Does git worktree creation work inside existing submodules or linked worktrees?

Git worktree creation checks for existing isolation first. If you are already inside a linked worktree or a submodule, the Skill detects this state before taking action, preventing duplicate workspace setup and avoiding nested directory conflicts during feature branch isolation.

What happens if native worktree tooling is not available on my platform?

If native worktree tooling is unavailable, the Skill falls back to manual git worktree creation. This fallback applies ignore verification, sandbox-aware directory handling, and directory selection rules to safely isolate the workspace for your feature branch.