bug-detective

bug-detective is a skill for Claude Code from Galaxy-Dawn/claude-scholar. It costs 75 tokens per session (2,114 once invoked), scanned C, original, MIT.

A systematic method for investigating software bugs, including errors, exceptions, and unexpected behavior.

In plain words
What is it for?
Use it when code fails, an error is reported, a feature behaves incorrectly, or you need to find the cause of a problem.
Why use it?
It turns debugging into a step-by-step process of collecting evidence, testing possible causes, applying a fix, and checking the result.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-scholar plugin — 45 skills, 34 commands, 6 agents, 5 hooks shipped together

Good fit Use it when code fails, an error is reported, a feature behaves incorrectly, or you need to find the cause of a problem.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/galaxy-dawn/claude-scholar/bug-detective
About the project

Claude Scholar is a semi-automated research assistant for academic research and software development, supporting literature review, coding, experiments, reporting, writing, and project knowledge management. Computer science and AI researchers use it across the research workflow with several coding-agent platforms; the catalogue contains its skills, commands, agents, hooks, plugin, and instruction.

Galaxy-Dawn/claude-scholar · 5,419 stars · on GitHub

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 Galaxy-Dawn/claude-scholar --skill bug-detective
Clone the repo
git clone --depth 1 https://github.com/Galaxy-Dawn/claude-scholar

Made for: Claude Code.

Or install claude-scholar, the plugin that ships this one along with the rest of its 45 skills, 34 commands, 6 agents, 5 hooks.

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-detective

README.md
[![agentmods](https://agentmods.dev/badge/skills/galaxy-dawn/claude-scholar/bug-detective/github.svg)](https://agentmods.dev/skills/galaxy-dawn/claude-scholar/bug-detective)
Your own site
<a href="https://agentmods.dev/skills/galaxy-dawn/claude-scholar/bug-detective"><img src="https://agentmods.dev/badge/skills/galaxy-dawn/claude-scholar/bug-detective/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-detective

Your own site · 80×15
<a href="https://agentmods.dev/skills/galaxy-dawn/claude-scholar/bug-detective"><img src="https://agentmods.dev/badge/skills/galaxy-dawn/claude-scholar/bug-detective.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 19 Mar 2026
  • Snyk pass 19 Mar 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 158
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 161
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 161
    Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
    Fix: Limit tool chaining depth and validate the output of each tool before passing it to the next. Require explicit user approval for multi-step chains.
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.00075 $0.02114
Opus 5 $0.00037 $0.01057
Sonnet 5 $0.00015 $0.00423
Haiku 4.5 $0.00007 $0.00211

Measured 11d ago against content hash ab228dd490b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade C, and why

bug-detective scanned grade C with 1 finding 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 11d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (examples/debugging-workflow.py, examples/debugging-workflow.sh, examples/error-handling-patterns.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf $dir/* # If dir is empty, deletes all files in current directory
skills/bug-detective/SKILL.md · 308 lines

How it starts

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

Bug Detective

A systematic debugging workflow for investigating and resolving code errors, exceptions, and failures. Provides structured debugging methods and common error pattern recognition.

Core Philosophy

Debugging is a scientific problem-solving process that requires:

  1. Understand the problem - Clearly define symptoms and expected behavior
  2. Gather evidence - Collect error messages, logs, stack traces
  3. Form hypotheses - Infer possible causes based on evidence
  4. Verify hypotheses - Confirm or eliminate causes through experiments
  5. Resolve the issue - Apply fixes and verify

Debugging Workflow

Step 1: Understand the Problem

Before starting to debug, clarify the following information:

Required information to collect:

  • Complete error message content
  • Exact location of the error (filename and line number)
  • Reproduction steps (how to trigger the error)
  • Expected behavior vs actual behavior
  • Environment info (OS, versions, dependencies)

Question template:

1. What is the exact error message?
2. Which file and line does the error occur at?
3. How can this issue be reproduced? Provide detailed steps.
4. What was the expected result? What actually happened?
5. What recent changes might have introduced this issue?

Step 2: Analyze Error Type

Choose a debugging strategy based on error type:

Error Type Characteristics Debugging Method
Syntax Error Code cannot be parsed Check syntax, bracket matching, quotes
Import Error ModuleNotFoundError Check module installation, path config
Type Error TypeError Check data types, type conversions
Attribute Error AttributeError Check if object attribute exists
Key Error KeyError Check if dictionary key exists
Index Error IndexError Check list/array index range
Null Reference NoneType/NullPointerException Check if variable is None
Network Error ConnectionError/Timeout Check network connection, URL, timeout settings
Permission Error PermissionError Check file permissions, user permissions
Resource Error FileNotFoundError Check if file path exists

Read the full file on GitHub · 308 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. 11d ago First seen · 308 lines · 75 tokens per session scan C ab228dd490b6

Subscribe to this mod's changes

bug-detective is a skill published in the GitHub repository Galaxy-Dawn/claude-scholar (5,419 stars, last pushed 14d ago), licensed MIT. It adds 75 tokens to every session and 2,114 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

tfx-find

A codebase search tool for quickly locating files, functions, classes, variables, text, and project structure. A codebase is the collection of source files that make up a software project.

tellang/triflux · 87 tokens

do-it-code-quality

Use when designing, changing, or debugging code to locate causal ownership and close the affected behavior.

tdwhere123/do-it · 24 tokens

debug

Debug a stubborn bug with a deterministic reproduction, hypothesis ledger, one-variable fixes, and a regression test. Use after the first obvious look fails, reproduction is unclear, or a fix attempt failed. Not for routine obvious failures; use for "ไล่บั๊ก".

ohm41321/luciazero · 57 tokens

bisect

Pinpoint the first bad commit for a reproducible regression in a safe temporary worktree. Use when HEAD is bad, a known revision is good, and one unattended command distinguishes them; handles flaky endpoints and git-bisect skip exit 125.

ohm41321/luciazero · 53 tokens

bug-finder

Hunt for previously unknown correctness defects in an existing repository by deriving invariants, prioritizing high-risk surfaces, generating concrete bug candidates, and proving or retiring them with bounded evidence. Use when the user asks to find bugs, hidden defects, races, lifecycle failures, data-loss paths, or…

cmdr-chara/codex-toolkit · 97 tokens

codebase-improvement-planner

Discover and prioritize evidence-backed opportunities to improve an existing codebase when no specific change has been chosen yet, then recommend the highest-value next upgrade and optionally execute an approved bounded maintenance slice. Use when the user asks what should be improved, modernized, simplified…

cmdr-chara/codex-toolkit · 112 tokens