moai-workflow-worktree

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

2|Updated May 27, 2026
One-click install
npx skills add https://github.com/yekinya/moai-novel --skill moai-workflow-worktree-yekinya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-workflow-worktree
Source: https://github.com/yekinya/moai-novel/tree/main/moai-novel/.claude/skills/moai-workflow-worktree
Command: npx skills add https://github.com/yekinya/moai-novel --skill moai-workflow-worktree-yekinya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developing multiple SPECs or features on a single branch causes merge conflicts, context-switching overhead, and blocked parallel work. This Skill creates isolated Git worktrees per SPEC so each feature gets its own branch, files, and environment without interfering with others. ## Core Features & Use Cases - Isolated Worktree Management: Create, switch, sync, and remove Git worktrees per SPEC with a central JSON registry tracking status, branches, and sync history. - MoAI-ADK Workflow Integration: Automatic worktree creation during /moai:1-plan, isolated development during /moai:2-run, and synchronization plus cleanup during /moai:3-sync. - Team and Parallel Coordination: Shared registries with developer prefixes, conflict resolution strategies, templates, and batch operations for multi-SPEC development. - Use Case: Create worktrees for SPEC-AUTH-001 and SPEC-PAY-001, develop both in parallel in separate terminals, sync each with the base branch, then clean up merged worktrees automatically. ## Quick Start Ask the AI to create a new isolated worktree for a SPEC, for example: set up a worktree for SPEC-001 user authentication and switch into it for 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 features in parallel with worktrees?

Create a separate Git worktree per feature using moai-worktree new with the SPEC ID and description, then switch between them with moai-worktree switch or eval $(moai-worktree go SPEC-ID). Each worktree has independent Git state, files, and dependencies.

How do I sync a Git worktree with the main branch?

Run moai-worktree sync SPEC-ID to fetch and merge or rebase the base branch into the worktree. Use --interactive for manual conflict resolution, --auto-resolve for simple conflicts, or --include/--exclude patterns for selective synchronization.

Does this worktree skill integrate with Claude Code and MoAI-ADK?

Yes, it is designed for Claude Code and integrates with the MoAI-ADK workflow. Worktrees are auto-created during /moai:1-plan, used for isolated development in /moai:2-run, and synchronized plus cleaned during /moai:3-sync.

Why does my Git worktree list show stale branches?

Stale worktrees accumulate when merged worktrees are not pruned after use. Run moai-worktree clean --merged-only to remove completed worktrees, and enable the cleanup_merged configuration for automatic cleanup after PR merges.

When should I not use worktree isolation for an agent?

Read-only agents running in plan mode do not need worktree isolation because they cannot write files, so isolation adds overhead with no benefit. Reserve worktrees for implementation agents that modify code in parallel.