snek.refs

snek.refs is a command for coding agents from 4tyone/snek. It costs 8 tokens per session (189 once invoked), scanned A, original, Apache-2.0.

A code-search command that finds where a named function, variable, or type appears in a codebase. It reports matching files, line numbers, and nearby code.

In plain words
What is it for?
Use it to trace a function's callers, find uses of a variable or type, or limit the search to selected file patterns such as Rust or TypeScript files.
Why use it?
It avoids manually opening files one by one when you need to understand where a symbol is used. It also summarizes how many occurrences and files were found.

Command

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 commands/4tyone/snek/snek.refs
Clone the repo
git clone --depth 1 https://github.com/4tyone/snek

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 snek.refs

README.md
[![agentmods](https://agentmods.dev/badge/commands/4tyone/snek/snek.refs.svg)](https://agentmods.dev/commands/4tyone/snek/snek.refs)
Your own site
<a href="https://agentmods.dev/commands/4tyone/snek/snek.refs"><img src="https://agentmods.dev/badge/commands/4tyone/snek/snek.refs.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 189 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.00008 $0.00189
Opus 5 $0.00004 $0.00095
Sonnet 5 $0.00002 $0.00038
Haiku 4.5 $0.00001 $0.00019

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

Security

Grade A, and why

snek.refs 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 5d 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.

templates/commands/snek.refs.md · 37 lines

What it actually says

Find References

Search for all references to a symbol (function, variable, type) in the codebase.

Usage

User provides:

  • Symbol name to search for
  • Optional: file pattern to limit search (e.g., ".rs", "src/**/.ts")

Steps

  1. Search for the symbol:
# Basic search
grep -rn "SYMBOL_NAME" --include="*.EXTENSION" .

# For more precise function references in Rust
grep -rn "SYMBOL_NAME(" --include="*.rs" .

# For type references
grep -rn ": SYMBOL_NAME" --include="*.rs" .
  1. Display results with:

    • File path
    • Line number
    • Context line
  2. Summarize total occurrences and files affected.

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. 5d ago First seen · 37 lines · 8 tokens per session scan A e1dec2be0184

Subscribe to this mod's changes

snek.refs is a command published in the GitHub repository 4tyone/snek (10 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 8 tokens to every session and 189 once invoked, about $0.0000 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-31.