tfenv: Agent for Claude Code

.github/agents/bug-finder.agent.md

bug-finder is an agent for Claude Code from tfutils/tfenv. It costs 42 tokens per session (752 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter; mentions AGENTS.md.

This is tfutils/tfenv's own configuration. It tells Claude Code how to work on tfenv itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tfenv configures →

About the project

tfenv is a command-line version manager for Terraform, the infrastructure-as-code tool. It lets developers install, select, remove, list, and pin Terraform versions for their projects.

tfutils/tfenv · 4,991 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to tfutils/tfenv. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tfutils/tfenv/master/.github/agents/bug-finder.agent.md
Clone the repo
git clone --depth 1 https://github.com/tfutils/tfenv

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 bug-finder

README.md
[![agentmods](https://agentmods.dev/badge/agents/tfutils/tfenv/bug-finder/github.svg)](https://agentmods.dev/agents/tfutils/tfenv/bug-finder)
Your own site
<a href="https://agentmods.dev/agents/tfutils/tfenv/bug-finder"><img src="https://agentmods.dev/badge/agents/tfutils/tfenv/bug-finder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bug-finder

Your own site · 80×15
<a href="https://agentmods.dev/agents/tfutils/tfenv/bug-finder"><img src="https://agentmods.dev/badge/agents/tfutils/tfenv/bug-finder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.00042 $0.00752
Opus 5.5 $0.00017 $0.00301
Sonnet 5.5 $0.00008 $0.00150
Haiku 4.5 $0.00004 $0.00075

Measured 2mo ago against content hash be7ef4d444de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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,991 stars, last pushed 4mo ago), licensed MIT. It adds 42 tokens to every session and 752 once invoked, about $0.0002 per session on Opus 5.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.

Related

bug-finder compared with agents from other repositories

bug-finder next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bug-findertfutils/tfenvAgent5.0k4mo agoMITA42Claude Code
rot-antivenomNova-Violet-Role/RoT-MoEAgent21mo agoAGPL-3.0A79Claude Code
goal-verifierNova-Violet-Role/RoT-DTD-GOALAgent22mo agononeA41Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent662yesterdayMITA63Claude Code
debuggerTT-Wang/forgeAgent353d agoMITA17Claude Code
debuggerbostonaholic/rpikitAgent204d agoMITA28Claude Code
loom-advisorcosmix/loomAgent655d agoMITA53Claude Code