Loading...
Loading...
Coordinates multiple Claude instances across worktrees. Use when managing parallel development.
npx skill4agent add yonatangross/orchestkit worktree-coordinationAgent Teams (CC 2.1.33+): Whenis set, native Agent Teams provides built-in teammate lifecycle management, peer-to-peer messaging, and shared task lists. This skill's custom file locking and coordination registry are superseded by Teams' native coordination. Use this skill only for non-Teams worktree scenarios (e.g., multiple independent Claude Code sessions without a shared team).CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
/worktree-status [--json] [--clean]cc-worktree-status/worktree-claim src/auth/login.ts/worktree-release src/auth/login.ts/worktree-sync [--check-conflicts] [--pull-decisions]--check-conflicts--pull-decisions/worktree-decision "Using Passport.js for OAuth" --rationale "Better middleware support"┌─────────────────────────────────────────────────────────┐
│ FILE: src/auth/oauth.ts │
├─────────────────────────────────────────────────────────┤
│ Status: LOCKED │
│ Holder: cc-auth-a1b2c3 │
│ Branch: feature/user-authentication │
│ Task: Implementing OAuth2 login flow │
│ Since: 2 minutes ago │
├─────────────────────────────────────────────────────────┤
│ Action: Wait for release or use /worktree-release │
└─────────────────────────────────────────────────────────┘.claude/coordination/registry.json{
"instances": {
"cc-auth-a1b2c3": {
"worktree": "/Users/dev/worktrees/feature-auth",
"branch": "feature/user-authentication",
"task": "Implementing OAuth2",
"files_locked": ["src/auth/oauth.ts"],
"started": "-01-08T14:30:00Z",
"last_heartbeat": "-01-08T14:45:32Z"
}
},
"file_locks": {
"src/auth/oauth.ts": {
"instance_id": "cc-auth-a1b2c3",
"acquired_at": "-01-08T14:35:00Z",
"reason": "edit"
}
},
"decisions_log": [
{
"id": "dec-001",
"instance_id": "cc-auth-a1b2c3",
"decision": "Use Passport.js for OAuth",
"rationale": "Better middleware support",
"timestamp": "-01-08T14:40:00Z"
}
]
}bin/# Create new coordinated worktree
cc-worktree-new <feature-name> [--base <branch>]
# Check status of all worktrees
cc-worktree-status [--json] [--clean]
# Sync context and check conflicts
cc-worktree-sync [--check-conflicts] [--pull-decisions]/worktree-claim/worktree-decisioncc-worktree-sync --check-conflicts/worktree-statuscc-worktree-status --clean.claude-local/instance-id.txt.claude/coordination/git-workflowcommitstacked-prsarchitecture-decision-record| Decision | Choice | Rationale |
|---|---|---|
| Lock granularity | File-level | Balances conflict prevention with parallel work flexibility |
| Stale detection | 5 min heartbeat timeout | Long enough for normal pauses, short enough for quick cleanup |
| Registry location | .claude/coordination/ | Shared across worktrees via symlink, version-controlled |
| Lock acquisition | Automatic on Write/Edit | Prevents accidental conflicts without manual intervention |
| Decision sharing | Centralized log | All instances see architectural decisions in real-time |