using-git-worktrees

Creates isolated git worktrees for feature development while preserving the current workspace.

131|4|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/AlphaLab-USTC/OhMyCode --skill using-git-worktrees-alphalab-ustc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/AlphaLab-USTC/OhMyCode/tree/main/.agents/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/AlphaLab-USTC/OhMyCode --skill using-git-worktrees-alphalab-ustc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you start implementation work in an isolated git worktree without disturbing your current branch or workspace, while avoiding common setup mistakes.

Core Features & Use Cases

  • Workspace Isolation: Creates a separate branch workspace for feature work, experiments, or agent-driven implementation.
  • Directory Selection: Chooses an existing worktree location when available, follows repository conventions from CLAUDE.md, or asks the user when needed.
  • Safety Verification: Checks whether project-local worktree directories are ignored before creation to prevent accidental tracking.
  • Baseline Validation: Installs project dependencies when appropriate and runs tests to confirm the new workspace starts clean.
  • Use Case: Use this when you are about to implement a feature, delegate a coding task, or need a parallel workspace for risky changes.

Quick Start

Tell the assistant to set up an isolated git worktree for your current feature branch and verify the workspace is safe before continuing.

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 without disturbing my current branch?

This Skill creates an isolated git worktree for feature development while preserving your current workspace, selecting directories based on existing conventions or user input.

How do I make sure my git worktree directory is gitignored properly?

To ensure your worktree directory is gitignored, this Skill performs safety verification by checking whether project-local worktree paths are ignored before creation to prevent accidental tracking.

Can I use git worktrees for parallel branch work and agent-driven coding tasks?

Yes, git worktrees support parallel branch work and agent-driven coding tasks by providing directory selection, setup detection, and baseline test validation for isolated workspaces.

What is the best way to set up a safe workspace for risky feature changes?

Creating an isolated git worktree is the best way to set up a safe workspace for risky changes, as it installs dependencies and runs baseline tests to confirm a clean start.

Do I need to run dependency installation and tests before using a new git worktree?

Yes, this Skill requires running dependency installation and tests as baseline validation to confirm the new git worktree workspace starts clean before reporting readiness.

Why does my git worktree setup fail when repository conventions are not followed?

Git worktree setup fails without repository conventions because this Skill requires checking CLAUDE.md rules, verifying gitignored paths, and detecting setup configurations before creating worktrees.