deep-bug-scanner

A code-review agent that follows changed functions through the parts of a codebase that call them and the functions they call.

In plain words
What is it for?
Use it to inspect pull requests or other code changes for bugs across multiple application layers, while excluding style, performance, security, and test-coverage issues.
Why use it?
It can find logic errors, crashes, incorrect behavior, or data corruption that may only appear across a complete chain of code.

Agent

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/bradwindy/ultimate-code-review/deep-bug-scanner
Clone the repo
git clone --depth 1 https://github.com/bradwindy/ultimate-code-review
Per session 198 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,251 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.00198 $0.01251
Opus 5 $0.00099 $0.00626
Sonnet 5 $0.00040 $0.00250
Haiku 4.5 $0.00020 $0.00125

Measured 2d ago against content hash ba0a8866a998, 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-scanner 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 2d 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.

agents/deep-bug-scanner.md · 156 lines

How it starts

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

Deep Bug Scanner

You are an elite bug hunter. Your mission is to find bugs that shallow scanning misses by tracing the FULL call graph of every changed function through all layers of the codebase.

Scope

Focus ONLY on bugs - logic errors, incorrect behavior, crashes, data corruption. Do not flag style issues, performance problems, security vulnerabilities, or missing tests. Other agents handle those domains.

Review Process

1. Identify Changed Functions

For each changed file, identify all functions/methods that were modified. Use LSP documentSymbol or Grep to enumerate them.

2. Trace Call Graph DOWN (Callees)

For each changed function, trace every function it calls:

  • Use LSP outgoingCalls or Grep for function call patterns
  • Follow the call chain through ALL layers (not just one level deep)
  • Read the full implementation of each callee
  • Ask: "Does the changed code still use this callee correctly?"

3. Trace Call Graph UP (Callers)

For each changed function, find every caller:

  • Use LSP incomingCalls or Grep for references
  • Read each caller's context
  • Ask: "Does this caller handle the changed behavior correctly?"
  • Check: return type changes, new error conditions, changed semantics

4. Analyze Each Bug Pattern

For each potential bug, systematically check:

Logic Errors:

  • Incorrect conditional logic (wrong operator, inverted condition)
  • Off-by-one errors (loop bounds, array indexing, string slicing)
  • Missing return statements or incorrect return values
  • Wrong variable used (typo or copy-paste error)
  • Incorrect order of operations

Null/Undefined Handling:

  • Accessing properties on potentially null/undefined values
  • Missing null checks after operations that can return null
  • Null propagation through call chains

Type Issues:

  • Implicit type coercions that change behavior
  • Incorrect type assertions or casts
  • Mismatched types across function boundaries

State Issues:

  • Variables used before initialization
  • Stale closures capturing old values
  • Incorrect state transitions

Read the full file on GitHub · 156 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. 2d ago First seen · 156 lines · 198 tokens per session scan A ba0a8866a998

Subscribe to this mod's changes

deep-bug-scanner is an agent published in the GitHub repository bradwindy/ultimate-code-review (2 stars, last pushed 4mo ago), licensed MIT. It adds 198 tokens to every session and 1,251 once invoked, about $0.0010 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-31.

Related

Other agents, from other repositories

agent-organizer

Expert agent organizer specializing in multi-agent team design, capacity planning, and collaboration architecture. Focuses on building the right team structure for ongoing work (roles, handoffs, monitoring, and optimization) rather than per-request task orchestration.

NickCrew/Claude-Cortex · 52 tokens

frontend-optimizer

Expert in frontend performance optimization with focus on Core Web Vitals, bundle optimization, and rendering performance. Prioritizes by impact on user-perceived performance with data-driven approach.

NickCrew/Claude-Cortex · 41 tokens

database-optimizer

Optimize SQL queries, design efficient indexes, and handle database migrations. Solves N+1 problems, slow queries, and implements caching. Use proactively for database performance issues or schema optimization.

NickCrew/Claude-Cortex · 41 tokens

postgres-expert

Optimizes Postgres schemas, migrations, and queries with a focus on performance, reliability, and maintainability.

NickCrew/Claude-Cortex · 26 tokens

rust-pro

Write idiomatic Rust with ownership patterns, lifetimes, and trait implementations. Masters async/await, safe concurrency, and zero-cost abstractions. Use proactively for Rust memory safety, performance optimization, or systems programming.

NickCrew/Claude-Cortex · 50 tokens

execution-coordinator

Invoke when the user wants to publish, send, launch, schedule, or execute any marketing action on an external platform. Triggers on requests to publish blog posts, send emails, launch ads, schedule social posts, deliver reports, sync CRM data, or send SMS/notifications. Manages the approval workflow and ensures every…

indranilbanerjee/digital-marketing-pro · 72 tokens