🌿
AutomationTypeScript

Git Worktree

by UfoMiao

Git Worktree is an Automation skill for Claude Code, published by UfoMiao in zcf.

6.1K stars424 forkson UfoMiao/zcfAdded 2026/08/15Repository updated 2026/08/12
agentaiai-agentbmad-methodccrclaudeclaude-4claude-aiclaude-codecligptgpt-5llmllm-codenodejsopenaiprompttypescriptworkflowzcf
Install in seconds
Install Git Worktree
Copy Git Worktree 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/UfoMiao/zcf/tree/main/templates/skills/zh-CN/git-worktree ~/.claude/skills/git-worktree

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/UfoMiao/zcf.git

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

In this catalog

Source file
templates/skills/zh-CN/git-worktree/SKILL.md in UfoMiao/zcf
Installs to
~/.claude/skills/git-worktree
Collection
One of 20 skills cataloged from this repository
Category
Automation1523 skills

What Git Worktree does

Git Worktree manages Git worktrees in a structured sibling directory (../.zcf/项目名/<path>) with smart defaults, IDE integration, and content migration. Use /git-worktree to add, list, remove, prune, and migrate worktrees with safety checks.

Git Worktree is cataloged under Automation on DirSkills. Git Worktree comes from a repository tagged agent, ai, ai-agent, bmad-method and ccr.

Documentation

README

Claude Command: Git Worktree

管理 Git worktree,支持智能默认、IDE 集成和内容迁移,使用结构化的 ../.zcf/项目名/ 路径。

直接执行命令并提供简洁结果。


Usage

# 基本操作
/git-worktree add <path>                           # 从 main/master 创建名为 <path> 的新分支
/git-worktree add <path> -b <branch>               # 创建指定名称的新分支
/git-worktree add <path> -o                        # 创建并直接用 IDE 打开
/git-worktree list                                 # 显示所有 worktree 状态
/git-worktree remove <path>                        # 删除指定的 worktree
/git-worktree prune                                # 清理无效 worktree 记录

# 内容迁移
/git-worktree migrate <target> --from <source>     # 迁移未提交内容
/git-worktree migrate <target> --stash             # 迁移 stash 内容

Options

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

Commands Git Worktree provides

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

  • /git-worktree

Frequently asked about Git Worktree

  • What else does UfoMiao publish alongside Git Worktree?

    Git Worktree is one of 20 skills that DirSkills catalogs from UfoMiao/zcf, the repository it ships in. Its siblings there include BMad Init, BMad Init and Feature Development. Each one is a separate skill with its own page in this directory, installs the same way Git Worktree does, and is maintained by UfoMiao in that same repository. The rest of the collection is listed on the UfoMiao/zcf page.

  • How does Git Worktree compare to other Automation skills?

    Git Worktree ranks #221 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 Git Worktree against them. Open each page to compare what they document and how they install.

More from UfoMiao/zcf

Git Worktree is one of 20 skills cataloged on DirSkills from UfoMiao/zcf.

See all 20 skills
🚀
2w ago

BMad Init

BMad Init initializes or updates BMad-Method (V6) in a project, running the official installer, fixing known output folder bugs, and updating .gitignore. Use it for fresh installs, quick updates, or legacy V4 migration.
AI Engineering
6.1K424
🚀
2w ago

BMad Init

BMad Init initializes or updates BMad-Method V6 in a project, checking for legacy V4 installations and running the appropriate non-interactive installer. It also fixes known installer output-folder issues and keeps .gitignore aligned with V6.
AI Engineering
6.1K424
🛠️
2w ago

Feature Development

Feature Development turns a new feature request into a plan, discussion, and execution workflow. It uses planning and design agents to produce implementation documents and guide development.
AI Engineering
6.1K424
🗂️
2w ago

Feature Planning

Feature Planning analyzes incoming requests to determine whether they are requirement planning, discussion iteration, or execution implementation. It then generates planning documents and coordinates agents to add new features, ensuring frontend tasks have UI designs before development.
AI Engineering
6.1K424
🧹
2w ago

Git Clean Branches

Git Clean Branches safely identifies and cleans up merged or stale Git branches with dry-run mode and protected branch configuration. It helps keep repositories clean without risking accidental deletion of important branches.
DevOps
6.1K424
🧹
2w ago

Git Clean Branches

Git Clean Branches identifies and safely deletes merged or stale Git branches, defaulting to a dry-run preview. Use it to clean local and remote branches after merges or inactivity.
DevOps
6.1K424