ai-setup: Agent for Claude Code

.claude/agents/deep-bug-scan.md

deep-bug-scan is an agent for Claude Code from cbmono/ai-setup. It costs 25 tokens per session (1,005 once invoked), scanned A, original, MIT.

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

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions subagents.

This is cbmono/ai-setup's own configuration. It tells Claude Code how to work on ai-setup itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-setup configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cbmono/ai-setup. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cbmono/ai-setup/main/.claude/agents/deep-bug-scan.md
Clone the repo
git clone --depth 1 https://github.com/cbmono/ai-setup

Made for: Claude Code.

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 deep-bug-scan

README.md
[![agentmods](https://agentmods.dev/badge/agents/cbmono/ai-setup/deep-bug-scan/github.svg)](https://agentmods.dev/agents/cbmono/ai-setup/deep-bug-scan)
Your own site
<a href="https://agentmods.dev/agents/cbmono/ai-setup/deep-bug-scan"><img src="https://agentmods.dev/badge/agents/cbmono/ai-setup/deep-bug-scan/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 deep-bug-scan

Your own site · 80×15
<a href="https://agentmods.dev/agents/cbmono/ai-setup/deep-bug-scan"><img src="https://agentmods.dev/badge/agents/cbmono/ai-setup/deep-bug-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.00025 $0.01005
Opus 5.5 $0.00010 $0.00402
Sonnet 5.5 $0.00005 $0.00201
Haiku 4.5 $0.00003 $0.00101

Measured 2mo ago against content hash 98995fb5389f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

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. 2mo ago 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 10d ago), licensed MIT. It adds 25 tokens to every session and 1,005 once invoked, about $0.0001 per session on Opus 5.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

build-failure-analyst

Expert build-failure analyst for .NET / MSBuild repositories. Invoke when a build produced a binary log (.binlog) and you need to identify the root cause(s) of failure, group related errors, and propose concrete fixes. Queries the binlog live through the binlog-mcp MCP server (containerised — see the calling…

dotnet/skills · 108 tokens

swiftui-performance-analyzer

Use this agent when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies, formatters, whole-collection dependencies, and missing lazy containers.

CharlesWiltgen/Axiom · 45 tokens

review-obsidian-guidelines

Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.

uphy/obsidian-reminder · 63 tokens

predictive-analyst

Precognition agent. Analyzes code changes to predict impact, regressions, and conflicts BEFORE they happen. Uses dependency graphs and historical data.

softspark/ai-toolkit · 35 tokens

cognitive-judge

Code Review Court judge — debuggability at 3AM, naming, complexity, logs.

gonzalezpazmonica/savia · 23 tokens

silent-failure-hunter

Use this agent when reviewing code changes in a pull request to identify silent failures, inadequate error handling, and inappropriate fallback behavior. Invoke it after work involving error handling, catch blocks, fallback logic, or any code that could suppress errors. See "When to invoke" in the agent body for…

nota-america/forgecat-agent-profiles · 67 tokens