debug
БесплатноБез исполняемых скриптовНе проверенMulti-agent competing hypotheses debugging. Use when stuck on a bug, need root cause analysis, or want competing debug theories.
от drn★ 23 звезды на GitHubОб этом скилле
Competing Hypotheses Debugging
Spawn multiple investigators to debug a problem in parallel. Each pursues a different theory and they argue with each other to converge on the root cause.
Prerequisites
Agent teams must be enabled in Claude Code settings:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
If agent teams are not enabled, report: "Agent teams required. Add CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 to your Claude Code settings (env section)." and stop.
Arguments
$ARGUMENTS- Required: description of the bug, failing test, error message, or unexpected behavior
If no arguments are provided, ask the user what they're debugging.
Context
- Current branch: !
git branch --show-current - Git status: !
git status --short - Project root: !
pwd - Project type: !
find . -maxdepth 1 \( -name go.mod -o -name Gemfile -o -name package.json -o -name Cargo.toml -o -name pyproject.toml -o -name setup.py -o -name requirements.txt -o -name pom.xml -o -name build.gradle -o -name Makefile \) 2>/dev/null | head -5 - Recent commits: !
git log --oneline -10 - Test files: !
find . -maxdepth 4 -name "*_test.*" -o -name "*.test.*" -o -name "*_spec.*" 2>/dev/null | head -10
Overview
You are the lead investigator coordinating a debugging team. Your job is to formulate hypotheses, assign them to investigators, moderate the debate, and produce a root cause analysis.
Problem to debug: $ARGUMENTS
You do NOT investigate yourself. You formulate hypotheses, assign them, moderate debate, and synthesize findings.
Why this works: A single agent investigating a bug tends to anchor on the first plausible explanation. Multiple agents pursuing different theories in parallel, then actively trying to disprove each other, surface the actual root cause faster.
Phase 0: Setup
Clean working tree: If there are uncommitted changes, commit them with message
"WIP: pre-debug-session state"before proceeding.Analyze the problem from
$ARGUMENTSand the context above.Formulate 3 hypotheses for what might be causing the bug. Each hypothesis should be:
- Plausible given the symptoms
- Distinct from the others (different root causes, not variations of the same idea)
- Testable (there's a way to prove or disprove it)
Present the hypotheses to the user before proceeding.
Create the team (clean up stale session first if needed):
TeamDelete() -- ignore if no existing team TeamCreate(team_name: "debug-session", description: "Debug: {brief problem summary}")Create the task list with TaskCreate:
- "Investigate hypothesis 1: {brief}" -- for investigator-1
- "Investigate hypothesis 2: {brief}" -- for investigator-2
- "Investigate hypothesis 3: {brief}" -- for investigator-3
Spawn 3 investigators in a single message with 3 Task tool calls. Use the agent briefing below. Use
model: "sonnet"for all investigators.
Phase 1: Investigation
Send each investigator their assignment via SendMessage:
To each investigator:
PROBLEM: {full problem description from $ARGUMENTS}
YOUR HYPOTHESIS: {the specific hypothesis assigned to this investigator}
OTHER HYPOTHESES BEING INVESTIGATED:
- investigator-1: {hypothesis 1}
- investigator-2: {hypothesis 2}
- investigator-3: {hypothesis 3}
INSTRUCTIONS:
1. Explore the codebase to gather evidence FOR your hypothesis.
2. Also look for evidence AGAINST your hypothesis -- be honest.
3. Try to reproduce the bug if possible.
4. Check git history for recent changes related to your hypothesis.
5. When you have findings, share them with ALL other investigators:
- Message each investigator directly with your evidence.
- Explain what you found and how it supports or undermines your theory.
6. Read and respond to other investigators' findings:
- If their evidence contradicts your hypothesis, acknowledge it.
- If you can poke holes in their theory, do so with evidence.
- If you become convinced another hypothesis is correct, say so.
After investigation and debate, message me (the lead) with:
- Your verdict: CONFIRMED, DISPROVED, or INCONCLUSIVE
- Key evidence (file paths, line numbers, reproduction steps)
- Whether you now support a different hypothesis
Mark your task as completed.
Wait for all investigators to report. Allow time for peer debate -- don't rush this phase.
Phase 2: Convergence
Collect all reports and assess:
IF investigators converged on a single root cause:
→ Proceed to Phase 3 with that cause
IF two or more theories remain plausible:
→ Send a tiebreaker prompt (see below)
IF all hypotheses disproved:
→ Formulate new hypotheses based on evidence gathered, return to Phase 1
(max 2 total rounds)
Tiebreaker prompt (send to all remaining investigators):
We have competing theories. Let's settle this.
REMAINING HYPOTHESES:
{list the hypotheses still standing with evidence for each}
INSTRUCTIONS:
1. D
Установить debug в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл debug?
Multi-agent competing hypotheses debugging. Use when stuck on a bug, need root cause analysis, or want competing debug theories.
Как установить скилл debug?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл debug запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic