vfs-agent-search

vfs-agent-search is a cursor rule for Cursor from TrNgTien/vfs. It costs 2,999 tokens per session, scanned A, original, MIT.

A set of rules for searching source code: use VFS to locate definitions, then Grep and Read to understand their implementation.

In plain words
What is it for?
Use it when navigating, understanding, or changing Go, JavaScript, TypeScript, Python, Rust, Java, and other supported codebases.
Why use it?
It prevents mistaken conclusions based only on function or class signatures whose internal code was not inspected.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Grep: "INVALID_API_KEY" in ./internal/ ← string literal inside function body.

Good fit Use it when navigating, understanding, or changing Go, JavaScript, TypeScript, Python, Rust, Java, and other supported codebases.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/TrNgTien/vfs
agentmods
npx agentmods add rules/trngtien/vfs/vfs-agent-search

Made for: Cursor.

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 vfs-agent-search

README.md
[![agentmods](https://agentmods.dev/badge/rules/trngtien/vfs/vfs-agent-search/github.svg)](https://agentmods.dev/rules/trngtien/vfs/vfs-agent-search)
Your own site
<a href="https://agentmods.dev/rules/trngtien/vfs/vfs-agent-search"><img src="https://agentmods.dev/badge/rules/trngtien/vfs/vfs-agent-search/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 vfs-agent-search

Your own site · 80×15
<a href="https://agentmods.dev/rules/trngtien/vfs/vfs-agent-search"><img src="https://agentmods.dev/badge/rules/trngtien/vfs/vfs-agent-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,999 This file is loaded in full into every session.
When invoked 2,999 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02999 $0.02999
Opus 5.5 $0.01200 $0.01200
Sonnet 5.5 $0.00600 $0.00600
Haiku 4.5 $0.00300 $0.00300

Measured 1mo ago against content hash d16c7edd21d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vfs-agent-search 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 1mo 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.

.cursor/rules/vfs-agent-search.mdc · 264 lines

How it starts

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

Code Search Strategy: Navigate with vfs, Understand with Grep/Read

vfs is a navigation tool (find where things are), not an understanding tool (know how things work). Signatures without bodies create false confidence. Always read implementation before claiming to understand behavior.

How vfs Works

vfs parses source files via AST and returns exported signatures with bodies stripped. It supports Go, JS, TS, Python, Rust, Java, C#, Dart, Kotlin, Swift, Ruby, Solidity, HCL, Dockerfile, Protobuf, SQL, and YAML.

What vfs gives you: internal/services/fare.go:42: func CalculateFare(req *FareRequest) (*FareResponse, error) What vfs hides: The 50 lines of implementation inside that function.

This makes vfs excellent for locating definitions, but dangerous for understanding behavior.

Step 1: Classify Your Intent

Before searching, determine what you need:

Intent Description Primary tool Depth required
Locate "Which file defines X?" vfs Signature only — no Read needed
Understand "How does X work?" vfs → Read body + context Full implementation + dependencies
Modify "Change how X behaves" vfs → Read body + callers Full implementation + Grep for usages
Debug "Why does X fail?" Grep + Read Bodies, callers, error paths — vfs alone is useless here

Step 2: Search (vfs for navigation)

Use vfs as the first step to locate definitions — not as the final answer.

Access Priority: MCP First, CLI Fallback

MCP runs on the host outside the sandbox and bypasses binary restrictions.

Step,Name,Action,Condition,Result
1,MCP,"CallMcpTool(server: user-user-vfs, toolName: search, ...)",success,Use MCP for all vfs operations
1,MCP,"CallMcpTool(server: user-user-vfs, toolName: search, ...)",failure/error,Go to step 2
2,CLI fallback,"run `command -v vfs` in Shell",found,"Use `vfs <path> -f <pattern>` via Shell"
2,CLI fallback,"run `command -v vfs` in Shell",not found,Go to step 3
3,Grep/Read fallback,"Fall back to Grep/Read silently",,Notify user once per session if needed; Do NOT block progress

Read the full file on GitHub · 264 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. 1mo ago First seen · 264 lines · 2,999 tokens per session scan A d16c7edd21d6

Subscribe to this mod's changes

vfs-agent-search is a cursor rule published in the GitHub repository TrNgTien/vfs (143 stars, last pushed 1mo ago), licensed MIT. It adds 2,999 tokens to every session, about $0.0120 per session on Opus 5.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.