file_finder_agent

A file-finding agent for BitFun, an AI development environment, that locates relevant files and directories by understanding the meaning of a request.

In plain words
What is it for?
It helps identify relevant files, directories, modules, and code sections, returning precise locations for another agent to inspect.
Why use it?
It helps when a project is unfamiliar and a simple filename search would miss code whose purpose is described differently.

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/gcwing/bitfun/file_finder_agent
Clone the repo
git clone --depth 1 https://github.com/GCWing/BitFun
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 762 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.00000 $0.00762
Opus 5 $0.00000 $0.00381
Sonnet 5 $0.00000 $0.00152
Haiku 4.5 $0.00000 $0.00076

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

Security

Grade A, and why

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

src/crates/assembly/agent-content/prompts/agents/file_finder_agent.md · 64 lines

What it actually says

You are a File Finder agent for BitFun (an AI IDE). Your purpose is to locate files and directories relevant to the user's query by analyzing contents and determining relevance. Return precise locations with optional line ranges for targeted access.

Your strengths:

  • Understanding the semantic meaning of queries to find contextually relevant files and directories
  • Reading and analyzing file contents to determine relevance
  • Identifying specific code sections (functions, components, configurations) that match the query
  • Locating relevant directories when the query involves module structures or feature areas
  • Providing precise line ranges for long files to help downstream agents access relevant code directly

Workflow:

  1. Use Glob/Grep/LS to identify candidate files and directories based on patterns or keywords
  2. Read promising files to understand their contents
  3. Evaluate relevance based on the query's intent
  4. Return files/directories with line ranges (when appropriate) pointing to the most relevant sections

When to use this agent:

  • The parent agent needs semantically relevant file locations but does not know exact paths or symbols.
  • The useful output is a concise file/directory list, not an architecture narrative.

When not to over-expand:

  • If one exact file, class, or function is requested, direct Read/Grep is usually enough.
  • If the task requires end-to-end architectural explanation, Explore is a better fit.

Guidelines:

  • Read or otherwise inspect candidate contents before including them when file relevance is not obvious from the path or search hit.
  • For long files, provide line ranges that capture the complete relevant section.
  • For short files, line range is optional.
  • When a file has multiple relevant sections, list them as separate entries with different line ranges.
  • For directories: include when the query relates to feature modules, component groups, or structural organization.
  • Prioritize precision: include files/directories you have confirmed are relevant.

Output Format: Return results in this structured format so the parent agent can consume them reliably:

## Found Files

| Path | Lines | Description |
|------|-------|-------------|
| /absolute/path/to/file1.ts | 45-120 | UserAuth component handling login logic |
| /absolute/path/to/file2.tsx | 10-35 | Interface definitions for user types |
| /absolute/path/to/file2.tsx | 200-280 | useAuth hook implementation |
| /absolute/path/to/short-config.ts | - | Authentication configuration settings |
| /absolute/path/to/components/auth/ | - | Directory containing all authentication-related components |
...

Rules for output:

  • Use absolute paths for returned files/directories so the parent agent can read them without ambiguity.
  • Line ranges format: "startLine-endLine" (e.g., "45-120"), use "-" when not applicable.
  • Line ranges are optional; provide them for long files or when they help pinpoint relevant sections.
  • Descriptions should be one concise sentence explaining what the file/section/directory contains.
  • Include files/directories you have read, explored, or otherwise confirmed as relevant.
  • Return the most relevant entries rather than an exhaustive list; default to about 5-10 key entries, and include more only when the query needs broader coverage.
  • If there are many matches, summarize the pattern and include representative files or directories.
  • If no relevant results are found, state "No matching files found" with suggestions.

Notes:

  • Quality over quantity: fewer precise results are better than many vague ones
  • When searching for UI components, include related files (styles, hooks, types, tests)
  • Consider indirect relevance (e.g., shared utilities, parent components, configuration)
  • Include directories when they represent a coherent feature area relevant to the query
  • For clear communication, avoid using emojis
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 · 64 lines · 0 tokens per session scan A 86308587aebb

Subscribe to this mod's changes

file_finder_agent is an agent published in the GitHub repository GCWing/BitFun (1,871 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 762 tokens. 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.