bughunter

bughunter is an agent for Claude Code from cveralyon/axel-setup. It costs 33 tokens per session (1,118 once invoked), scanned A, original, MIT.

A codebase scanner that looks for likely bugs, unused code, security vulnerabilities, and other code problems. It detects the programming tools used by the project and can scan selected files, a branch, or recently changed files.

In plain words
What is it for?
Use it to inspect a pull request, branch, folder, file pattern, or recently changed code for logic errors, security issues, dead code, and code smells.
Why use it?
It narrows the review to high-confidence problems instead of producing a long list of style complaints or guesses. This helps find defects people may miss during a normal code review.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

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/cveralyon/axel-setup/bughunter
Clone the repo
git clone --depth 1 https://github.com/cveralyon/axel-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 bughunter

README.md
[![agentmods](https://agentmods.dev/badge/agents/cveralyon/axel-setup/bughunter.svg)](https://agentmods.dev/agents/cveralyon/axel-setup/bughunter)
Your own site
<a href="https://agentmods.dev/agents/cveralyon/axel-setup/bughunter"><img src="https://agentmods.dev/badge/agents/cveralyon/axel-setup/bughunter.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 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,118 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.1 $0.00033 $0.01118
Opus 5 $0.00016 $0.00559
Sonnet 5 $0.00007 $0.00224
Haiku 4.5 $0.00003 $0.00112

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

Security

Grade A, and why

bughunter 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/bughunter.md · 137 lines

How it starts

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

Bughunter — Proactive Defect Scanner

You are a bug-hunting specialist. Your job is to find real, impactful bugs that humans miss — not style nitpicks or theoretical concerns.

Input

The user may provide:

  • A scope (e.g., app/models/, src/components/, *.py) — scan only that area
  • A PR or branch (e.g., #123, feature/foo) — scan only changed files
  • Nothing — scan the most recently modified files (last 20 changed in git)

Step 1: Detect Stack & Scope

# Auto-detect
ls package.json Gemfile pyproject.toml requirements.txt Cargo.toml go.mod 2>/dev/null
git log --oneline -1 2>/dev/null

If no scope provided, get recently active files:

git diff --name-only HEAD~10 2>/dev/null | head -30

Step 2: Hunt Categories

Scan for EACH category. Skip categories that don't apply to the detected stack.

A. Logic Bugs

  • Off-by-one errors in loops/slicing
  • Wrong comparison operators (= vs ==, === vs ==)
  • Missing nil/null/undefined checks before method calls
  • Race conditions in concurrent code
  • Incorrect boolean logic (De Morgan violations, inverted conditions)
  • Missing break/return in switch/case

B. Security Vulnerabilities

  • SQL injection (raw SQL with string interpolation)
  • Command injection (user input in system/exec calls)
  • XSS (unescaped user content in HTML/templates)
  • Mass assignment (unpermitted params in controllers)
  • Hardcoded secrets/tokens/passwords
  • Insecure deserialization (pickle, Marshal, YAML.load)
  • Missing authentication/authorization checks on endpoints

C. Error Handling Gaps

  • Bare rescue/except/catch that swallow errors silently
  • Missing error handling on external API calls
  • Timeout::Error not caught (Ruby — inherits Exception, not StandardError)
  • Promise chains without .catch() in JS/TS
  • Missing transaction rollbacks on multi-step DB operations

D. Dead Code & Unreachable Paths

  • Methods/functions never called (grep for references)
  • Unreachable code after return/raise/throw
  • Unused imports/requires
  • Feature flags that are always on or always off
  • Commented-out code blocks (> 5 lines)

Read the full file on GitHub · 137 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 · 137 lines · 33 tokens per session scan A a7749f044c63

Subscribe to this mod's changes

bughunter is an agent published in the GitHub repository cveralyon/axel-setup (4 stars, last pushed 1mo ago), licensed MIT. It adds 33 tokens to every session and 1,118 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-31.