create-worktree

Create and manage Git worktrees with prefix-derived paths and branch overrides.

1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/zeveck/zskills-dev --skill create-worktree-zeveck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-worktree
Source: https://github.com/zeveck/zskills-dev/tree/main/.claude/skills/create-worktree
Command: npx skills add https://github.com/zeveck/zskills-dev --skill create-worktree-zeveck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Git-based worktree management for agents can be error-prone without a consistent wrapper. This Skill wraps scripts/create-worktree.sh to ensure prefix-derived paths, optional branch overrides, pre-flight checks, and proper tracking writes (.zskills-tracked, .worktreepurpose).

Core Features & Use Cases

  • Prefix-derived path handling and safe worktree creation
  • Optional --branch-name overrides and pre-flight pruning/fetching
  • Writes .zskills-tracked and .worktreepurpose for traceability
  • Prints the new worktree path to stdout with errors on stderr
  • Use Case: In plan-runner pipelines like run-plan or do to isolate work, test, and track progress

Quick Start

Create a new worktree by running /create-worktree <slug> with a valid --pipeline-id.

Frequently Asked Questions about create-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create isolated git worktrees for automated agent tasks?

You can create isolated git worktrees by running the creation script with a slug and pipeline-id, which enforces pre-flight checks, optional branch overrides, and writes tracking metadata for traceability.

What is the purpose of .zskills-tracked and .worktreepurpose files in a git worktree?

These files provide traceability in agent-driven worktrees by recording tracking metadata and the specific purpose of each isolated worktree, ensuring every automated task is properly logged.

Can I override the default branch name when creating a git worktree for a pipeline?

Yes, you can use optional --branch-name overrides to specify a custom branch when creating a git worktree, while pre-flight fetching and pruning maintain repository consistency.

Does git worktree creation integrate with plan-runner pipelines like run-plan or do?

Git worktree creation integrates with plan-runner pipelines like run-plan or do by isolating work, testing changes, and tracking progress through standardized lifecycle scripts and metadata tracking.

What are the limitations of using automated scripts for git worktree management?

Automated git worktree management requires strict argument validation and path consistency, which limits flexibility if custom path structures are needed outside the enforced prefix-derived handling.