using-git-worktrees

Create isolated Git worktrees for feature work with baseline test verification.

11|1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/Arcanada-one/datarim --skill using-git-worktrees-arcanada-one
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/Arcanada-one/datarim/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/Arcanada-one/datarim --skill using-git-worktrees-arcanada-one

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents accidental changes to your primary branch by ensuring feature work happens in an isolated workspace, even when your environment limits native tooling.

Core Features & Use Cases

  • Detects existing isolation: Identifies whether you are already inside a linked worktree and avoids creating nested or redundant worktrees.
  • Uses native worktree tools when available: Leverages runtime-provided mechanisms to create the workspace safely and consistently.
  • Falls back to git worktree add with guardrails: Selects an appropriate directory location, verifies project-local ignore rules, and handles sandbox permission failures.
  • Baseline verification: Installs dependencies when a manifest is present and runs the project’s canonical tests before you implement anything.

Quick Start

Use the using-git-worktrees skill to set up an isolated worktree workspace for your next feature and verify tests pass.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I isolate feature development work from my main Git checkout?

Git worktrees isolate feature development by creating a separate linked workspace, preventing accidental changes to your primary branch while allowing dependency installation and baseline tests to run cleanly.

What is the best way to run a clean baseline test suite before implementing new features?

Running baseline tests in an isolated Git worktree ensures a clean environment by installing dependencies from the manifest first, verifying the canonical test suite passes before you implement any new feature code.

How does Git worktree handling work when submodules are present in the repository?

Git worktree creation handles submodules correctly by applying native worktree tooling or falling back to `git worktree add`, ensuring linked worktrees and their submodule dependencies are properly initialized across the isolated workspace.

Does creating a Git worktree check if I am already in an isolated workspace?

Yes, Git worktree creation detects existing isolation first to prevent nested or redundant worktrees, checking whether you are already inside a linked worktree before attempting to add a new isolated directory.

What happens if sandbox permissions fail when adding a Git worktree to a project-local path?

When sandbox permission failures occur during `git worktree add`, the process applies directory-priority selection and ignore verification for project-local paths to safely handle the fallback workspace creation.

Can I use native worktree tooling instead of manually running git worktree add commands?

Yes, the process prefers native worktree tools when available to create the workspace safely and consistently, only falling back to manual `git worktree add` commands with guardrails if native tooling is absent.