Skill v1.0.0
Automated scan100/100version: "1.0.0" name: auto-collab description: Automatically split tasks across Codex/Gemini agents with cross-review
Auto-Collaboration Mode
When collaboration mode is enabled (via Dashboard toggle), this skill orchestrates automatic task splitting, agent dispatch, and cross-review.
Prerequisites
camCLI available in PATH- At least one agent type (codex/gemini) available
- Current session has an active task or prompt to work on
Workflow
Step 1: Analyze and Split Task
Analyze the current task context. Determine which parts can be parallelized:
Default role mapping (override by specifying in prompt):
- logic → Codex: Business logic, data processing, algorithms, API integration
- style → Gemini: CSS, layouts, visual design, responsive styling
- test → Codex: Unit tests, integration tests, test fixtures
- docs → Gemini: Documentation, README, comments
Output a split plan before proceeding:
Split Plan:- Role: logic (codex) — [description of logic subtask]- Role: style (gemini) — [description of style subtask]
Ask for confirmation before dispatching.
Step 2: Create Team and Dispatch
# Create teamcam team-create auto-collab-$(date +%s)# Update collab metadatacam agent-meta set <my-session> status dispatchingcam agent-meta set <my-session> team_name <team-name># Spawn agents per rolecam team-spawn <team> <role-name> --agent <agent-type># Send task via inboxcam inbox-send <team> <role-name> "Your task: <description>. Files: <file-list>. When done, send a task_complete message to the orchestrator inbox."# Update statuscam agent-meta set <my-session> status workingcam agent-meta set <my-session> members '["<role1>","<role2>"]'
Step 3: Monitor Completion
Check inbox for task_complete messages from team members:
cam inbox <team> <my-name>
If no completion after 10 minutes, check progress:
cam team-progress <team>
Fallback: If a provider fails to spawn or crashes:
- Log the failure
- Update collab.status to note the fallback
- Do the work yourself in the current session
Step 4: Cross-Review
When all members complete:
cam agent-meta set <my-session> status reviewing# Send review requests via inboxcam inbox-send <team> <member-A> '{"type":"review_request","from":"orchestrator","target_member":"<member-A>","review_of":"<member-B>","files":["<files>"],"context":"Review focus: correctness, style consistency, edge cases"}'cam inbox-send <team> <member-B> '{"type":"review_request","from":"orchestrator","target_member":"<member-B>","review_of":"<member-A>","files":["<files>"],"context":"Review focus: correctness, style consistency, edge cases"}'
Read review results from inbox. If needs_fix:
- Send fix request to original author
- Re-request review after fix (max 3 rounds)
- After 3 rounds, intervene directly
If review times out (15 min), do the review yourself.
Step 5: Merge and Complete
cam agent-meta set <my-session> status merging
- Check for file conflicts:
git diff --name-onlyacross all members' changes - If conflicts exist, resolve them using AI judgment
- Final review of all changes
- Update status:
cam agent-meta set <my-session> status done
- Optionally shut down the team:
cam team-shutdown <team>
Error Handling
| Scenario | Action | |
|---|---|---|
| Agent spawn fails | Retry once, then self-handle | |
| Agent crashes mid-task | Detect via cam list, self-handle remaining | |
| Review timeout (15 min) | Self-review | |
| Fix loop > 3 rounds | Self-fix | |
| User disables collab | Stop monitoring, leave agents running |
Notes
- One collab team per agent at a time
- All agents share the same worktree (cwd)
- Prompt each sub-agent with clear file boundaries to avoid conflicts
- Use
cam agent-meta setfor all status updates so Dashboard reflects progress