safe-worktree

Create isolated Git worktrees to prevent merge conflicts during concurrent modifications.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/nicolehaugen/CustomMetricsDashboard --skill safe-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-worktree
Source: https://github.com/nicolehaugen/CustomMetricsDashboard/tree/main/.github/skills/safe-worktree
Command: npx skills add https://github.com/nicolehaugen/CustomMetricsDashboard --skill safe-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures that each code modification is performed within an isolated Git worktree, preventing unintentional conflicts and merges.

Core Features & Use Cases

  • Isolation: Segregates code modifications from other changes to avoid merge conflicts.
  • Task-centric: Tailored for tasks where a clean, non-branching workspace is beneficial.
  • Use Case: Ideal for when you want to make changes to the codebase without disrupting ongoing work on other branches.

Quick Start

Start a safe-worktree session for a 'bugfix' task: "invoke safe-worktree task='bugfix'"

Frequently Asked Questions about safe-worktree

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

FAQPage Schema
How do I isolate Git worktrees to avoid merge conflicts during concurrent code modifications?

You can isolate Git worktrees by creating a separate working directory for each task, which prevents unintentional conflicts and merges during concurrent code modifications. This skill executes git fetch and git worktree add to manage these isolated code workspaces automatically.

What is a task-centric Git workflow and when do I need isolated code workspaces?

A task-centric Git workflow segments development into isolated workspaces, ensuring each code modification remains independent. You need this approach when making changes to the codebase without disrupting ongoing work on other branches.

How do I start a safe-worktree session for a specific bugfix task?

To start a safe-worktree session for a bugfix task, you invoke the skill with your specific task name. The skill then executes safety checks and runs git worktree add to generate an isolated workspace for that task.

Does Git worktree isolation work for concurrent development without branching?

Yes, Git worktree isolation works for concurrent development by segregating code modifications from other changes. It is specifically suited for task-oriented workflows where a clean, non-branching workspace is beneficial.

What are the limitations of using Git worktrees for code isolation?

Git worktrees for code isolation require executing safety checks and managing separate directories, which adds an extra layer of management. You should anticipate the overhead of maintaining multiple isolated workspaces rather than a single branching workflow.