$npx -y skills add wshobson/agents --skill parallel-debuggingparallel-debugging is an agent skill published from wshobson/agents, installable through the skills CLI.
| 1 | # Parallel Debugging |
| 2 | |
| 3 | Framework for debugging complex issues using the Analysis of Competing Hypotheses (ACH) methodology with parallel agent investigation. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | - Bug has multiple plausible root causes |
| 8 | - Initial debugging attempts haven't identified the issue |
| 9 | - Issue spans multiple modules or components |
| 10 | - Need systematic root cause analysis with evidence |
| 11 | - Want to avoid confirmation bias in debugging |
| 12 | |
| 13 | ## Hypothesis Generation Framework |
| 14 | |
| 15 | Generate hypotheses across 6 failure mode categories: |
| 16 | |
| 17 | ### 1. Logic Error |
| 18 | |
| 19 | - Incorrect conditional logic (wrong operator, missing case) |
| 20 | - Off-by-one errors in loops or array access |
| 21 | - Missing edge case handling |
| 22 | - Incorrect algorithm implementation |
| 23 | |
| 24 | ### 2. Data Issue |
| 25 | |
| 26 | - Invalid or unexpected input data |
| 27 | - Type mismatch or coercion error |
| 28 | - Null/undefined/None where value expected |
| 29 | - Encoding or serialization problem |
| 30 | - Data truncation or overflow |
| 31 | |
| 32 | ### 3. State Problem |
| 33 | |
| 34 | - Race condition between concurrent operations |
| 35 | - Stale cache returning outdated data |
| 36 | - Incorrect initialization or default values |
| 37 | - Unintended mutation of shared state |
| 38 | - State machine transition error |
| 39 | |
| 40 | ### 4. Integration Failure |
| 41 | |
| 42 | - API contract violation (request/response mismatch) |
| 43 | - Version incompatibility between components |
| 44 | - Configuration mismatch between environments |
| 45 | - Missing or incorrect environment variables |
| 46 | - Network timeout or connection failure |
| 47 | |
| 48 | ### 5. Resource Issue |
| 49 | |
| 50 | - Memory leak causing gradual degradation |
| 51 | - Connection pool exhaustion |
| 52 | - File descriptor or handle leak |
| 53 | - Disk space or quota exceeded |
| 54 | - CPU saturation from inefficient processing |
| 55 | |
| 56 | ### 6. Environment |
| 57 | |
| 58 | - Missing runtime dependency |
| 59 | - Wrong library or framework version |
| 60 | - Platform-specific behavior difference |
| 61 | - Permission or access control issue |
| 62 | - Timezone or locale-related behavior |
| 63 | |
| 64 | ## Evidence Collection Standards |
| 65 | |
| 66 | ### What Constitutes Evidence |
| 67 | |
| 68 | | Evidence Type | Strength | Example | |
| 69 | | ----------------- | -------- | --------------------------------------------------------------- | |
| 70 | | **Direct** | Strong | Code at `file.ts:42` shows `if (x > 0)` should be `if (x >= 0)` | |
| 71 | | **Correlational** | Medium | Error rate increased after commit `abc123` | |
| 72 | | **Testimonial** | Weak | "It works on my machine" | |
| 73 | | **Absence** | Variable | No null check found in the code path | |
| 74 | |
| 75 | ### Citation Format |
| 76 | |
| 77 | Always cite evidence with file:line references: |
| 78 | |
| 79 | ``` |
| 80 | **Evidence**: The validation function at `src/validators/user.ts:87` |
| 81 | does not check for empty strings, only null/undefined. This allows |
| 82 | empty email addresses to pass validation. |
| 83 | ``` |
| 84 | |
| 85 | ### Confidence Levels |
| 86 | |
| 87 | | Level | Criteria | |
| 88 | | ------------------- | ----------------------------------------------------------------------------------- | |
| 89 | | **High (>80%)** | Multiple direct evidence pieces, clear causal chain, no contradicting evidence | |
| 90 | | **Medium (50-80%)** | Some direct evidence, plausible causal chain, minor ambiguities | |
| 91 | | **Low (<50%)** | Mostly correlational evidence, incomplete causal chain, some contradicting evidence | |
| 92 | |
| 93 | ## Result Arbitration Protocol |
| 94 | |
| 95 | After all investigators report: |
| 96 | |
| 97 | ### Step 1: Categorize Results |
| 98 | |
| 99 | - **Confirmed**: High confidence, strong evidence, clear causal chain |
| 100 | - **Plausible**: Medium confidence, some evidence, reasonable causal chain |
| 101 | - **Falsified**: Evidence contradicts the hypothesis |
| 102 | - **Inconclusive**: Insufficient evidence to confirm or falsify |
| 103 | |
| 104 | ### Step 2: Compare Confirmed Hypotheses |
| 105 | |
| 106 | If multiple hypotheses are confirmed, rank by: |
| 107 | |
| 108 | 1. Confidence level |
| 109 | 2. Number of supporting evidence pieces |
| 110 | 3. Strength of causal chain |
| 111 | 4. Absence of contradicting evidence |
| 112 | |
| 113 | ### Step 3: Determine Root Cause |
| 114 | |
| 115 | - If one hypothesis clearly dominates: declare as root cause |
| 116 | - If multiple hypotheses are equally likely: may be compound issue (multiple contributing causes) |
| 117 | - If no hypotheses confirmed: generate new hypotheses based on evidence gathered |
| 118 | |
| 119 | ### Step 4: Validate Fix |
| 120 | |
| 121 | Before declaring the bug fixed: |
| 122 | |
| 123 | - [ ] Fix addresses the identified root cause |
| 124 | - [ ] Fix doesn't introduce new issues |
| 125 | - [ ] Original reproduction case no longer fails |
| 126 | - [ ] Related edge cases are covered |
| 127 | - [ ] Relevant tests are added or updated |