From vs-token-safer
Preview-only dead-code analysis for C/C++, C#/.NET, JS/TS, and Python using official language server call graphs. Reports provably unused symbols and safe deletion order without modifying files.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vs-token-safer:vs-dceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Topological dead-code analysis built on the OFFICIAL language-server call graph (clangd / Roslyn / tsserver /
Topological dead-code analysis built on the OFFICIAL language-server call graph (clangd / Roslyn / tsserver /
pyright). You name seed symbol(s); it walks callers/callees to a fixpoint and classifies every reachable
symbol. The output is token-capped (names + file:line, no source bodies). Nothing leaves the machine.
Prefer the vts_admin MCP tool (it runs in the warm server process; vts is often not on PATH in Bash). Fall
back to the bundled CLI via node:
vts_admin { "op": "dce", "params": { "seed": "Foo", "projectPath": "<root>" } }
# several seeds: "params": { "seeds": "Foo,Bar", "projectPath": "<root>", "entry": "main,registerPlugin" }
# CLI fallback: node "$CLAUDE_PLUGIN_ROOT/server/cli.js" dce --seed Foo --projectPath <root>
Warm-index requirement (C++/clangd). The call graph must be warm. A cold or large clangd tree (e.g. an
Unreal monorepo, ~26k TUs) under-reports callers, so a live symbol could look DEAD — dce therefore REFUSES on
a cold clangd index. Scope + build first: vts setup --scope Source then vts preindex (or keep the MCP server
warm), then re-run. allowCold=true inspects a cold index with every verdict forced to INCONCLUSIVE (never
DEAD). TypeScript/Python/C# index on open and are not gated.
Show the result verbatim. Buckets: DEAD (no live caller, in safe deletion order) · HELD (still called) ·
ENTRY (kept root: main / public API / a name passed via entry) · INCONCLUSIVE (unresolved or the
caller set couldn't be proven complete).
Two modes. Default = caller-cascade (start from seeds, follow callers). Pass roots to switch to
reachability / mark-sweep (the Go-deadcode/RTA model): liveness is computed FORWARD from the named entry
points, so a missing caller can't cause a false DEAD — only an incomplete root set can (the reference verify
catches it). Roots are framework-agnostic — name them (roots="main,RunTests") or commit a team-curated
.vts-index/dce-roots.json. vts hard-codes NO framework markers (no UFUNCTION / @Route / [Test]); you
declare your own entry points, the same charter-pure mechanism as the committable concept-synonyms file.
dce only PROPOSES candidates from the call graph. The actual removal goes through safe_delete
(vts safe-delete --symbol <name> --apply), which independently re-checks find_references and refuses while
the symbol is still referenced. So a wrong DEAD candidate cannot delete live code: dce proposes, safe_delete disposes.
Karpathy-style rules — do the listed thing, do not improvise:
dce with the seed(s); show the buckets verbatim.safe_delete on it, top of the list first, one at a time.safe_delete (no sed/manual deletion of a DEAD candidate) — its reference guard is the backstop.Env: VTS_DCE_MAX_NODES (cascade node cap, default 120).
npx claudepluginhub jsungmin/vs-token-safer --plugin vs-token-saferProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.