bug-investigator

bug-investigator is a skill for Claude Code, Codex from MageByte-Zero/spec-superflow. It costs 37 tokens per session (1,460 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/magebyte-zero/spec-superflow/bug-investigator
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, Codex.

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.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.svg" alt="Measured on agentmods" 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,460 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00037 $0.01460
Opus 5 $0.00018 $0.00730
Sonnet 5 $0.00007 $0.00292
Haiku 4.5 $0.00004 $0.00146

Measured 4d ago against content hash ea8d42c88c6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 135 lines

How it starts

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

Bug Investigator

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

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

Phase 2: Pattern Analysis

  1. Find working examples of similar code in the same codebase
  2. Compare against references — read reference implementation completely
  3. Identify every difference between working and broken, however small
  4. Understand dependencies: other components, settings, config, environment, assumptions

Phase 3: Hypothesis and Testing

Scientific method: form a single hypothesis ("I think X is the root cause because Y"), test with the smallest possible change (one variable at a time), verify before continuing. If it didn't work, form a NEW hypothesis — don't add more fixes. When you don't know, say so and ask for help.

Read the full file on GitHub · 135 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. 4d 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 (782 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 1,460 once invoked, about $0.0002 per session on Opus 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

chinese-documentation

中文文档排版参考——中英文空格、全半角标点、术语保留、链接格式、中文文案排版指北约定。仅在用户显式 /chinese-documentation 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 62 tokens

chinese-git-workflow

国内 Git 平台配置参考——Gitee、Coding.net、极狐 GitLab、CNB 的 SSH/HTTPS/凭据/CI 接入差异与镜像同步配置。仅在用户显式 /chinese-git-workflow 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 69 tokens

chinese-commit-conventions

中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 65 tokens

systematic-debugging

Skill "systematic-debugging" from jnMetaCode/superpowers-zh, covering 系统化调试, 概述, 铁律, 何时使用 and 四个阶段.

jnMetaCode/superpowers-zh · 24 tokens

review-spd

Findings-first code review workflow for AI coding agents. Use when the user asks to review uncommitted changes, commits in a date range, or a branch compared to the main branch / PR-style diff. Focuses on bugs, regressions, correctness risks, missing tests, security/data-safety issues, and other behavior-changing…

zhu1090093659/spec_driven_develop · 72 tokens

deep-discuss

结构化深度讨论 Skill,用于与用户进行多轮问题分析和方案设计。当用户描述一个问题现象、故障表现、 技术困惑、方案选择困难,或明确说"讨论一下"、"帮我分析"、"我遇到一个问题"、"你觉得怎么样"、 "帮我想想"、"我在纠结"时,必须使用本 skill。当用户提供了一段描述(可能附带截图)并期望深入分析 而非直接给答案时,也应触发本 skill。即使用户只是抛出一个现象描述没有明确提问,也要使用本 skill 来引导结构化思考。不要在简单的事实查询("X是什么")或明确的执行指令("帮我写个脚本")上触发。.

zhu1090093659/spec_driven_develop · 181 tokens