using-git-worktrees

Create isolated git worktrees with setup and baseline tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents branch interference and accidental commits to the current workspace by creating isolated, project-aware git worktrees with safety verification and an automated project setup and baseline test check.

Core Features & Use Cases

  • Systematic directory selection that prefers .worktrees or worktrees, falls back to a global cadence location, or asks the user when ambiguous.
  • Safety verification that ensures project-local worktree directories are listed in .gitignore and will add and commit the ignore entry if missing.
  • Automated creation of a new worktree branch, auto-run of project setup based on manifest files (package.json, Cargo.toml, pyproject.toml, requirements.txt, go.mod), and execution of the project's test command to verify a clean baseline before work proceeds.
  • Use case: Starting feature work for an authentication flow on a new branch while keeping the main workspace untouched and guaranteeing tests pass before implementation.

Quick Start

Create an isolated worktree for branch feature/auth using the preferred worktrees directory, ensure the directory is ignored in git, run the project's setup based on detected manifests, and verify tests pass before implementing the feature.

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 to prevent accidental commits to my main workspace?

Creating an isolated git worktree involves selecting a directory, adding it to .gitignore, creating a branch, auto-running setup commands based on detected manifests, and running the test suite to verify a clean baseline before proceeding.

What is the best way to manage separate branch workspaces when starting feature work?

The best way to manage separate branch workspaces is using isolated git worktrees, which prevent branch interference and accidental commits by keeping the main workspace untouched while guaranteeing baseline tests pass before implementation.

Does git worktree setup automatically run project dependency installation for package.json and pyproject.toml?

Yes, the setup automatically runs project dependency installation by detecting manifest files like package.json, Cargo.toml, pyproject.toml, requirements.txt, and go.mod, executing the appropriate setup commands for the new worktree.

How do I ensure my worktrees directory is ignored in git before creating a new branch workspace?

To ensure your worktrees directory is ignored in git, the Skill verifies project-local directories are listed in .gitignore and automatically adds and commits the ignore entry if it is missing before proceeding with worktree creation.

Can I use git worktrees for subagent-driven development that requires a clean test baseline?

Yes, you can use git worktrees for subagent-driven development because the Skill executes the project's test suite immediately after setup, verifying a clean baseline and preventing workspace conflicts before isolated branch work proceeds.

When should I not use a designated worktrees directory for branch isolation?

You should avoid using a designated worktrees directory if the location is ambiguous and cannot be resolved by falling back to a global cadence location, as the workflow will halt and ask the user to specify the correct path before proceeding.