update

update is a command for coding agents from JSungMin/vs-token-safer. It costs 81 tokens per session (652 once invoked), scanned A, original, MIT.

A command that refreshes a tree-sitter symbol index, which records where functions and other code symbols are located.

In plain words
What is it for?
It is for checking index freshness and incrementally re-indexing changed files.
Why use it?
It corrects outdated file and line references after large code changes, branch switches, or pulls.

Command

Part of the vs-token-safer plugin — 3 skills, 6 commands, 1 agent, 1 MCP server, 1 plugin 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/jsungmin/vs-token-safer/update
Clone the repo
git clone --depth 1 https://github.com/JSungMin/vs-token-safer

Or install vs-token-safer, the plugin that ships this one along with the rest of its 3 skills, 6 commands, 1 agent, 1 MCP server, 1 plugin.

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 update

README.md
[![agentmods](https://agentmods.dev/badge/commands/jsungmin/vs-token-safer/update.svg)](https://agentmods.dev/commands/jsungmin/vs-token-safer/update)
Your own site
<a href="https://agentmods.dev/commands/jsungmin/vs-token-safer/update"><img src="https://agentmods.dev/badge/commands/jsungmin/vs-token-safer/update.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 652 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.00081 $0.00652
Opus 5 $0.00041 $0.00326
Sonnet 5 $0.00016 $0.00130
Haiku 4.5 $0.00008 $0.00065

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

Security

Grade A, and why

update 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 4d 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.

commands/update.md · 43 lines

What it actually says

Update the vs-token-safer index

The committable tree-sitter index (.vts-index/symbols.jsonl) powers the SYNTACTIC tier — instant symbol search with no language server, shareable with the team by committing it. It is built once; after the code moves a lot it goes STALE and its file:line answers drift from where symbols actually are. This command brings it current in ONE incremental re-index: only stat/hash-changed files are re-parsed, the rest are reused verbatim, so even a long-stale index refreshes fast.

Do this:

  1. Check staleness first — call the vts_admin MCP tool with a status probe (no rebuild):

    vts_admin { "op": "index", "params": { "status": true } }

    It reports the index's build date, file/symbol counts, and whether it is stale (how many files changed since it was built). If it reports fresh (0 changed), tell the user the index is already current and STOP — a rebuild would do nothing.

  2. Rebuild incrementally — if it is stale (or no index exists yet), call:

    vts_admin { "op": "index" }

    This re-parses ONLY the changed files, reuses the rest, and writes the updated .vts-index/symbols.jsonl. Report the re-parsed N, reused M counts back to the user so they see exactly what was refreshed.

  3. Remind to commit it.vts-index/ is committable and team-shared. Tell the user to git add .vts-index && git commit so teammates get the fresh index too (that is the whole point of the committable tier — one person re-indexes, everyone benefits).

Notes:

  • This refreshes ONLY the tree-sitter (syntactic) tier — the tier that goes stale because it is a stored snapshot. The clangd/LSP semantic index re-indexes itself on file changes (file-watch + background), so it does not need this. If you also want to warm the semantic tier (e.g. a fresh clone), run vts preindex separately — that is a different concern from index staleness.
  • detect_changes and the dashboard symbol graph run live (git + LSP + tree-sitter), so they are never stale and need no refresh — this command is specifically for the committed .vts-index symbol search.

$ARGUMENTS

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. 4d ago First seen · 43 lines · 81 tokens per session scan A 88cb5706ea64

Subscribe to this mod's changes

update is a command published in the GitHub repository JSungMin/vs-token-safer (11 stars, last pushed 6d ago), licensed MIT. It adds 81 tokens to every session and 652 once invoked, about $0.0004 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.