/vs-token-safer:vs-searchfrom vs-token-safer
Routes code search through language-server indexes (clangd, Roslyn, tsserver, pyright) instead of grep. Use for symbol lookup, references, definitions, call hierarchy, diagnostics, and rename across C/C++, C#, JS/TS, and Python.
Ships in vs-token-safer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Code search runs through an OFFICIAL language server's index (clangd for C++, a Roslyn-based LSP for
C#) and the result is token-capped to a compact file:line list — no source bodies. No IDE needs to
be open; the engine is spawned headlessly. Karpathy-style rules: do the listed thing, do not improvise.
vs-search)search_symbol (args: q, projectPath, backend, maxResults). Never grep/rg for this.find_references (args: symbol NAME, or path+line+character — 0-based — includeDeclaration). Semantic, not a text match. direction=callers/callees + depth → a multi-hop call hierarchy (transitive callers = blast radius before an edit / callees) via LSP callHierarchy, instead of flat references.goto_definition (args: path, line, character — 0-based). The kind arg picks WHICH: definition (default) · type_definition (the type of an expression) · implementation (concrete impls of an interface/abstract/virtual — "who implements this?") · declaration. For every usage (not the definition) use find_references instead.hover (args: path, line, character).document_symbols (args: path; scope="directory" → a signatures-only skeleton of every code file under a dir, to grasp a module's shape without reading each file).read_symbol (args: symbol, optional path/line, signatureOnly). The read-side twin of the edit tools — name a symbol, get just its body. Prefer over the built-in Read when you only need one declaration.diagnostics (args: path, or scope="directory" to scan the project). Token-capped file:line:col severity: message, sorted error→hint with a count summary — read this instead of the raw build/compiler output.rename (args: path, line, character, newName, apply). Semantic (every reference), not a sed. Preview by default; apply=true writes the edits.replace_symbol_body (args: symbol, body, optional path/line, apply).insert_symbol (args: symbol, text, position = after default / before, apply).safe_delete (args: symbol, force, apply). Refuses while it's still referenced unless force=true.apply=true writes. Use the built-in Edit for a sub-declaration tweak (a few lines inside a body); use these when the unit is the whole declaration.apply=true write auto-runs p4 edit on a read-only file first (symbol edits write via the server, so a built-in Edit/Write p4 hook never sees them). Read-only-gated, so a git repo never calls p4; disable with VTS_P4_EDIT=0.search_text (args: q, projectPath). Token-capped; the sanctioned grep replacement.find_files (args: q, projectPath). Replaces find -name.vts_admin with an op: config/setup (settings), savings/savings_reset (token ledger), warmup (pre-build the index), discover (find searches that bypassed vts), gen_compile_db (UE clangd DB), git/p4 (read-only VCS, output compacted). Put the op's args in params, e.g. vts_admin {op:"git", params:{argv:["status"]}}. (CLI keeps the bare subcommands: vts setup, vts git, …).log/.jsonl, or a Logs/ dir) → NOT a vs-search tool. The language-server index covers
source, not logs — use gamedev-log (/gamedev-log-analyzer:logs). vts-search results aimed at a log
carry a one-line pointer there.Delegate a whole "where is X / what calls Y / find file W" lookup to the code-locator subagent —
it runs the searches in its own context and returns just the file:line table, so the matches never
land in yours.
CLI equivalent (no MCP needed): vts symbol --q <name> --projectPath <root>,
vts references --path <file> --line N --character N, vts definition --path <file> --line N --character N [--kind implementation],
vts hover …, vts symbols --path <file>, vts diagnostics --path <file>, vts text --q <pattern>, vts files --q <glob>.
compile_commands.json
(or a .uproject) → clangd; a .sln/.csproj → roslyn; a tsconfig/jsconfig/package.json
→ typescript (tsserver); a pyproject.toml/*.py → pyright. Override with
backend=clangd|roslyn|typescript|pyright or env VTS_BACKEND when a root carries more than one.projectPath or env VTS_PROJECT_PATH (default: cwd).compile_commands.json. Unreal: generate via UBT
-mode=GenerateClangDatabase; CMake: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON. Without it, clangd
indexes nothing useful — tell the user to generate it.csharp-ls dotnet tool; point VTS_ROSLYN_CMD/VTS_ROSLYN_ARGS at
Microsoft.CodeAnalysis.LanguageServer for the exact Visual Studio engine. Currently best-effort.node. Override via VTS_TS_CMD/VTS_PY_CMD.Symbol/reference lists are capped at maxResults (default 60). A trailing … N more means the set
was truncated — raise maxResults or narrow the query. For refactors/renames that must touch every
call site, raise the cap (or narrow with a more specific symbol) before acting; don't act on a
partial set and claim it's complete.
file:line — far less raw source reaches the model than grep-and-paste.search_symbol quality depends on compile_commands.json being current.
Verify the result; regenerate the compile DB if a known symbol is missing.If a vs-search tool errors (engine missing/failed to spawn): clangd not installed → install LLVM
clangd; roslyn not installed → dotnet tool install --global csharp-ls; typescript/pyright not found →
re-run the session so the bundled deps reinstall (or set VTS_TS_CMD/VTS_PY_CMD). Until the engine works,
code-grep is blocked by the hook — the user can set VTS_ENFORCE=0 to allow grep as a fallback. Do
not loop on blocked grep; surface the fix and move on.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jsungmin/vs-token-safer --plugin vs-token-safer3 skills in this plugin
/vs-dcevs-token-safer — dead-code elimination (preview only)Preview-only dead-code analysis for C/C++, C#/.NET, JS/TS, and Python via vs-token-safer. From one or more seed symbols, walk the official language server's call graph to a fixpoint and report what is provably DEAD (and what transitively becomes dead) — without deleting anything. Use whenever the user asks what code is unused/removable, whether a function is called anywhere, what becomes dead if a symbol is deleted, or for transitive dead-code cleanup. Not for a plain "who calls X" (use find_references) — this is the multi-hop cascade + safe deletion order./vs-vizvs-token-safer dashboard (`vts serve`)How to open/close and reason about the vs-token-safer local dashboard — an interactive page (savings trend, language mix, per-tool savings, and a 3D Three.js include-graph) served on 127.0.0.1. Use when the user wants to SEE/visualize what vs-token-safer has indexed or how many tokens it saved, or asks to open/close/show the dashboard or token visualization.Other plugins' skills for the same job