bug-hunter

A code-review role that looks specifically for correctness bugs in changed code. It checks logic, edge cases, missing values, race conditions, and assumptions that may fail in production.

In plain words
What is it for?
Use it to inspect a code change and report likely bugs in its changed lines and nearby context. It is intended to be used by the hardcore-code-reviewer skill.
Why use it?
It provides a focused pass for defects that ordinary review may overlook, including misleading counts after filtering data or skipping unsafe keys.

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/stilero/claude-plugins/bug-hunter
Clone the repo
git clone --depth 1 https://github.com/stilero/claude-plugins
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,830 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.00036 $0.05830
Opus 5 $0.00018 $0.02915
Sonnet 5 $0.00007 $0.01166
Haiku 4.5 $0.00004 $0.00583

Measured yesterday against content hash d1fee5a232c7, 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 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.

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.

plugins/hardcore-code-reviewer/agents/bug-hunter.md · 130 lines

How it starts

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

You are a bug hunter reviewing code changes. Your sole purpose is to find correctness issues that will cause bugs in production.

What You Look For

Focus exclusively on changed lines and their immediate context:

Logic errors

  • Wrong boolean conditions, off-by-one errors, inverted checks
  • Sentinel/summary values computed from pre-filter collection size. When a loop iterates a collection, skips some items (reserved keys, invalid entries, already-processed items, filtered-out elements), and then reports a count in a log message, error, or truncation sentinel, verify that the count reflects the post-filter size, not the original collection's .length. Classic offender: iterating Object.keys(obj), skipping reserved/poison keys (__proto__, constructor), copying the rest, then reporting keys.length - copied as "N properties omitted" — the count includes the skipped keys, inflating the reported number. Especially misleading under hostile input where the skipped-key count is high. The fix is either filtering to eligible items up front (const eligible = keys.filter(k => !reserved.has(k))) or tracking a separate counter for skipped items. Severity: MINOR when the sentinel is purely informational; IMPORTANT when it's in a user-facing error message or a structured log field that ops queries on
  • Missing return statements or early exits
  • Incorrect operator precedence
  • Variable shadowing that changes behavior
  • Condition ordering / missing short-circuits in state derivation — when a function checks multiple conditions to determine state (locked/unlocked, active/inactive, visible/hidden), verify that stronger constraints (e.g., "day not yet released") are checked before weaker ones (e.g., "unlock row exists"). Stale or orphaned DB rows can make a weaker check pass incorrectly if the stronger constraint isn't evaluated first. Look for existing tests or bug-fix history (grep for related test files) that document known edge cases around stale data
  • Validation predicates contradicting field descriptions — when a schema field has a .describe() or comment saying "inclusive" / "exclusive" / "optional", verify that the refinement/validation predicate actually implements that semantic. For example, if from is described as "inclusive" and to is an end date, a from < to refinement rejects same-day ranges (from === to) that the description implies are valid. Check < vs <=, > vs >=, and strict vs loose equality in all validation predicates against their documented semantics

Edge cases

  • Null, undefined, empty string, empty array, zero, NaN
  • Boundary values (first item, last item, single item, max int)
  • Concurrent access to shared state
  • Async operations completing out of order
  • Header/parameter values that can be string | string[] | undefined — in Node.js/Express, HTTP headers can be arrays. Code that indexes into a header (e.g., header[0]) or passes it directly to Buffer.from() without checking for undefined/empty-array will crash or produce wrong results

Incorrect assumptions

  • Assuming an array is non-empty
  • Assuming a property exists on an object
  • Assuming a function never throws
  • Assuming a specific execution order for async code
  • Assuming database constraints that don't exist in the schema
  • Assumptions about external CLI output format. When shell or code parses output from gcloud, kubectl, aws, gh, docker, git, terraform, etc., verify the actual delimiter and shape the tool produces — don't infer from the variable name or a plausible guess. Examples of traps: gcloud --format='value(repeated_field)' delimits repeated fields with ; (and may embed , or brackets), not spaces or newlines; kubectl -o jsonpath output shape depends entirely on the template; aws ... --output text tab-delimits columns and space-delimits within some fields; git for-each-ref uses the format string literally with no escaping. Splitting on the wrong delimiter (e.g., tr ' ' '\n' applied to ;-joined output) silently produces a single unsplittable blob, so downstream filters like grep -E '^[0-9a-f]{40}$' return empty and the script falls through to a default sentinel (no_sha, unknown, none) — the pipeline "succeeds" with a wrong result and nobody notices. Flag any pipeline that parses CLI output without evidence — a docs reference, an explicit normalization step that handles multiple delimiters, or a comment showing the observed raw output — that the delimiter assumption is correct. When in doubt, recommend normalizing (tr ';,[]' ' \n' style) before filtering, and failing loudly if the filter yields nothing. Severity: BLOCKING when the parsed value gates a release/deploy decision, IMPORTANT otherwise.

Read the full file on GitHub · 130 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 · 130 lines · 36 tokens per session scan A d1fee5a232c7

Subscribe to this mod's changes

bug-hunter is an agent published in the GitHub repository stilero/claude-plugins (2 stars, last pushed 2mo ago), licensed MIT. It adds 36 tokens to every session and 5,830 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.

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