From orchestrator-plugin
Disciplined diagnosis loop for hard bugs and performance regressions, adapted for the Hub-and-Spoke architecture. Reproduce → minimise → hypothesise → instrument → handoff to planner → fix → regression-test. Use when the user reports a bug, exception, stack trace, or performance regression.
How this skill is triggered — by the user, by Claude, or both
Slash command
/orchestrator-plugin:diagnoseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A discipline for hard bugs. In a Hub-and-Spoke model, debugging is not a monolithic activity; it is divided across specialized agents to protect context windows.
A discipline for hard bugs. In a Hub-and-Spoke model, debugging is not a monolithic activity; it is divided across specialized agents to protect context windows.
When exploring the codebase, use the codegraph MCP server and project domain glossary to get a clear mental model of the relevant modules. Call the MCP tool (codegraph_*) to gather precise context instead of reading full files, unless absolutely necessary (e.g., using grep_search for UI strings).
python {{HARNESS_DIR}}/scripts/extract_stacktrace.py <logfile> to isolate the error.Actor: @orchestrator
If a bug is reported, the Orchestrator MUST NOT delegate to the @planner immediately.
@planner sub-agent.@planner to activate the diagnose skill and produce a artifacts/diagnosis_report.md.Actor: @planner
This is the most critical phase. If you have a fast, deterministic, agent-runnable pass/fail signal for the bug, you will find the cause. If you don't have one, no amount of staring at code will save you.
If you genuinely cannot build a loop in this environment: Stop. State what you tried in your artifact. Do not proceed to Phase 2 until you have a loop you believe in, or you have explicit permission to proceed via static analysis alone.
Actor: @planner
Run the loop. Watch the bug appear. Confirm the failure is reproducible across multiple runs and captures the exact symptom.
Actor: @planner
Generate 3–5 ranked hypotheses before testing any of them. Single-hypothesis generation anchors on the first plausible idea. Each hypothesis must be falsifiable: "If is the cause, then will make the bug disappear."
Actor: @planner
Each probe must map to a specific prediction from Phase 3. Change one variable at a time using targeted logs or debugger inspection. Tag debug logs (e.g., [DEBUG-a4f2]).
Once the root cause is isolated, DO NOT FIX IT. You must write your findings to artifacts/diagnosis_report.md. The report MUST include:
Actor: @planner
The @planner consumes artifacts/diagnosis_report.md.
It creates a design doc and execution plan for the fix, focusing heavily on how to safely implement the fix without breaking adjacent features.
Actor: @implementer
The @implementer consumes the plan.
[DEBUG-...] instrumentation left by the Architect.Then ask: what would have prevented this bug? If the answer involves architectural change, hand off to the improve-codebase-architecture skill with specifics after the fix is merged.
npx claudepluginhub mapengbo0314/e2g --plugin orchestrator-pluginCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.