bug-hunt-swarm
Finds the cause of a hard bug by running several read-only subagents in parallel, each attacking it from a different angle (change history, code path, data…
от TerminalSkills★ 221 звезда на GitHub
Установить bug-hunt-swarm в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Bug Hunt Swarm
Overview
A bug without an obvious cause is a search problem, and a single investigator tends to settle on the first believable story. In this procedure the main agent writes a case file, sends three to five read-only investigators at it at the same time, each with its own angle, and then acts as a sceptical judge: it re-checks the evidence, ranks the hypotheses against every symptom and picks the cheapest experiment that separates the leaders.
Nothing in the repository is changed. The product is a diagnosis report; fixing starts only after the user has read it.
Instructions
1. Decide whether a swarm is worth it
Swarm when at least two of these hold: ten minutes of direct reading has not localised the cause; the symptom crosses components; it is intermittent; it works in one environment and fails in another; it is a regression with many candidate commits.
Investigate alone when a stack trace points at a line you can read and explain, when one deterministic test fails in one file, or when the cause is known and only the fix is wanted. Each investigator has its own context and costs about as much as a full agent run, so five investigators cost roughly five times one.
2. Write the case file
Investigators start with an empty context and see only what the brief contains. Gather the facts first, reading only:
git status --short
git log --oneline -15
git log --oneline v3.8.0..v3.9.0 -- services/orders workers/email # candidates between last good and first bad
| Field | Content |
|---|---|
| Symptom | The exact error text or wrong output, copied, not paraphrased |
| Expected | What should have happened |
| Frequency | Counts: "37 of 214 orders", "4 of 30 CI runs" |
| First seen / last good | Version, commit or date for each |
| Reproduction | The command and its result when you ran it, or "not reproduced" |
| Where it does not happen | Environments, inputs or users that are fine |
| Already ruled out | And how |
| Project rules | Test command, layout, anything from CLAUDE.md, AGENTS.md or GEMINI.md an investigator needs |
Mark each line as observed or reported. A guess written as a fact will send every investigator the same wrong way.
3. Choose the angles
| Angle | Question it answers | Reads |
|---|---|---|
| Change history | What changed between last good and first bad? | git log, git show, git log -S'get_summary', lockfiles, migrations, config |
| Code path | Where along the path does actual behaviour leave expected? | Entry point to failure site, callers, error handling |
| Data and state | Which records, caches, orderings or timings trigger it? | Affected versus unaffected cases, fixtures, shared resources |
| Environment | What differs between where it fails and where it works? | CI config, runtime versions, env vars, flags, parallelism |
| Reproduction | What is the narrowest trigger? | Tests, existing repro scripts, logs |
| Prior art | Has this pattern broken or been fixed before? | git log --grep, similar code elsewhere |
Pick three to five. Regression: history, code path, data. Intermittent failure: reproduction, data and state, environment. "Works on my machine": environment, code path, history. Wrong output with no error: code path, data, prior art.
4. Launch the investigators
| Agent | How parallel investigators are started | Read-only setting |
|---|---|---|
| Claude Code | The Agent tool (called Task before v2.1.63), one call per angle in a single turn; built-in Explore, or a custom file in .claude/agents/ |
tools: Read, Grep, Glob, Bash in the file; Explore already denies Write and Edit |
| Codex | Only on request: "Spawn one agent per angle and wait for all of them"; built-in explorer, or a TOML file in .codex/agents/ |
sandbox_mode = "read-only" in the file |
| Cursor | Agent sends several Task calls in one message; a file in .cursor/agents/, invoked as /bug-investigator or by name |
readonly: true in the frontmatter |
| Gemini CLI | Each subagent is a tool named after it; @bug-investigator forces it; a file in .gemini/agents/ |
tools: limited to read_file, grep_search, glob, list_directory |
Platform details that matter here:
- Claude Code runs at most 20 subagents at once by default (
CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS). Subagents may spawn their own unlessAgentis left out oftools. Built-inExploredoes not loadCLAUDE.md, so project rules must be in the brief. In interactive sessions subagents run in the background; wait for every result before judging. - Codex caps threads with
agents.max_concurrent_threads_per_sessioninconfig.toml;/agentswitches between threads. Children inherit the parent's sandbox, and overrides set during the session (such as--yolo) are reapplied to them even when the agent file says read-only, so do not start a hunt from an unrestricted session. - Gemini CLI subagents default to 30 turns and 10 minutes, cannot call other s
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- _scores.json
FAQ
Что делает скилл bug-hunt-swarm?
Finds the cause of a hard bug by running several read-only subagents in parallel, each attacking it from a different angle (change history, code path, data and state, environment, reproduction), then checking their evidence, ranking the hypotheses and naming the one experiment that would confirm the leader. It diagnoses and does not fix. Use when someone says "hunt this bug with multiple agents", "swarm on this regression", "investigate in parallel", "find the root cause", or when a failure is intermittent, crosses components, or has resisted a first look.
Как установить скилл bug-hunt-swarm?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bug-hunt-swarm запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate 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…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…