๐ŸŒฟ
AutomationRust

Using Git Worktrees

by xintaofei

Using Git Worktrees is an Automation skill for Claude Code, published by xintaofei in codeg.

2.8K stars344 forkson xintaofei/codegAdded 2026/08/17+3% in starsRepository updated 2026/08/17
acpagentclaude-codeclinecode-generationcodebuddycodexgemini-cligrok-buildguihermes-agentkimi-codeopenclawopencodepiworktree
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/xintaofei/codeg/tree/main/src-tauri/experts/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/xintaofei/codeg.git

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

In this catalog

Source file
src-tauri/experts/skills/using-git-worktrees/SKILL.md in xintaofei/codeg
Installs to
~/.claude/skills/using-git-worktrees
Collection
One of 25 skills cataloged from this repository
Category
Automation โ€” 1523 skills

What Using Git Worktrees does

Using Git Worktrees sets up an isolated git worktree for feature work, ensuring changes stay separate from the current workspace. Use it when starting feature work or before executing implementation plans, preferring native worktree tools and falling back to manual git worktrees.

Using Git Worktrees is cataloged under Automation on DirSkills. Using Git Worktrees comes from a repository tagged acp, agent, claude-code, cline and code-generation.

Documentation

README

Using Git Worktrees

Overview

Ensure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available.

Core principle: Detect existing isolation first. Then use native tools. Then fall back to git. Never fight the harness.

Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."

Step 0: Detect Existing Isolation

Before creating anything, check if you are already in an isolated workspace.

GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
BRANCH=$(git branch --show-current)

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.

  • /worktree

Frequently asked about Using Git Worktrees

  • What else does xintaofei publish alongside Using Git Worktrees?

    Using Git Worktrees is one of 25 skills that DirSkills catalogs from xintaofei/codeg, the repository it ships in. Its siblings there include Brainstorming, Citation Management and Code Review Reception. 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 xintaofei in that same repository. The rest of the collection is listed on the xintaofei/codeg page.

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

    Using Git Worktrees ranks #438 by stars among the 1523 Automation skills in this catalog. The most-starred ones next to it are Autonomous Loops, Autonomous Agent Harness and Automation Audit Ops. 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 xintaofei/codeg

Using Git Worktrees is one of 25 skills cataloged on DirSkills from xintaofei/codeg.

See all 25 skills โ†’
๐Ÿ’ก
2w ago

Brainstorming

Brainstorming turns ideas into fully formed designs and specs through collaborative dialogue, asking clarifying questions and proposing approaches before implementation. Use it before any creative or coding work to align on requirements and get approval.
AI Engineering
2.8K344
๐Ÿ“š
2w ago

Citation Management

Citation Management searches Google Scholar and PubMed for papers, extracts accurate metadata, validates citations, and generates properly formatted BibTeX entries. Use it when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.
Writing
2.8K345
๐Ÿงช
2w ago

Code Review Reception

Code Review Reception establishes a verification-first workflow for responding to code review feedback, requiring technical evaluation and clarification before implementation rather than performative agreement. Use it when receiving feedback from humans or external reviewers to avoid blind implementation and ensure changes fit the codebase.
Quality
2.8K344
๐Ÿค–
2w ago

Dispatching Parallel Agents

Dispatching Parallel Agents delegates independent tasks to multiple concurrent subagents to investigate and fix issues in parallel. Use it when you have 2+ independent tasks that can be worked on without shared state or sequential dependencies.
AI Engineering
2.8K344
๐Ÿ“‹
2w ago

Executing Plans

Executing Plans loads a written implementation plan, reviews it critically, executes all tasks with verification, and reports when complete. Use it when you have a written implementation plan to execute in a separate session with review checkpoints.
Automation
2.8K344
๐Ÿงช
2w ago

Experimental Design

Experimental Design plans experiments and studies before data collection, choosing a design, randomizing, blocking, and laying out treatment combinations so results are interpretable. Use it when assigning subjects to groups, screening factors, or setting up factorial or response-surface designs.
Data
2.8K345