debug-collaborate
Skill1 starsChanged 8 months agoMITView on GitHub
Multi-agent collaborative debugging — parallel hypothesis generation and testing. Use when a solution didn't work, a bug persists, or the user reports 'still happening' / 'not fixed' / 'didn't work'.
In this repository51 other files it gives its agents.
- algorithmic-artSkill
- audit-componentsSkill
- canvas-designSkill
- cascade-orchestrationSkill
- consultSkill
- data-reconciliationSkill
- deep-root-causeSkill
- deploy-allSkill
- design-reverse-engineerSkill
- design-showcaseSkill
- docxSkill
- env-auditSkill
- evolveSkill
- frontend-designSkill
- full-stack-buildSkill
- full-stack-traceSkill
- gh-repo-reconSkill
- grill-meSkill
- handoffSkill
- html-slidesSkill
- insightSkill
- internal-commsSkill
- isolation-testSkill
- mcp-builderSkill
- model-selectionSkill
- pdfSkill
- persistent-issueSkill
- pre-merge-reviewSkill
- premise-auditSkill
- propagate-featureSkill
- regression-bisectSkill
- research-gateSkill
- review-implSkill
- schema-checkSkill
- session-notesSkill
- skill-auditSkill
- skill-creatorSkill
- slack-gif-creatorSkill
- start-daySkill
- temporal-forensicsSkill
- theme-factorySkill
- throwaway-scriptSkill
- triage-ideasSkill
- verify-completeSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- wisdomSkill
- worker-buildSkill
- worktree-guardSkill
- write-planSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when a solution didn't work, a bug persists, or the user reports "still happening" / "not fixed" / "didn't work".
- Distinctive: line 16
Ask these questions (answer from context or ask the user):
- Distinctive: line 60
After all agents report:
- Distinctive: line 64
If agents disagree, present the top 2 options to the user with trade-offs
- Distinctive: line 70
If it doesn't work: move to hypothesis #2 (do NOT re-add logging for #1)
- Very specific: line 75
An empty commit cannot unstick a path-filtered workflow: No file matches the paths: filter, so it skips again.
- Distinctive: line 79
Document what the actual root cause was
- Distinctive: line 87
If the user provides context about what failed, use it to frame Phase 1
- Distinctive: line 88
If no context, ask the user the Phase 1 questions before spawning agents
- Very specific: line 92
When diagnosing a React state bug, you often need to read values from live hooks (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Collaborative Debugging - Multi-Agent Hypothesis Process
Use this skill when a solution didn't work, a bug persists, or the user reports "still happening" / "not fixed" / "didn't work".
CRITICAL: Do NOT add debug logging as a first response. Form hypotheses first.
Process
Phase 1: Frame the Problem (before spawning agents)
Ask these questions (answer from context or ask the user):
- What EXACTLY is the symptom? (observable behavior, not assumed cause)
- What was the expected behavior?
- What changed recently? (code, config, data, environment)
- Has this ever worked correctly?
Phase 2: Spawn Parallel Investigation Agents
Launch 3-4 Task agents simultaneously with these roles:
Agent A - Root Cause Analyst:
Read all files in the data flow end-to-end. Trace from [data source] through [API/transformation] to [rendering/output]. Identify exactly where the expected behavior diverges from actual behavior. Produce:
1. A specific hypothesis (1-2 sentences)
2. The exact file:line where the break occurs
3. A targeted code fix (not logging)Agent B - Environment & Config Investigator:
Check all configuration, environment variables, external service state, and runtime conditions that could affect [the feature]. Look for: stale cache, wrong environment, missing bindings, API changes, schema mismatches. Produce:
1. A specific hypothesis about environmental/config cause
2. Evidence for/against from config files and API responses
3. A targeted fix or verification stepAgent C - Contrarian / Non-Obvious Cause:
Assume the obvious cause (what we already tried) is WRONG. Look for non-obvious explanations: race conditions, stale closures, timezone issues, encoding problems, cache poisoning, browser-specific behavior, CSS specificity conflicts. Produce:
1. A non-obvious hypothesis
2. Why the obvious fix might not address the real issue
3. An alternative fix approachAgent D - Architecture Reviewer (when appropriate):
Step back and evaluate: Is the current design/architecture appropriate for what this feature needs to do? Would a different approach avoid this class of bug entirely? Produce:
1. Assessment of whether the design fits the use case
2. If mismatched: what architectural change would fix the root cause
3. Trade-offs of the architectural changePhase 3: Synthesize and Decide
After all agents report:
- Compare hypotheses - which has the strongest evidence?
- Are any hypotheses complementary (multiple causes)?
- Rank by probability: implement the highest-probability fix FIRST
- If agents disagree, present the top 2 options to the user with trade-offs
Phase 4: Implement and Verify
- Make the smallest change that tests the winning hypothesis
- Build and verify (don't just deploy and hope)
- If it doesn't work: move to hypothesis #2 (do NOT re-add logging for #1)
When the failure is a CI run
- A re-run hides the attempt you were diagnosing.
gh run viewserves the latest attempt, so once a flaky run is re-run and goes green it reports nothing failed. Before reading any log, pin the attempt:gh run view <id> --json jobs,headSha,attempt, then capture--attempt 1 --log-failedand--attempt 2 --logto files (--log-failedis empty on a passing attempt). The set difference of test names between the two captures is the flake. Redirect to files rather than piping intotail, which shows only the last job. - An empty commit cannot unstick a path-filtered workflow. No file matches the
paths:filter, so it skips again. Dispatch the workflow manually on the branch instead.
Phase 5: Learn
- Document what the actual root cause was
- Update relevant files:
memory/debugging-directives.mdif a new anti-pattern was foundCLAUDE.mdKnown Gotchas if it's a recurring trapmemory/priority-actions.mdif it relates to tracked items- Relevant skill files if a pattern changed
Arguments
- If the user provides context about what failed, use it to frame Phase 1
- If no context, ask the user the Phase 1 questions before spawning agents
React fiber walking for state inspection
When diagnosing a React state bug, you often need to read values from live hooks (e.g. a state map, an orders array) without the app exposing them on window. Walk the fiber tree from the root and match hooks by shape.
const root = document.querySelector('#root');
const key = Object.keys(root).find(k => k.startsWith('__reactContainer'));
let fiber = root[key].stateNode?.current;
const walk = (node, d=0) => {
if (!node || d > 300) return;
let hook = node.memoizedState;
while (hook) {
const v = hook.memoizedState;
// Match by shape (e.g. object-of-overrides with the field you expect)
if (v && typeof v === 'object' && !Array.isArray(v) && v !== null) {
const s = v[Object.keys(v)[0]];
if (s?.someExpectedField !== undefined) { /* found the state map */ }
}
hook = hook.next;
}
walk(node.child, d+1); walk(node.sibling, d+1);
};
walk(fiber);Caveats:
- Fragile — depends on React internals (the
__reactContainer*key name and fiber structure). Use only for ad-hoc diagnosis, never ship in production code. - Match hooks by shape (presence of known fields), not by position — hook order shifts across renders and component versions.
- Pair with the Chrome DevTools MCP
evaluate_scripttool to run it inside a headless debugging session.
When NOT to Use This Skill
- Simple typos or obvious one-line fixes
- User is asking for a new feature (not debugging)
- The issue is clearly documented in Known Gotchas
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

