원클릭으로
multi-agent
Multi-agent coordination — parallel debugging, parallel building, and sequential review workflows
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Multi-agent coordination — parallel debugging, parallel building, and sequential review workflows
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Dispatch a background worker with role-templated prompt and auto-populated collision fences
Comprehensive system health monitoring — checks agent performance, database, Kafka topics, pattern discovery, and service status across the ONEX platform
Orchestrate a Claude Code agent team to autonomously work a Linear epic across multiple repos
Run DoD evidence checks against a ticket contract and generate a verification receipt
Autonomous per-ticket pipeline that chains ticket-work, local-review, PR creation, CI watching, PR review loop, integration verification gate, and auto-merge into a single unattended workflow with Slack notifications and policy guardrails
Full autonomous audit-debug-fix loop for all dashboard pages — Playwright recon, parallel systematic-debug, fix, PR, Linear ticket, re-audit, iterate until clean. Supports local and cloud targets with optional post-fix redeployment.
| name | multi-agent |
| description | Multi-agent coordination — parallel debugging, parallel building, and sequential review workflows |
| version | 1.0.0 |
| level | advanced |
| debug | false |
| category | workflow |
| tags | ["multi-agent","parallel","subagent","dispatch","coordination"] |
| author | OmniClaude Team |
| composable | true |
| args | [{"name":"--mode","description":"Mode: parallel-debug, parallel-build, or sequential-with-review","required":true},{"name":"--tasks","description":"Task descriptions or file paths (comma-separated for parallel modes)","required":false},{"name":"--max-agents","description":"Maximum concurrent agents (default: 5)","required":false}] |
Multi-agent coordination with three modes:
Announce at start: "I'm using the multi-agent skill in {mode} mode."
When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
Core principle: Dispatch one agent per independent problem domain. Let them work concurrently.
Use when:
Don't use when:
Group failures by what's broken:
Each domain is independent - fixing tool approval doesn't affect abort tests.
Each agent gets:
// In Claude Code / AI environment
Task("Fix agent-tool-abort.test.ts failures")
Task("Fix batch-completion-behavior.test.ts failures")
Task("Fix tool-approval-race-conditions.test.ts failures")
// All three run concurrently
When agents return:
When agents return outputs that overlap (modify the same fields), use geometric conflict classification to merge intelligently.
Within hook scripts, the plugin lib directory (plugins/onex/hooks/lib/) is already on sys.path, so the import is a bare module name:
from reconcile_agent_outputs import reconcile_outputs
If importing from tests or other code outside the plugin context, add the plugin lib to sys.path first:
import sys
from pathlib import Path
root = Path(__file__).resolve().parent
while not (root / "pyproject.toml").exists():
root = root.parent
sys.path.insert(0, str(root / "plugins" / "onex" / "hooks" / "lib"))
from reconcile_agent_outputs import reconcile_outputs
agent_outputs = {
"agent-1": agent_1_result,
"agent-2": agent_2_result,
"agent-3": agent_3_result,
}
base_values = original_state # state before agents ran
result = reconcile_outputs(base_values, agent_outputs)
If result.requires_approval is False: Apply result.merged_values directly. To reconstruct a nested structure:
from reconcile_agent_outputs import unflatten_paths
nested = unflatten_paths(result.merged_values)
If result.requires_approval is True: STOP. Use AskUserQuestion to present each approval-required field with the competing values from each agent. Do NOT attempt to resolve these yourself.
chosen_value=None for these.result.merged_values from the helper. Do not construct merge results manually.result.optional_review_fields) if time permits.Good agent prompts are:
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
1. "should abort tool with partial output capture" - expects 'interrupted at' in message
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
3. "should properly track pendingToolCount" - expects 3 results but gets 0
These are timing/race condition issues. Your task:
1. Read the test file and understand what each test verifies
2. Identify root cause - timing issues or actual bugs?
3. Fix by:
- Replacing arbitrary timeouts with event-based waiting
- Fixing bugs in abort implementation if found
- Adjusting test expectations if testing changed behavior
Do NOT just increase timeouts - find the real issue.
Return: Summary of what you found and what you fixed.
Smart context-aware task executor. Gathers requirements, plans sub-tasks, executes them in parallel via polymorphic agents, validates results, and reports.
This section governs execution. Follow it exactly.
You are an orchestrator. You coordinate polymorphic agents. You do NOT implement code yourself.
Rule: NEVER call Edit(), Write(), or Bash(code-modifying) directly. Rule: ALL Task() calls MUST use subagent_type="onex:polymorphic-agent". No exceptions. Rule: NO git operations in spawned agents. Git is coordinator-only, user-approved only.
Before execution, analyze scope:
Task(
subagent_type="onex:polymorphic-agent",
description="Requirements gathering: analyze task scope",
prompt="Analyze the task and produce a structured breakdown.
Task: {task_description}
Context: {conversation_context}
Produce:
1. Independent sub-tasks (can run in parallel)
2. Sequential dependencies (must run in order)
3. Files/modules involved per sub-task
4. Validation criteria per sub-task
5. Risk assessment
Return structured JSON:
{
\"parallel_tasks\": [{\"id\": \"t1\", \"description\": \"...\", \"files\": [...], \"validation\": \"...\"}],
\"sequential_tasks\": [{\"id\": \"t2\", \"depends_on\": [\"t1\"], \"description\": \"...\"}],
\"risks\": [\"...\"]
}"
)
For each independent task from requirements:
Task(
subagent_type="onex:polymorphic-agent",
description="{task_type}: {description}",
prompt="**Task**: {detailed_description}
**Context**: {context}
**Actions**: {numbered_list}
**Success Criteria**: {validation}
**DO NOT**: Run git commands."
)
Dispatch ALL independent tasks in a single message. Wait before dispatching dependents.
Task(
subagent_type="onex:polymorphic-agent",
description="Quality validation: verify changes",
prompt="Validate changes. Run linting, type checking, tests as applicable.
Files modified: {file_list}
Report: pass/fail per check, issues found."
)
Task(
subagent_type="onex:polymorphic-agent",
description="Refactor: fix quality issues (attempt {n}/3)",
prompt="Fix quality issues: {issues}. Do NOT commit."
)
Present results. Show:
git status --porcelain output (exact list of changed files)Ask the user: "Approve committing these changes and creating a PR with automerge enabled? (yes/no)"
If user says no: stop. All changes remain on disk. If user says yes: proceed to Phase 6.
Prerequisite: Must be on a named branch (not detached HEAD) inside the target git repo root.
# 0. Auth + detached HEAD guard
gh auth status || { echo "ERROR: not logged into GitHub CLI"; exit 1; }
HEAD_BRANCH=$(git branch --show-current)
test -n "$HEAD_BRANCH" || { echo "ERROR: detached HEAD — cannot create PR"; exit 1; }
# 1. Show and stage changes (user already approved in Phase 5)
git status --porcelain
git add -A
# 2. Commit
git commit -m "feat: <concise description from Phase 1 task summary>"
# 3. Resolve repo and push
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
git push -u origin "$HEAD_BRANCH"
# 4. Create PR — resolve number via gh pr view on the PR URL (deterministic anchor)
PR_URL=$(gh pr create \
--title "<commit message title>" \
--repo "$REPO" \
--body "$(cat <<'EOF'
## Summary
<bullet points from Phase 1 requirements>
## Test Plan
- CI must pass
- Changes validated by Phase 3 quality checks
EOF
)")
echo "$PR_URL" | grep -qE 'https://github\.com/.*/pull/[0-9]+' \
|| { echo "ERROR: PR_URL doesn't look like a PR URL: $PR_URL"; exit 1; }
PR_NUMBER=$(gh pr view "$PR_URL" --json number -q .number)
test -n "$PR_NUMBER" || { echo "ERROR: failed to resolve PR number from: $PR_URL"; exit 1; }
# 5. Enable automerge
gh pr merge --auto --squash "$PR_NUMBER" --repo "$REPO"
echo "PR #$PR_NUMBER: $PR_URL"
echo "Automerge armed. GitHub merges when all branch protection requirements are satisfied."
Rule: Phase 6 is git-only coordinator work. Do NOT dispatch to polymorphic agents.
By Type:
By Priority:
Full orchestration logic (execution patterns, refactor tracking, examples, reporting phases)
is documented in prompt.md. The dispatch contracts above are sufficient to execute the skill.
Load prompt.md only if you need reference details for execution patterns, refactor tracking,
or edge case handling.
Execute plan by dispatching fresh subagent per task, with code review after each.
Core principle: Fresh subagent per task + review between tasks = high quality, fast iteration
When NOT to use:
Read plan file, create TodoWrite with all tasks.
For each task:
Dispatch fresh subagent:
Task tool (general-purpose):
description: "Implement Task N: [task name]"
prompt: |
You are implementing Task N from [plan-file].
Read that task carefully. Your job is to:
1. Implement exactly what the task specifies
2. Write tests (following TDD if task says to)
3. Verify implementation works
4. Commit your work
5. Report back
Work from: [directory]
Report: What you implemented, what you tested, test results, files changed, any issues
Subagent reports back with summary of work.
Dispatch code-reviewer subagent:
Task tool (code-reviewer):
Use template at ${CLAUDE_PLUGIN_ROOT}/skills/requesting-code-review/code-reviewer.md
WHAT_WAS_IMPLEMENTED: [from subagent's report]
PLAN_OR_REQUIREMENTS: Task N from [plan-file]
BASE_SHA: [commit before task]
HEAD_SHA: [current commit]
DESCRIPTION: [task summary]
Code reviewer returns: Strengths, Issues (Critical/Important/Minor), Assessment
If issues found:
Dispatch follow-up subagent if needed:
"Fix issues from code review: [list issues]"
After all tasks complete, dispatch final code-reviewer:
After final review passes:
Never:
If subagent fails task:
Skill development -- editing SKILL.md, prompt.md, skill helpers -- is a primary use case. Skill sessions are high-token and consistently exhaust the main context window when done inline.
Pattern:
Skill(skill="onex:multi-agent --mode sequential-with-review")
Then break the skill work into tasks:
Required workflow skills:
ticket-pipeline skill (structured ticket-based pipeline)ticket-work skill (single-ticket implementation)local-review skill (code review)