dce

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

A preview tool that follows how a named piece of code is called and lists code that can be shown to be unused. It also shows code that would become unused if the starting piece were removed.

In plain words
What is it for?
Use it to check whether a function or symbol is used, identify unused code connected to it, and understand removal cascades before editing the project.
Why use it?
It helps estimate safe code removal without deleting anything. For C or C++ projects, it requires a ready language-server index because an incomplete index can miss callers.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

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/dce
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 dce

README.md
[![agentmods](https://agentmods.dev/badge/commands/jsungmin/vs-token-safer/dce.svg)](https://agentmods.dev/commands/jsungmin/vs-token-safer/dce)
Your own site
<a href="https://agentmods.dev/commands/jsungmin/vs-token-safer/dce"><img src="https://agentmods.dev/badge/commands/jsungmin/vs-token-safer/dce.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 997 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.00036 $0.00997
Opus 5 $0.00018 $0.00498
Sonnet 5 $0.00007 $0.00199
Haiku 4.5 $0.00004 $0.00100

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

Security

Grade A, and why

dce 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/dce.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

vs-token-safer — dead-code elimination (preview only)

Use this when the user wants to know what code can be safely removed starting from one or more symbols ("is Foo used anywhere?", "what becomes dead if I delete Foo?", "find unused code reachable from here").

Run it with the seed symbol(s). Prefer the vts_admin MCP tool (server vs-search):

vts_admin { "op": "dce", "params": { "seed": "Foo", "projectPath": "<the project root>" } }

For several seeds use "seeds": "Foo,Bar,Baz". Prefer the MCP tool — it runs in the warm server process, and vts is often not on PATH in Bash. If the vs-search server is unavailable, run the bundled CLI:

node "$CLAUDE_PLUGIN_ROOT/server/cli.js" dce --seed Foo --projectPath <root>
# (if vts is on PATH:  vts dce --seeds Foo,Bar,Baz --projectPath <root> [--entry main,registerPlugin --maxNodes 120])

Warm-index requirement (C++/clangd)

For a clangd (C/C++) project the call graph must be warm — a cold or large 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 and tells you to build one. Indexing the whole tree is heavy, so scope it first:

vts setup --scope Source --projectPath <root>   # narrow to the module subtree, not the whole monorepo
vts preindex --projectPath <root>               # build the scoped index (or keep the MCP server warm)

Then re-run dce. To inspect the structure on a cold index anyway, pass allowCold=true — every verdict is then forced to INCONCLUSIVE (nothing is ever marked DEAD). TypeScript/Python/C# index on open and are not gated.

Then show the output verbatim. It classifies every symbol reachable from the seeds as:

  • DEAD — no live caller remains; listed in a safe deletion order (top is removable first).
  • HELD — still referenced; not dead (shows who calls it).
  • ENTRY — a root kept on purpose (main / public API / a name you passed via --entry).
  • INCONCLUSIVE — could not be resolved, or its caller set could not be proven complete.

Read the full file on GitHub · 68 lines

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 · 68 lines · 36 tokens per session scan A e851c79d398a

Subscribe to this mod's changes

dce is a command published in the GitHub repository JSungMin/vs-token-safer (11 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 997 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.