aiwf-worktree

Creates git worktrees with aiwf rituals materialized in one atomic step.

Updated May 9, 2026
One-click install
npx skills add https://github.com/23min/aiwf --skill aiwf-worktree-23min
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aiwf-worktree
Source: https://github.com/23min/aiwf/tree/main/internal/skills/embedded/aiwf-worktree
Command: npx skills add https://github.com/23min/aiwf --skill aiwf-worktree-23min

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? A bare git worktree add leaves the new worktree without any of aiwf's gitignored, materialize-on-demand artifacts — skills, agents, templates, and per-turn guidance are silently absent until someone remembers to run aiwf update by hand. This Skill ensures every worktree is created with rituals materialized in a single atomic operation. ## Core Features & Use Cases - Atomic worktree creation: Runs git worktree add and materializes skills, role agents, entity templates, and guidance imports in one step, surfacing any git failure directly. - Flexible branch and path handling: Creates a new branch from a --base ref or reuses an existing local branch, with optional explicit path placement inside or outside the repo. - Script-safe output: The --print-path flag prints only the absolute path for shell composition like cd "$(aiwf worktree add <branch> --print-path)". - Use Case: When starting an epic, milestone, or one-off patch branch, or dispatching a subagent that needs an isolated checkout, use this instead of a bare git worktree add so every ritual and slash-command works immediately in the new worktree. ## Quick Start Ask the AI to create a new git worktree for your branch using aiwf worktree add so the worktree is created with all aiwf rituals materialized in one step.

Frequently Asked Questions about aiwf-worktree

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

FAQPage Schema
How do I create a git worktree with aiwf?

Run `aiwf worktree add <branch> --base <base-ref>` to create a new branch and worktree in one step. The command runs git worktree add and materializes aiwf's skills, agents, templates, and guidance into the new worktree atomically.

Why use aiwf worktree add instead of git worktree add?

A bare git worktree add creates a worktree with none of aiwf's gitignored artifacts — no skills, agents, templates, or guidance import. aiwf worktree add runs the same materialization pipeline as aiwf update in the same step, so rituals work immediately.

Can I reuse an existing branch with aiwf worktree add?

Yes, omit the --base flag and aiwf reuses the existing local branch. Passing --base with an existing branch is rejected as a usage error, since you cannot re-point an existing branch's start.

How do I cd into a new worktree from a script?

Use `cd "$(aiwf worktree add <branch> --print-path)"`. The --print-path flag suppresses all other output and prints only the absolute path on success, which is the stable, script-safe surface — never parse the normal ledger output.

Can aiwf place a worktree outside the repository?

Yes, pass an explicit path argument and it is honored verbatim, even outside the repo. Omitting the path resolves to the configured worktree-placement directory plus the branch name.