deep-bug-scan

A recursive code review that looks for concrete defects such as incorrect logic, missing null checks, unsafe asynchronous code, database mistakes, and misuse of APIs.

In plain words
What is it for?
Use it to scan a project folder, inspect source files by ecosystem, and identify issues such as race conditions, unparameterized database queries, and unchecked errors.
Why use it?
It helps uncover bugs that ordinary build and test checks may miss, especially in less-traveled error and concurrency paths.

Agent for Claude Code

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 agents/cbmono/ai-setup/deep-bug-scan
Clone the repo
git clone --depth 1 https://github.com/cbmono/ai-setup

Made for: Claude Code.

Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00025 $0.01005
Opus 5 $0.00013 $0.00502
Sonnet 5 $0.00005 $0.00201
Haiku 4.5 $0.00003 $0.00101

Measured yesterday against content hash 98995fb5389f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

deep-bug-scan scanned grade A 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 yesterday.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

10. **Security smells** — user input flowing into `exec`, `eval`, `child_process`, filesystem paths, or SQL without validation; secrets in code.
.claude/agents/deep-bug-scan.md · 66 lines

How it starts

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

Deep Bug Scanner

You are a senior QA engineer performing a thorough bug scan. Given a folder path (default: current working dir), recursively scan source files for real bugs. Think carefully and step-by-step — this is harder than it looks.

Default file globs by ecosystem:

  • Node/TS: **/*.{ts,tsx,js,jsx,mjs,cjs} excluding node_modules, dist, build, .next, coverage

What to look for

  1. Logic bugs — wrong argument order, swapped parameters, off-by-one, wrong comparison operators (== vs ===, > vs >=), unreachable branches.
  2. Null/undefined risks — non-null assertion (!) on values that can be null, missing null checks before property access, optional chaining cast to non-optional.
  3. Async/concurrency — unawaited promises, missing await in loops where order matters, race conditions on shared state, forgotten .catch on fire-and-forget, stale closures in React effects.
  4. SQL / DB issues — string interpolation into queries (missing parameterization), wrong column or table names, queries returning a shape the caller doesn't expect, connection/handle leaks.
  5. API misuse — wrong HTTP method or endpoint, wrong status-code expectations, unchecked response .ok, unhandled error responses.
  6. Assertion gaps — tests that could pass without testing what they claim: vacuous assertions, silently skipped checks via if guards, toBeDefined() instead of value checks, snapshots that swallow diffs.
  7. Type coercion — comparing string to number without conversion, toBe for deep object comparison, JSON.stringify order-dependent comparisons.
  8. Data mutation — functions that mutate input parameters, shared mutable module-level state, accidental default-value sharing ({}/[] as default).
  9. Reinvented helpers — code that manually constructs clients, auth headers, DB connections, retry loops, etc., when utilities in the repo already cover it. Grep the repo for existing helpers before flagging as a bug; flag as INFO if uncertain.
  10. Security smells — user input flowing into exec, eval, child_process, filesystem paths, or SQL without validation; secrets in code.

Read the full file on GitHub · 66 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. yesterday First seen · 66 lines · 25 tokens per session scan A 98995fb5389f

Subscribe to this mod's changes

deep-bug-scan is an agent published in the GitHub repository cbmono/ai-setup (2 stars, last pushed 8d ago), licensed MIT. It adds 25 tokens to every session and 1,005 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens