moai-workflow-worktree

Manages Git worktrees for parallel SPEC development with isolated workspaces and branch registration.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/jjjh7401/AI-Lighting_Console --skill moai-workflow-worktree-jjjh7401
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: moai-workflow-worktree
Source: https://github.com/jjjh7401/AI-Lighting_Console/tree/main/.claude/skills/moai-workflow-worktree
Command: npx skills add https://github.com/jjjh7401/AI-Lighting_Console --skill moai-workflow-worktree-jjjh7401

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developing multiple SPECs or features on a single Git checkout forces constant context switching, causes merge conflicts, and blocks parallel work. This Skill creates and manages isolated Git worktrees so each SPEC gets its own workspace, branch, and registry entry. ## Core Features & Use Cases - Isolated Worktree Management: Create, switch, sync, and remove Git worktrees per SPEC, tracked in a central JSON registry with atomic updates and file locking. - Parallel Development Workflows: Run multiple SPECs concurrently with independent Git state, dependencies, and development servers, including tmux-based teammate spawning via --spawn. - MoAI-ADK Integration: Aligns worktree lifecycle with the Plan-Run-Sync workflow, including cleanup after PR merges and convention-based team coordination. - Use Case: You need to develop SPEC-AUTH-001 and SPEC-PAY-001 at the same time. Create a worktree for each, switch between them instantly, sync both with the base branch, and clean up merged worktrees automatically. ## Quick Start Ask the AI to create a new isolated Git worktree for your SPEC and switch into it to begin parallel development.

Frequently Asked Questions about moai-workflow-worktree

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

FAQPage Schema
How do I develop multiple Git branches in parallel without switching?▼

Use Git worktrees to check out multiple branches into separate directories simultaneously. Each worktree has independent Git state and files, so you can work on several SPECs at once and switch instantly between directories.

How do I create a Git worktree for a new feature branch?▼

Run the worktree new command with a SPEC ID and description to create an isolated worktree with its own feature branch. Then use the switch or go command to navigate into the worktree directory and start development.

Can I spawn a teammate AI session inside a worktree?▼

Yes, the --spawn flag launches a Claude or GLM session in a new detached tmux window inside the specified worktree. It requires an active tmux session and the tmux and moai binaries in PATH, and is unavailable on Windows.

Why does Git worktree list show stale entries after cleanup?▼

Stale entries remain when worktree branches are not pruned after sessions end. Always run the cleanup or remove command after merging, and verify with git worktree list that no stale worktrees remain.

When should I avoid using worktree isolation for agents?▼

Read-only agents do not need worktree isolation because their tool list omits write capabilities, so isolation only adds overhead. Reserve worktrees for implementation agents that modify files in parallel.