🌳
DevOpsPython

Using Git Worktrees

by GanyuanRan

Using Git Worktrees is a DevOps skill for Claude Code, published by GanyuanRan in Aegis.

1.1K stars50 forkson GanyuanRan/AegisAdded 2026/08/21+2% in starsRepository updated 2026/08/19
agent-skillsai-agentsai-codingarchitecture-driven-developmentawsome-coding-pluginbaseline-firstclaude-codecodexcoding-agentsdivedsh-pluginevidence-drivenfirst-principlesopencodesoftware-architecturespec-driven-developmentspec-kit
Install in seconds
Install Using Git Worktrees
Copy Using Git Worktrees into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/GanyuanRan/Aegis/tree/main/skills/using-git-worktrees ~/.claude/skills/using-git-worktrees

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/GanyuanRan/Aegis.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
skills/using-git-worktrees/SKILL.md in GanyuanRan/Aegis
Installs to
~/.claude/skills/using-git-worktrees
Collection
One of 22 skills cataloged from this repository
Category
DevOps798 skills

What Using Git Worktrees does

Using Git Worktrees helps when a task needs a separate checkout, dirty state blocks branch switching, or the repository explicitly requires a worktree. It guides safe creation, placement, setup, and cleanup of task-owned worktrees.

Using Git Worktrees is cataloged under DevOps on DirSkills. Using Git Worktrees comes from a repository tagged agent-skills, ai-agents, ai-coding, architecture-driven-development and awsome-coding-plugin.

Documentation

README

Using Git Worktrees

Overview

A worktree is an exception for simultaneously checking out another Git history, not a general safety badge. Prefer the current workspace and reuse an existing suitable worktree. A branch decision and a worktree decision are separate.

Core principle: create only with necessity and ownership evidence; pair every created worktree with a cleanup path.

Announce at start: explain which concrete checkout conflict requires a worktree.

Step 0: Environment Detection

Before mutation, record the repository root, HEAD, branch/detached state, staged/unstaged/untracked paths, active Git operations, and:

git worktree list --porcelain

This is the opening of the README. Read the full README on GitHub.

Commands Using Git Worktrees provides

Slash commands named in this skill’s SKILL.md, listed in the order they first appear.

  • /branch

Frequently asked about Using Git Worktrees

  • What else does GanyuanRan publish alongside Using Git Worktrees?

    Using Git Worktrees is one of 22 skills that DirSkills catalogs from GanyuanRan/Aegis, the repository it ships in. Its siblings there include Aegis Goal Framing, Anti-Entropy Governance and Brainstorming. Each one is a separate skill with its own page in this directory, installs the same way Using Git Worktrees does, and is maintained by GanyuanRan in that same repository. The rest of the collection is listed on the GanyuanRan/Aegis page.

  • How does Using Git Worktrees compare to other DevOps skills?

    Using Git Worktrees ranks #420 by stars among the 798 DevOps skills in this catalog. The most-starred ones next to it are Backend Patterns, API Connector Builder and Migration. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Using Git Worktrees against them. Open each page to compare what they document and how they install.

More from GanyuanRan/Aegis

Using Git Worktrees is one of 22 skills cataloged on DirSkills from GanyuanRan/Aegis.

See all 22 skills
🎯
1w ago

Aegis Goal Framing

Aegis Goal Framing creates a thin goal frame before execution when a user sets an Aegis goal or asks for scope, success evidence, or stop conditions. It is used to define boundaries before routing into the next workflow.
AI Engineering
1.1K50
🧭
1w ago

Anti-Entropy Governance

Anti-Entropy Governance helps decide when to delete old code paths, collapse duplicate owners, or remove fallbacks safely. It also guards schema, persistence, and source-of-truth changes that need explicit confirmation.
AI Engineering
1.1K50
🧠
1w ago

Brainstorming

Brainstorming helps turn ambiguous or high-complexity ideas into clearer designs by asking focused questions, comparing approaches, and shaping a spec before implementation. Use it for new features, architecture, contracts, or plan pressure-tests.
AI Engineering
1.1K50
🔍
1w ago

Code Review Reception

Code Review Reception helps you evaluate code review feedback before making changes. Use it when comments are unclear, risky, disputed, or may conflict with the codebase or prior decisions.
Quality
1.1K50
✍️
1w ago

Communicating Concisely

Communicating Concisely shortens responses when the user asks for caveman mode, fewer tokens, or brief answers. It drops filler and keeps technical details exact until turned off.
Writing
1.1K50
🤖
1w ago

Dispatching Parallel Agents

Dispatching Parallel Agents delegates unrelated tasks to separate agents with isolated context. Use it when 2+ independent problems can be worked in parallel; otherwise handle them inline or with a planned subagent workflow.
AI Engineering
1.1K50