multi-worktree-dev

Configure layered git worktree environments with automatic port offsets and shared channel switching.

42|7|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/addxai/enterprise-harness-engineering --skill multi-worktree-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: multi-worktree-dev
Source: https://github.com/addxai/enterprise-harness-engineering/tree/main/skills/multi-worktree-dev
Command: npx skills add https://github.com/addxai/enterprise-harness-engineering --skill multi-worktree-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Development teams using git worktrees for parallel feature branch work frequently encounter port conflicts between concurrent environments, contention for singleton shared resources like Feishu WebSocket channels, test isolation failures caused by shared service state, and excessive manual configuration overhead when switching between branches.

Core Features & Use Cases

  • Three-Layer Service Separation: Automatically classifies project services into global shared infrastructure (L1), worktree-exclusive isolated services (L2), and hot-reloaded host processes (L3) to eliminate cross-branch data conflicts.
  • Automatic Port Conflict Resolution: Uses deterministic hash-based port offsets to assign unique ports to each worktree, removing the need for manual port configuration when running multiple environments concurrently.
  • Exclusive Shared Channel Switching: Implements a safe switching mechanism for singleton channels (e.g., Feishu WS) to ensure only one worktree holds the connection at a time, preventing unexpected disconnections during parallel work.
  • Use Case: A 3-person engineering team working on separate feature branches can each run their development environment in their own worktree simultaneously, with no port clashes, no shared service interference, and no manual environment setup.

Quick Start

Use the multi-worktree-dev skill to design a layered parallel development environment for your team's concurrent git worktree workflow, including service isolation rules, port management configuration, and shared channel switching logic.

Frequently Asked Questions about multi-worktree-dev

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

FAQPage Schema
How do I resolve port conflicts when running multiple git worktrees for parallel development?

Port conflicts in parallel git worktree development are resolved by applying deterministic hash-based port offsets that automatically assign unique ports to each worktree environment, eliminating the need for manual port configuration across concurrent feature branches.

How does test isolation work with concurrent git worktrees sharing the same local dev environment?

Test isolation in concurrent git worktrees is achieved through a three-layer service separation architecture that classifies project services into global shared infrastructure, worktree-exclusive isolated services, and hot-reloaded host processes to prevent cross-branch data conflicts.

What is the best way to manage singleton shared resources like Feishu WebSocket channels across multiple worktrees?

Managing singleton shared resources like Feishu WebSocket channels across multiple worktrees requires an exclusive shared channel switching mechanism that ensures only one worktree holds the connection at a time, preventing unexpected disconnections during parallel feature branch work.

Can I use hot-reload functionality while running isolated dev environments in separate git worktrees?

Hot-reload functionality is fully supported in isolated git worktree environments by designating hot-reloaded host processes as the third layer in the service separation architecture, allowing concurrent feature branches to run independently without cross-branch interference.

Does multi-worktree development require manual environment setup when switching between feature branches?

Multi-worktree development eliminates manual environment setup overhead by using idempotent dev lifecycle commands alongside automatic dynamic port offset hashing, allowing teams to run concurrent worktrees with zero manual configuration for port or service isolation.

Why do my concurrent git worktree environments experience shared service state contention during parallel test execution?

Shared service state contention during parallel test execution occurs because concurrent worktrees share singleton resources, which is solved by implementing worktree-exclusive isolated services and exclusive shared channel switching mechanisms to separate test states safely.