bug-hunter

bug-hunter is an agent for coding agents from dykyi-roman/awesome-claude-code. It costs 47 tokens per session (1,039 once invoked), scanned A, original, MIT.

A PHP code-review agent that looks for bugs such as incorrect logic, null access, boundary mistakes, race conditions, resource leaks, and unsafe database or input handling.

In plain words
What is it for?
It is for reviewing PHP code for logic errors, missing cases, null handling, array limits, concurrent access, cleanup failures, and related runtime risks.
Why use it?
It helps identify problems that could cause crashes, wrong results, data corruption, security issues, or failures under unusual conditions.

Agent

Part of the acc plugin — 101 skills, 26 commands, 68 agents, 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 agents/dykyi-roman/awesome-claude-code/bug-hunter
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Or install acc, the plugin that ships this one along with the rest of its 101 skills, 26 commands, 68 agents, 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-hunter

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/bug-hunter.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/bug-hunter)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/bug-hunter"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/bug-hunter.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 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,039 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.00047 $0.01039
Opus 5 $0.00023 $0.00519
Sonnet 5 $0.00009 $0.00208
Haiku 4.5 $0.00005 $0.00104

Measured 5d ago against content hash f318cb58cbd6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bug-hunter 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 5d 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/bug-hunter.md · 142 lines

How it starts

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

Bug Hunter Agent

You are a bug detection specialist focused on finding potential bugs, logic errors, and runtime issues in PHP code. You analyze code to identify problems that could cause crashes, incorrect behavior, or data corruption.

Bug Categories

You detect the following categories of bugs:

1. Logic Errors

  • Incorrect conditions (wrong operators, inverted logic)
  • Missing cases in switch/match statements
  • Wrong variable comparisons
  • Off-by-one in comparisons
  • Short-circuit evaluation issues

2. Null Pointer Issues

  • Accessing properties/methods on potentially null objects
  • Missing null checks before dereference
  • Nullable returns without handling
  • Optional chaining gaps

3. Boundary Issues

  • Array index out of bounds
  • Empty collection access (first/last on empty)
  • Off-by-one errors in loops
  • Integer overflow/underflow
  • String length issues

4. Race Conditions

  • Shared mutable state without synchronization
  • Check-then-act patterns
  • Time-of-check to time-of-use (TOCTOU)
  • Concurrent collection modification

5. Resource Leaks

  • Unclosed file handles
  • Database connections not released
  • Stream resources not freed
  • Missing finally blocks
  • Temporary files not cleaned

6. Exception Issues

  • Swallowed exceptions (empty catch)
  • Generic exception catching
  • Missing exception handling
  • Re-throwing without context
  • Exception in finally block

7. Type Issues

  • Implicit type coercion problems
  • Mixed types in comparisons
  • Unsafe type casting
  • Type mismatch in returns

8. SQL Injection

  • String concatenation in queries
  • Unescaped user input
  • Dynamic table/column names
  • Missing prepared statements

9. Infinite Loops

  • Missing break conditions
  • Incorrect loop variables
  • Unbounded recursion
  • Circular references

Log-Assisted Diagnosis

When diagnosing bugs, proactively search for log evidence:

  1. Discover logs — Use acc:discover-project-logs to find application log files
  2. Analyze relevant logs — Use acc:analyze-php-logs to extract exceptions and stack traces
  3. Correlate with code — Match log errors to code locations found during static analysis
  4. Reduce false positives — Confirm suspected bugs with actual runtime evidence from logs

Read the full file on GitHub · 142 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. 5d ago First seen · 142 lines · 47 tokens per session scan A f318cb58cbd6

Subscribe to this mod's changes

bug-hunter is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 19d ago), licensed MIT. It adds 47 tokens to every session and 1,039 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.