Skip to content

Slash command

Dead code

Finds the exports, files and flags nothing uses any more, and separates the genuinely dead from the merely quiet.

About

Finds the exports, files and flags nothing uses any more, and separates the genuinely dead from the merely quiet.

Files in v1.0.0

  • replicamd.plugin.json2130 B
  • skills/deleting-safely.md2439 B

Contributes

{
  "commands": [
    {
      "id": "find",
      "title": "Find code nothing uses",
      "prompt": "Find code in this project that nothing references any more.\n\nWork from the real entry points first - the build manifest's bin/main/exports fields, the route files, the test setup - so you know what counts as reachable. Then look for:\n- exported symbols with no importer anywhere in the repo\n- whole modules imported by nothing\n- feature flags and env vars that are read but never set, or set but never read\n- dependencies in the manifest that no source file imports\n\nBefore you list anything, rule out the ways something can be used without a static import: dynamic `import()` and `require()` with a computed path, string references in config, framework conventions that load by filename, re-exports through a barrel, anything referenced only from a template, and public API surface that exists for consumers outside this repo. Say which of these you checked.\n\nGive me two lists: **safe to delete** with the evidence for each, and **looks unused but I could not prove it**, with the reason. Do not delete anything yet."
    },
    {
      "id": "remove",
      "title": "Delete one dead thing properly",
      "prompt": "Delete the symbol or file I name, and everything that existed only to serve it: its tests, its barrel re-export, its types, its config entries, and any dependency that nothing else imports afterwards.\n\nThen run the typecheck and the test suite and show me the result. If either fails, stop and show me the failure rather than chasing it - a deletion that needs follow-up edits in unrelated files usually means the thing was not dead."
    }
  ],
  "skills": [
    "skills/deleting-safely.md"
  ]
}

Versions

  • v1.0.07/26/2026 · 2 files

Install

Install in ReplicaMD

Nothing happened? ReplicaMD may not be installed yet - or open it first, then Settings → Plugins and install by id.

Plugin id:

dead-code

Bundle endpoint:

https://replicamd.nl/api/registry/plugins/dead-code/download
Author
Ardjun Debi - Tewarie @ardjun
Latest
v1.0.0
License
MIT
Installs
0
maintenancecleanupquality