skills/parallel-diagnosis/SKILL.md
Parallel independent root-cause diagnosis for uncertain bugs. Two agents investigate independently, then converge on a unified diagnosis.
npx skillsauth add preetamnath/agent-skills parallel-diagnosisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Two independent agents investigate a bug in parallel, then converge on a single unified diagnosis. Produces structured output that downstream skills (two-pass-review, fix-loop) can act on.
If the problem statement is ambiguous (unclear which subsystem, multiple possible symptoms, or no file paths identified), use the AskUserQuestion tool to narrow scope before spinning up agents. Present what you understand and ask the user to confirm or clarify.
Failure handling:
confidence: "medium" (single source, reduced but not absent).AskUserQuestion tool to escalate, presenting what both attempts returned and asking whether to provide more context, try a different approach, or stop.Compare both diagnosis reports.
agreement: "converged". Proceed to Step 3.agreement: "resolved" (orchestrator resolved) and proceed to Step 3, or agreement: "escalated" (human needed).DiagnosisOutput conforming to the Output Schema below.agreement is "escalated": Wait for the human to resolve. After the human provides direction, produce the DiagnosisOutput incorporating the human's input, set agreement: "resolved", and proceed with the recommended next step.AskUserQuestion with structured options and a recommended choice. Never silently proceed on assumptions.This skill is composable. Its structured output feeds directly into:
affected_files and fix_direction fields give fix-loop enough context to act.root_cause and confidence fields inform what the reviewer should validate.The DiagnosisOutput preserves both raw agent reports for transparency, so downstream skills or the human can trace reasoning back to source.
DiagnosisOutput {
schema_version: string, always "v1",
status: "diagnosed" | "not_a_bug" | "inconclusive",
root_cause: string, unified root cause (1-3 sentences),
confidence: "high" | "medium" | "low",
affected_files: string[], file paths involved in the root cause,
fix_direction: string, what should be fixed and how, in prose — NOT code,
agreement: "converged" | "resolved" | "escalated",
agent_reports: AgentReport[]
}
AgentReport {
agent_id: number, 1 | 2,
root_cause: string, this agent's root cause assessment,
affected_files: string[], file paths this agent identified,
fix_direction: string, this agent's proposed fix direction,
confidence_notes: string, any caveats or uncertainties this agent noted
}
status — "diagnosed": normal case, root cause found and actionable. "not_a_bug": both agents concluded the reported behavior is not a bug — terminal, no downstream skills needed. "inconclusive": couldn't determine root cause, escalated to human for further investigation.confidence — "high": both agents agreed on root cause. "medium": orchestrator resolved a disagreement. "low": significant uncertainty remains (e.g., one agent failed, or orchestrator resolution was shaky).agreement — "converged": agents independently reached the same conclusion. "resolved": agents disagreed but the orchestrator reconciled. "escalated": human input was needed to resolve.root_cause — the unified assessment, not a copy of either agent's report. When agents disagreed and the orchestrator resolved, this reflects the orchestrator's judgment.fix_direction — prose description of what to change and where. Enough detail for fix-loop or a human to act on, but no code.affected_files — union of files from both agents, filtered to those relevant to the unified root cause.agent_reports — both raw reports preserved for transparency. Downstream consumers can trace reasoning back to source.confidence_notes — per-agent field. Agents should be honest about what they're unsure of. Empty string if no caveats.documentation
Collapse a multi-clause instruction into one positive line of trigger + action. TRIGGER when: user says 'tighten this rule', 'make this leaner', 'make this simpler' in a skill, CLAUDE.md, agent prompt, or style guide.
documentation
File-level tightening pass on an instruction file (CLAUDE.md, skill, agent prompt, style guide) using `tighten-instruction` as the lens. TRIGGER when: user says 'tighten/simplify this file/skill/CLAUDE.md', 'cut this down'; user points at a verbose instruction file and wants it leaner.
testing
Anchored second-opinion on one concrete proposal: dispatch a subagent to rate the fix, generate ranked alternatives, and flag blind spots, then synthesize back. TRIGGER when: user says 'second opinion', 'rate my fix', 'weigh in on my approach', 'what alternatives am I missing', or wants their candidate edit/decision evaluated against alternatives. SKIP when: multiple decisions on a larger artifact — use `panel-review`.
development
Multi-reviewer panel on N focused questions about a near-final artifact (plan, design, code, prose). R0 (you) plus two parallel reviewer subagents, per-question table with disagreement preserved, walk decisions one at a time. TRIGGER when: user says 'panel review', 'multi-agent review'; user has a mostly-done artifact and focused micro-decisions to validate. SKIP when: only one proposal under review — use `second-opinion`.