/vs-token-safer:vs-dcefrom vs-token-safer
Preview-only dead-code analysis using official language server call graphs (clangd, Roslyn, tsserver, pyright) to find provably dead code. Supports C/C++, C#/.NET, JS/TS, Python. Use for unused function detection, transitive cascade, and safe deletion ordering.
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.
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).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
C++, C#, TypeScript, JavaScript, Python
3 skills in this plugin
/vs-searchvs-token-safer search routingRouting rules for code search in C/C++, C#/.NET, JS/TS, and Python projects via vs-token-safer — use the vs-search MCP tools (clangd/Roslyn/tsserver/pyright language-server index) or the `vts` CLI instead of Bash grep. Use whenever searching for a symbol, definition, function, variable, type, or finding references/usages in a C/C++, C#/.NET (incl. Unreal, Visual Studio), JavaScript/TypeScript, or Python codebase./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.npx claudepluginhub jsungmin/vs-token-safer --plugin vs-token-saferOther plugins' skills for the same job