Create Worktree Skill

Create isolated Git worktrees with feature branches and synchronized Worklogs.

1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/SorraTheOrc/SorraAgents --skill create-worktree-skill-sorratheorc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Create Worktree Skill
Source: https://github.com/SorraTheOrc/SorraAgents/tree/main/skill/create-worktree-skill
Command: npx skills add https://github.com/SorraTheOrc/SorraAgents --skill create-worktree-skill-sorratheorc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, wl, and includes scripts (resource) components.

What problem does it solve?

Agents often need to work on a specific item without polluting the repository root or leaking runtime artifacts. This skill creates isolated worktrees and deterministic feature branches to keep work context clean and reproducible.

Core Features & Use Cases

  • Deterministic creation of isolated worktrees under .worktrees/ using a unique naming convention.
  • Create or checkout a feature branch (feature/<work_item_id>) for focused work, with safeguards if the branch is already checked out elsewhere.
  • Initialize a Worklog in the new worktree and run wl sync to publish the new state, avoiding runtime artifacts propagation.
  • Ensure repository-level Worklog state is synchronized so new worktrees can operate with up-to-date metadata.

Quick Start

Run the canonical script with a work_item_id and agent name to create a new isolated worktree and feature branch.

Frequently Asked Questions about Create Worktree Skill

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

FAQPage Schema
How do I create an isolated git worktree for a specific work item?

Creating an isolated git worktree involves generating a new directory under .worktrees/ and provisioning a deterministic feature branch. This process keeps work context clean, preventing runtime artifacts from polluting the main repository root during parallel work.

Why use git worktrees for parallel agent workflows instead of branching?

Git worktrees provide isolated directory contexts for parallel work items, preventing runtime artifact leakage and repository pollution. Unlike simple branching, worktrees allow multiple items to be worked on simultaneously without switching contexts or disrupting the main workspace.

How do I initialize a Worklog when setting up a new git worktree?

Initializing a Worklog in a new git worktree requires copying default configs from the parent repository and running wl sync. This publishes the new state and ensures the worktree operates with up-to-date metadata without propagating runtime artifacts.

Can I create a feature branch from HEAD and avoid conflicts with existing worktrees?

Yes, feature branches are created from HEAD when needed, with built-in safeguards to prevent conflicts. If a feature branch is already checked out elsewhere, the system detects it to ensure deterministic branch provisioning and avoid overlapping work contexts.

Do I need to sync the repository before creating a new worktree and feature branch?

Yes, repository synchronization is required before starting new worktrees. This ensures repository-level Worklog state is synchronized, allowing new worktrees to operate with up-to-date metadata and preventing stale state issues during parallel work.

What are the limitations of using worktrees for managing multiple work items?

Worktrees require git and wl dependencies, and rely on a strict naming convention under .worktrees/. If a branch is already checked out elsewhere, creation is blocked by safeguards, limiting simultaneous use of the exact same feature branch across different directories.