bug-investigator

bug-investigator is a skill for Claude Code from MageByte-Zero/spec-superflow. It costs 37 tokens per session (1,396 once invoked), scanned A, original, MIT.

A structured debugging guide for software problems, including bugs, failed tests, build failures, and unexpected behavior. It starts by finding and confirming the underlying cause before suggesting a fix.

In plain words
What is it for?
Use it to read errors, reproduce failures, inspect recent changes, and trace information across connected parts of an application.
Why use it?
It reduces guesswork and repeated fixes that only hide symptoms. It helps separate problems in the application from problems in the tests or development setup.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the spec-superflow plugin — 9 skills, 1 hook shipped together

Good fit Use it to read errors, reproduce failures, inspect recent changes, and trace information across connected parts of an application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magebyte-zero/spec-superflow/bug-investigator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add MageByte-Zero/spec-superflow --skill bug-investigator
Clone the repo
git clone --depth 1 https://github.com/MageByte-Zero/spec-superflow

Made for: Claude Code.

Or install spec-superflow, the plugin that ships this one along with the rest of its 9 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bug-investigator

README.md
[![agentmods](https://agentmods.dev/badge/skills/magebyte-zero/spec-superflow/bug-investigator/github.svg)](https://agentmods.dev/skills/magebyte-zero/spec-superflow/bug-investigator)
Your own site
<a href="https://agentmods.dev/skills/magebyte-zero/spec-superflow/bug-investigator"><img src="https://agentmods.dev/badge/skills/magebyte-zero/spec-superflow/bug-investigator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bug-investigator

Your own site · 80×15
<a href="https://agentmods.dev/skills/magebyte-zero/spec-superflow/bug-investigator"><img src="https://agentmods.dev/badge/skills/magebyte-zero/spec-superflow/bug-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,396 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01396
Opus 5.5 $0.00015 $0.00558
Sonnet 5.5 $0.00007 $0.00279
Haiku 4.5 $0.00004 $0.00140

Measured 25d ago against content hash 509e77e10f52, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bug-investigator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bug-investigator/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bug Investigator

Bundled runtime

Before executing a CLI line below, replace its leading SSF with node "<plugin-root>/scripts/spec-superflow.mjs"; <plugin-root> is the absolute directory two levels above this file. Never run SSF literally or call an ssf from PATH.

Core principle: Find root cause before attempting fixes. Symptom fixes are failure.

New direct/planned changes

Investigate in executing without a phase transition or a separate debug ledger: reproduce, trace the root cause, make one focused repair and verify. Keep useful failure evidence in the existing progress entry. Three failures for the same unresolved issue warrant a decision; unrelated findings do not accumulate a shared budget. No task book or subagent is required. The detailed legacy protocol below is for an existing debugging state or an investigation that needs it.

The Iron Law

No fixes without root cause investigation first. If you haven't completed Phase 1, you cannot propose fixes.

When to Use

Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues. Especially when under time pressure, "one quick fix" seems obvious, you've already tried multiple fixes, or you don't fully understand the issue.

Don't skip because issue "seems simple" or you're "in a hurry" — systematic debugging is faster than thrashing.

The Four Phases

Complete each phase before proceeding.

Phase 1: Root Cause Investigation

  1. Read error messages carefully: stack traces, line numbers, file paths, error codes — they often contain the exact solution
  2. Reproduce consistently: exact steps, every time? If not reproducible → gather more data, don't guess
  3. Check recent changes: git diff, recent commits, new dependencies, config changes, environment differences
  4. Multi-component systems: add diagnostic instrumentation at each component boundary. Log what enters and exits each layer. Run once to gather evidence, then analyze which component fails
  5. Trace data flow: backward tracing — where does the bad value originate? Keep tracing up until you find the source. Fix at source, not symptom

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago Changed · +4 lines 509e77e10f52
  2. 27d ago Changed · -29 lines b0648d1228c0
  3. 1mo ago Changed f2c8e206bacb
  4. 1mo ago First seen · 135 lines · 37 tokens per session scan A ea8d42c88c6f

Subscribe to this mod's changes

bug-investigator is a skill published in the GitHub repository MageByte-Zero/spec-superflow (867 stars, last pushed 18d ago), licensed MIT. It adds 37 tokens to every session and 1,396 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

A step-by-step method for finding the underlying cause of technical problems before changing code. It covers reading errors, reproducing failures, checking recent changes, and tracing data across system components.

jnMetaCode/superpowers-zh · 24 tokens

diagnosing-superpowers

A diagnostic workflow for investigating problems in Superpowers agent sessions using saved conversation records. It requires evidence linked to exact file paths and line numbers, then organizes findings into a report.

jnMetaCode/superpowers-zh · 111 tokens

backprop

Bug → spec protocol. When a bug is found or a test fails, trace the cause, decide whether a new §V invariant would catch recurrence, append to §B. This is the one non-obvious thing SDD does that plan-then-execute doesn't. Triggers on test failure, bug report, post-mortem, or explicit user ask.

JuliusBrussee/cavekit · 76 tokens

check

Read-only drift detector. Diffs SPEC.md against current code and reports violations grouped by severity. Writes nothing — suggests remedies via the spec or build skills but never invokes them. Triggers when the user asks to check drift, audit the spec, verify invariants, or ask whether code still matches the spec.…

JuliusBrussee/cavekit · 102 tokens

speq-audit

Audit a speq project's health — spec-library structure, feature/decision-log/plan validation, ADR noise, mission-to-spec sync, unrecorded plans, and gitignore hygiene — then guide fixes. Use when the user asks to audit, health-check, doctor, lint, or sanity-check the specs or repo, or after cloning or inheriting a…

marconae/speq-skill · 80 tokens

critical-review

4-phase adversarial review protocol: pre-flight analysis, adversarial execution check, self-correction loop, and [VALIDATION] report.

yeisonrestrepo/code-conductor · 30 tokens