bughunt

A structured bug-finding workflow that examines a repository across 14 analysis areas and produces a severity-ranked report with evidence. It can also write regression tests, which check that a fixed bug does not return.

In plain words
What is it for?
Searching a codebase for bugs, tracing their data flows, documenting verified findings, and optionally creating regression tests.
Why use it?
It separates verified bug reports from optional fixes and uses project context to reduce false alarms.

Skill for Claude CodeCodex

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 skills/drafthq/draft/bughunt
Any agent
npx skills add drafthq/draft --skill bughunt
Clone the repo
git clone --depth 1 https://github.com/drafthq/draft

Made for: Claude Code, Codex.

Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,832 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.00089 $0.07832
Opus 5 $0.00044 $0.03916
Sonnet 5 $0.00018 $0.01566
Haiku 4.5 $0.00009 $0.00783

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

Security

Grade A, and why

bughunt 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.

skills/bughunt/SKILL.md · 734 lines

How it starts

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

Bug Hunt

Conduct an exhaustive bug hunt on this Git repository, enhanced by Draft context when available.

Primary Deliverable

The bug report is the primary deliverable. Every verified bug MUST appear in the final report regardless of whether a regression test can be written. Regression tests are a supplementary output — helpful when possible, but never a filter for bug inclusion.

Relationship to Built-in Bug Hunt Agents

Some AI tools (e.g., Claude Code) provide a built-in bughunt agent that auto-discovers project structure and runs parallel sweeps. /draft:bughunt is complementary, not competing:

/draft:bughunt Built-in bughunt agent
Approach Context-driven methodology with 14 analysis dimensions and verification protocol Auto-discovery with parallel sweep subagents
Draft context Uses architecture, tech-stack, product, guardrails for false-positive elimination No Draft context awareness
Output Severity-ranked report with evidence Inline fixes + regression tests
Modifies code No (report + regression tests only) Yes (finds AND fixes)

When to use which: Use /draft:bughunt when you need context-aware analysis with structured evidence and false-positive elimination. Use the built-in agent when you want fast parallel sweeps with auto-fix capability. For maximum coverage, run both — /draft:bughunt catches context-specific bugs the built-in misses, and vice versa.

Red Flags - STOP if you're

  • Hunting for bugs without reading Draft context first (architecture.md, tech-stack.md, product.md)
  • Reporting a finding without reproducing or tracing the code path
  • Fixing production code instead of reporting bugs (bughunt reports bugs and writes regression tests — it doesn't fix source code)
  • Assuming a pattern is buggy without checking if it's used successfully elsewhere
  • Skipping the verification protocol (every bug needs evidence)
  • Making up file locations or line numbers without reading the actual code
  • Reporting framework-handled concerns as bugs without checking the docs
  • Skipping bugs because you can't write a test for them — mark as N/A and still report

Read the full file on GitHub · 734 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 734 lines · 89 tokens per session scan A 1b76dd775b3d

Subscribe to this mod's changes

bughunt is a skill published in the GitHub repository drafthq/draft (40 stars, last pushed 14d ago), licensed MIT. It adds 89 tokens to every session and 7,832 once invoked, about $0.0004 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.