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.
npx agentmods add commands/jsungmin/vs-token-safer/setupgit clone --depth 1 https://github.com/JSungMin/vs-token-saferWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00033 | $0.01410 |
| Opus 5 | $0.00016 | $0.00705 |
| Sonnet 5 | $0.00007 | $0.00282 |
| Haiku 4.5 | $0.00003 | $0.00141 |
Grade A, and why
setup 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.
vs-token-safer — setup
Configure the plugin by writing its config file (~/.vs-token-safer/config.json), which the CLI and
MCP server read at startup. Use the vts_admin MCP tool (server: vs-search) with an op +
params — the admin/meta ops (setup, config, …) are folded behind it, e.g.
vts_admin { "op": "setup", "params": { "projectPath": "<root>" } }. Do NOT edit the user's OS environment.
Steps:
- Show current settings: call
vts_admin { "op": "config" }. - Detect/confirm the backend. Backend auto-detects from the project root:
- C/C++ → needs
compile_commands.jsonin (or under) the root → clangd. Unreal: generate via UBT-mode=GenerateClangDatabase(add-Compiler=VisualCppif the targets build with clang-cl, else clang-toolchain validation fails); CMake:-DCMAKE_EXPORT_COMPILE_COMMANDS=ON. Use clangd ≥ 22 — the VS-bundled clangd 19.1.x deadlocks indexing Unreal TUs; if vts prints a clangd-version advisory, pointVTS_CLANGD_CMDat a current clangd (https://github.com/clangd/clangd/releases). - C#/.NET → a
.sln/.csproj→ roslyn (default enginecsharp-ls; install withdotnet tool install --global csharp-ls, or pointVTS_ROSLYN_CMDat MS C# LSP). - JS/TS → a
tsconfig/jsconfig/package.jsonor*.ts/js→ typescript (bundledtypescript-language-server, auto-installed). Python →pyproject.toml/*.py→ pyright (bundled, auto-installed). Nothing to install for these two.
- C/C++ → needs
- Gather values (ask one at a time, or an
AskUserQuestionfor the common ones):projectPath— default project root (where the compile DB / .sln / package.json lives).backend—clangd|roslyn|typescript|pyright(omit to auto-detect).maxResults— cap on returnedfile:linelocations (default 60).prewarmBackends—auto(warm the dominant backend) |all(warm every language present, each in proportion to its file count) | a comma list. Omit it:vts_admin { op: "setup" }runs a language census of the root and picksautofor a single-language repo orallfor a multi-language one automatically.
- Apply: call
vts_admin { "op": "setup", "params": { … } }with only the keys to change, e.g.vts_admin { "op": "setup", "params": { "projectPath": "<root>", "backend": "clangd" } }. It reports the detected language mix (e.g.clangd(820), typescript(40)) and theprewarmBackendsit chose. - Unmet C++ prerequisites → present clickable choices, don't ask in prose. When the clangd backend
is missing
compile_commands.jsonand/or a clangd ≥ 22 binary, the user should click, not type. Use theAskUserQuestiontool — one question per missing prerequisite, each with concrete options:- compile_commands.json missing → question "Generate the C++ compile database now?" options:
Dry-run first (Recommended)→ callvts_admin { op: "setup", params: { genCompileDb: true } }(prints the exact UBTGenerateClangDatabasecommand, runs nothing) — show it, then re-ask to apply.Run it now (apply)→vts_admin { op: "setup", params: { genCompileDb: "apply" } }(heavy: indexes engine headers, minutes, needs clangd ≥ 22). DB parks out-of-tree (~/.vs-token-safer/db/<project>), git/p4 never see it.Skip — I'll generate it myself→ leave as-is (text fallback stays active).
- clangd ≥ 22 not on PATH → question "clangd binary?" options:
Point vts at an installed clangd→ ask for the path, thenvts_admin { op: "setup", params: { clangdCmd: "<path>" } }(writesVTS_CLANGD_CMD).I'll install it→ link https://github.com/clangd/clangd/releases (VS-bundled 19.1.x deadlocks on UE).Skip for now→ text fallback stays active. Only fall back to a free-text question ifAskUserQuestionis unavailable. Always dry-run the DB before apply.
- compile_commands.json missing → question "Generate the C++ compile database now?" options:
- Tell the user to run
/reload-plugins(or restart) — settings are read at startup.
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.
- yesterday First seen · 63 lines · 33 tokens per session scan A c7592f1a0327
setup is a command published in the GitHub repository JSungMin/vs-token-safer (11 stars, last pushed 4d ago), licensed MIT. It adds 33 tokens to every session and 1,410 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.
Other commands, from other repositories
rb-refresh
Rebuild the repobrain project knowledge base after significant changes. / 在重要改动后重建 repobrain 项目知识库。.
rp-build-cli
Build with rp-cli context builder → chat → implement.
index
Index the codebase for semantic search.
definition
Find where a symbol is defined in the codebase.
review
Review current changes for correctness, style, and potential issues.
index
Visual overview of Beacon index — chunks, coverage, provider. Pass --files to list indexed files.