AgentSkillsCN

worktree-create

为并行代理协作创建隔离的 Git 工作树。

SKILL.md
--- frontmatter
name: worktree-create
description: Create an isolated git worktree for parallel agent work.
argument-hint: "<task-id>"
allowed-tools: Bash(git *), Read
model: haiku

/worktree-create

Create worktree for task: $ARGUMENTS

bash
# Check max concurrent worktrees (5 limit)
git worktree list | wc -l

# Create branch and worktree
git worktree add ../worktree-$ARGUMENTS -b task/$ARGUMENTS

# Verify
git worktree list

Report the worktree path: ../worktree-$ARGUMENTS

Rules:

  • Max 5 concurrent worktrees
  • If worktree already exists for this task, report it
  • Branch naming: task/<task-id>