Token导航 LogoToken导航TokenDH.com
运维和基础设施执行命令github未标认证来源可访问clear审计通过

moai-worktree摩艾工作树

Agent Skill

moai-worktree 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

196

周安装

8

GitHub Stars

公开资料未说明

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:moai-worktree(摩艾工作树)
来源仓库:https://github.com/rdmptv/adbautoplayer
仓库路径:skills/moai-worktree
安装命令:
npx skills add https://github.com/rdmptv/adbautoplayer --skill moai-worktree
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rdmptv/adbautoplayer --skill moai-worktree

简介

moai-worktree 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合围绕仓库状态或协作事项进行整理。

  • 适用于需要分析代码变更或协作事项的 Codex、Claude、Cursor、Gemini CLI 场景。
  • 通过 npx skills add 命令安装,需结合原始 README 确认具体用法。
  • 安装前建议核实权限范围、维护状态及是否触发联网或文件操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

MoAI Worktree Management

Git worktree management system for parallel SPEC development with isolated workspaces, automatic registration, and seamless MoAI-ADK integration.

Core Philosophy: Each SPEC deserves its own isolated workspace to enable true parallel development without context switching overhead.

Quick Reference (30 seconds)

What is MoAI Worktree Management? A specialized Git worktree system that creates isolated development environments for each SPEC, enabling parallel development without conflicts.

Key Features:

  • Isolated Workspaces: Each SPEC gets its own worktree with independent Git state
  • Automatic Registration: Worktree registry tracks all active workspaces
  • Parallel Development: Multiple SPECs can be developed simultaneously
  • Seamless Integration: Works with /moai:1-plan, /moai:2-run, /moai:3-sync workflow
  • Smart Synchronization: Automatic sync with base branch when needed
  • Cleanup Automation: Automatic cleanup of merged worktrees

Quick Access:

Use Cases:

  • Multiple SPECs development in parallel
  • Isolated testing environments
  • Feature branch isolation
  • Code review workflows
  • Experimental feature development

Implementation Guide (5 minutes)

1. Core Architecture - Worktree Management System

Purpose: Create isolated Git worktrees for parallel SPEC development.

Key Components:

  1. Worktree Registry - Central registry tracking all worktrees
  2. Manager Layer - Core worktree operations (create, switch, remove, sync)
  3. CLI Interface - User-friendly command interface
  4. Models - Data structures for worktree metadata
  5. Integration Layer - MoAI-ADK workflow integration

Registry Structure:

{
 "worktrees": {
 "SPEC-001": {
 "id": "SPEC-001",
 "path": "/Users/goos/worktrees/MoAI-ADK/SPEC-001",
 "branch": "feature/SPEC-001-user-auth",
 "created_at": "2025-11-29T22:00:00Z",
 "last_sync": "2025-11-29T22:30:00Z",
 "status": "active",
 "base_branch": "main"
 }
 },
 "config": {
 "worktree_root": "/Users/goos/worktrees/MoAI-ADK",
 "auto_sync": true,
 "cleanup_merged": true
 }
}

File Structure:

~/worktrees/MoAI-ADK/
 .moai-worktree-registry.json # Central registry
 SPEC-001/ # Worktree directory
 .git # Git worktree metadata
 (project files) # Complete project copy
 SPEC-002/ # Another worktree
 .git
 (project files)

Detailed Reference: Worktree Management Module


2. CLI Commands - Complete Command Interface

Purpose: Provide intuitive CLI commands for worktree management.

Core Commands:

# Create new worktree for SPEC
moai-worktree new SPEC-001 "User Authentication System"

# List all worktrees
moai-worktree list

# Switch to specific worktree
moai-worktree switch SPEC-001

# Get worktree path for shell integration
eval $(moai-worktree go SPEC-001)

# Sync worktree with base branch
moai-worktree sync SPEC-001

# Remove worktree
moai-worktree remove SPEC-001

# Clean up merged worktrees
moai-worktree clean

# Show worktree status
moai-worktree status

# Configuration management
moai-worktree config get
moai-worktree config set worktree_root ~/my-worktrees

Command Categories:

  1. Creation: new - Create isolated worktree
  2. Navigation: list, switch, go - Browse and navigate
  3. Management: sync, remove, clean - Maintain worktrees
  4. Status: status - Check worktree state
  5. Configuration: config - Manage settings

Shell Integration:

# Direct switching
moai-worktree switch SPEC-001

# Shell eval pattern (recommended)
eval $(moai-worktree go SPEC-001)

# Output example:
# cd /Users/goos/worktrees/MoAI-ADK/SPEC-001

Detailed Reference: Worktree Commands Module


3. Parallel Development Workflow - Isolated SPEC Development

Purpose: Enable true parallel development without context switching.

Workflow Integration:

1. Plan Phase (/moai:1-plan):
 SPEC creation
 moai-worktree new SPEC-XXX
 Automatic worktree setup

2. Development Phase:
 Isolated worktree environment
 Independent Git state
 Zero context switching

3. Sync Phase (/moai:3-sync):
 moai-worktree sync SPEC-XXX
 Clean integration
 Conflict resolution

4. Cleanup Phase:
 moai-worktree clean
 Automatic cleanup
 Registry maintenance

Parallel Development Benefits:

  1. Context Isolation: Each SPEC has its own Git state, files, and environment
  2. Zero Switching Cost: Instant switching between worktrees
  3. Independent Development: Work on multiple SPECs simultaneously
  4. Safe Experimentation: Isolated environment for experimental features
  5. Clean Integration: Automatic sync and conflict resolution

Example Workflow:

# Create SPEC-001 worktree
moai-worktree new SPEC-001 "User Authentication"
cd $(moai-worktree go SPEC-001)

# Develop in isolation
/moai:2-run SPEC-001

# Create another worktree
cd /path/to/main/repo
moai-worktree new SPEC-002 "Payment Integration"
cd $(moai-worktree go SPEC-002)

# Parallel development on SPEC-002
/moai:2-run SPEC-002

# Switch back and continue
moai-worktree switch SPEC-001
# Continue development...

# Sync and integrate
moai-worktree sync SPEC-001
moai-worktree sync SPEC-002

Detailed Reference: Parallel Development Module


4. Integration Patterns - MoAI-ADK Workflow Integration

Purpose: Seamless integration with MoAI-ADK Plan-Run-Sync workflow.

Integration Points:

  1. Plan Phase Integration (/moai:1-plan):
# After SPEC creation
moai-worktree new SPEC-{SPEC_ID}

# Output guidance
echo "1. Switch to worktree: moai-worktree switch SPEC-{SPEC_ID}"
echo "2. Or use shell eval: eval $(moai-worktree go SPEC-{SPEC_ID})"
  1. Development Phase (/moai:2-run):
  • Worktree isolation provides clean development environment
  • Independent Git state prevents conflicts
  • Automatic registry tracking
  1. Sync Phase (/moai:3-sync):
# Before PR creation
moai-worktree sync SPEC-{SPEC_ID}

# After PR merge
moai-worktree clean --merged-only

Auto-Detection Patterns:

# Check if worktree environment
if [ -f "../.moai-worktree-registry.json" ]; then
 SPEC_ID=$(basename $(pwd))
 echo "Detected worktree environment: $SPEC_ID"
fi

# Auto-sync on status check
moai-worktree status
# Automatically syncs if out of date

Configuration Integration:

{
 "moai": {
 "worktree": {
 "auto_create": true,
 "auto_sync": true,
 "cleanup_merged": true,
 "worktree_root": "~/worktrees/{PROJECT_NAME}"
 }
 }
}

Detailed Reference: Integration Patterns Module


Advanced Implementation (10+ minutes)

Multi-Developer Worktree Coordination

Shared Worktree Registry:

# Team worktree configuration
moai-worktree config set registry_type team
moai-worktree config set shared_registry ~/team-worktrees/MoAI-ADK/

# Developer-specific worktrees
moai-worktree new SPEC-001 --developer alice
moai-worktree new SPEC-001 --developer bob

# Team coordination
moai-worktree list --all-developers
moai-worktree status --team-overview

Advanced Synchronization Strategies

Selective Sync Patterns:

# Sync only specific files
moai-worktree sync SPEC-001 --include "src/"

# Exclude specific patterns
moai-worktree sync SPEC-001 --exclude "node_modules/"

# Auto-resolve conflicts
moai-worktree sync SPEC-001 --auto-resolve

# Interactive conflict resolution
moai-worktree sync SPEC-001 --resolve-interactive

Worktree Templates and Presets

Custom Worktree Templates:

# Create worktree with specific setup
moai-worktree new SPEC-001 --template frontend
# Includes: npm install, eslint setup, pre-commit hooks

moai-worktree new SPEC-002 --template backend
# Includes: virtual environment, test setup, database config

# Custom template configuration
moai-worktree config set templates.frontend.setup "npm install && npm run setup"
moai-worktree config set templates.backend.setup "python -m venv venv && source venv/bin/activate && pip install -r requirements.txt"

Performance Optimization

Optimized Worktree Operations:

# Fast worktree creation (shallow clone)
moai-worktree new SPEC-001 --shallow --depth 1

# Background sync
moai-worktree sync SPEC-001 --background

# Parallel operations
moai-worktree sync --all --parallel

# Caching for faster operations
moai-worktree config set enable_cache true
moai-worktree config set cache_ttl 3600

Works Well With

Commands:

  • moai:1-plan - SPEC creation with automatic worktree setup
  • moai:2-run - Development in isolated worktree environment
  • moai:3-sync - Integration with automatic worktree sync
  • moai:9-feedback - Worktree workflow improvements

Skills:

  • moai-foundation-core - Parallel development patterns
  • moai-workflow-project - Project management integration
  • moai-workflow-spec - SPEC-driven development
  • moai-git-strategy - Git workflow optimization

Tools:

  • Git worktree - Native Git worktree functionality
  • Rich CLI - Formatted terminal output
  • Click framework - Command-line interface framework

Quick Decision Matrix

ScenarioPrimary PatternSupporting
New SPEC developmentWorktree isolation + Auto-setupIntegration with /moai:1-plan
Parallel developmentMultiple worktrees + Shell integrationFast switching patterns
Team coordinationShared registry + Developer prefixesConflict resolution
Code reviewIsolated review worktreesClean sync patterns
Experimental featuresTemporary worktrees + Auto-cleanupSafe experimentation

Module Deep Dives:

Full Examples: examples.md External Resources: reference.md


Version: 1.0.0 Last Updated: 2025-11-29 Status: Active (Complete modular architecture)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.99%
按下载量换算17

windsurf

23.16%
按下载量换算15

OpenCode

19.93%
按下载量换算13

Codex

14.61%
按下载量换算9

Antigravity

7.5%
按下载量换算5

Gemini CLI

3.51%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/rdmptv/adbautoplayer --skill moai-worktree;npx skills add rdmptv/adbautoplayer --skill "moai-worktree" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills