refs

refs is a command for coding agents from adamthewilliam/grepika. It costs 31 tokens per session (371 once invoked), scanned A, original, MIT.

A code-search command that finds every reference to a named symbol, such as a function, class, or variable. It groups matches by definition, import, type use, and other uses.

In plain words
What is it for?
Use it to locate definitions, imports, type annotations, and call sites across the indexed project, with file paths, line numbers, and code context.
Why use it?
It helps developers understand where a piece of code is declared and used without manually searching through files. This is useful before changing or removing a symbol.

Command

Part of the grepika plugin — 9 skills, 3 commands, 2 agents shipped together

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/adamthewilliam/grepika/refs
Clone the repo
git clone --depth 1 https://github.com/adamthewilliam/grepika

Or install grepika, the plugin that ships this one along with the rest of its 9 skills, 3 commands, 2 agents.

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 refs

README.md
[![agentmods](https://agentmods.dev/badge/commands/adamthewilliam/grepika/refs.svg)](https://agentmods.dev/commands/adamthewilliam/grepika/refs)
Your own site
<a href="https://agentmods.dev/commands/adamthewilliam/grepika/refs"><img src="https://agentmods.dev/badge/commands/adamthewilliam/grepika/refs.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 371 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.00031 $0.00371
Opus 5 $0.00015 $0.00186
Sonnet 5 $0.00006 $0.00074
Haiku 4.5 $0.00003 $0.00037

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

Security

Grade A, and why

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 3d 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.

plugins/grepika/commands/refs.md · 55 lines

What it actually says

Find all references to a symbol.

Arguments

$ARGUMENTS

Steps

  1. Call mcp__grepika__add_workspace with path set to the project root directory

  2. Call mcp__grepika__refs with the symbol from $ARGUMENTS and limit: 50

  3. Group results by ref_type and report in this exact format:

    References: [symbol]

    Definition

    File Line Context
    path N code snippet

    Imports

    File Line Context
    path N import statement

    Type Usage

    File Line Context
    path N type annotation

    Usage (Call Sites)

    File Line Context
    path N call/reference

    [N] total references across [M] files

Important

  • Do NOT use a sub-agent. Call the MCP tools directly in the main conversation.
  • Be concise. No extra explanation needed beyond the tables.
  • Omit empty sections (e.g., if no imports found, skip that table).
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. 3d ago First seen · 55 lines · 31 tokens per session scan A 2ae4950f58eb

Subscribe to this mod's changes

refs is a command published in the GitHub repository adamthewilliam/grepika (134 stars, last pushed 21d ago), licensed MIT. It adds 31 tokens to every session and 371 once invoked, about $0.0002 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-30.