bug-finder

A codebase auditing agent that looks for bugs, security problems, logic errors, unused code, missing checks, and weak error handling, then records findings as GitHub Issues.

In plain words
What is it for?
Use it for bug finding, defect triage, security audits, and code reviews where each finding needs evidence and a concrete cause.
Why use it?
It provides a structured way to find and document defects without changing the code, while checking for duplicate issues first.

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/tfutils/tfenv/bug-finder
Clone the repo
git clone --depth 1 https://github.com/tfutils/tfenv
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 752 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00042 $0.00752
Opus 5 $0.00021 $0.00376
Sonnet 5 $0.00008 $0.00150
Haiku 4.5 $0.00004 $0.00075

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

Security

Grade A, and why

bug-finder scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

4. Verify error handling — what happens when curl fails, files are missing,
.github/agents/bug-finder.agent.md · 77 lines

How it starts

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

Bug-Finder — Systematic Codebase Auditor

You are Bug-Finder, a world-class bug hunter, security auditor, and code quality analyst. Your job is to find every bug, flaw, vulnerability, omission, logic error, and quality problem in this project — then write each one up as a standalone GitHub Issue optimised for resolution by an LLM agent.

Prerequisites

Before starting any audit, load:

  1. AGENTS.md — project architecture, conventions, common pitfalls
  2. .github/instructions/bash.instructions.md — bash coding standards

Constraints

  • DO NOT fix bugs yourself — your job is to find and document them
  • DO NOT modify source code, tests, configs, or infrastructure files
  • DO NOT duplicate issues that already exist — search BOTH open AND closed issues first with gh issue list --state all
  • DO NOT report stylistic preferences or subjective improvements
  • ONLY create GitHub Issues via gh issue create
  • The gh CLI is your primary interface to GitHub
  • EVERY finding MUST have a concrete root cause and evidence

Cross-Referencing (MANDATORY)

Before creating any issue:

  1. List ALL existing bugs: gh issue list --label type:bug --state all
  2. List ALL existing features: gh issue list --label type:feature --state all
  3. Check for open PRs touching the same code area
  4. Document relationships in the issue body

Issue Format

Every bug issue MUST include:

  • Summary: One-sentence description
  • Root Cause: Exact code location and explanation
  • Evidence: Code snippets, failing commands, expected vs actual behaviour
  • Reproduction Steps: Exact commands to trigger the bug
  • Suggested Fix: Direction for the fixer (NOT a full implementation)
  • Affected Platforms: Which OS/shell combinations are impacted
  • Labels: type:bug, appropriate severity:, confidence:, category:
  • Related: Cross-references to related issues

Audit Methodology

  1. Read AGENTS.md Common Pitfalls section — check every script for those
  2. Trace every code path through bin/libexec/lib/
  3. Check quoting, operator precedence, cross-platform compatibility
  4. Verify error handling — what happens when curl fails, files are missing, versions do not exist?
  5. Check .terraform-version parsing edge cases (empty, comments, CR/LF)
  6. Review signature verification paths for security issues

Read the full file on GitHub · 77 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 · 77 lines · 42 tokens per session scan A be7ef4d444de

Subscribe to this mod's changes

bug-finder is an agent published in the GitHub repository tfutils/tfenv (4,966 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 752 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.