AgentSkillsCN

Diagnose

诊断

SKILL.md

/diagnose — Structured Differential Diagnosis

Usage

/diagnose [symptom description]

Description

Performs structured diagnosis of a bug or issue using differential diagnosis. Requires forming 2+ hypotheses before concluding. Prevents speculative fixes.

Instructions

  1. Gather the symptom description from the argument or ask the user.

  2. Read any relevant error messages, logs, or stack traces.

  3. Form at least 2 hypotheses for the root cause. For each:

    • State the hypothesis clearly
    • Identify what evidence would confirm or deny it
    • List the specific files/lines to check
  4. Test each hypothesis by reading the actual code:

    • FIND the relevant code
    • QUOTE file:line references
    • VERIFY whether the hypothesis holds
  5. Report findings:

    code
    ## Diagnosis Report
    
    **Symptom:** [description]
    
    ### Hypothesis 1: [name]
    - Evidence for: [what supports this]
    - Evidence against: [what contradicts this]
    - Verdict: CONFIRMED / RULED OUT / INCONCLUSIVE
    
    ### Hypothesis 2: [name]
    - Evidence for: [what supports this]
    - Evidence against: [what contradicts this]
    - Verdict: CONFIRMED / RULED OUT / INCONCLUSIVE
    
    ### Conclusion
    Root cause: [most likely cause with evidence]
    Recommended fix: [approach]
    
  6. Do NOT implement the fix — only diagnose. The fix should be a separate task.

Model

sonnet