/codebase:dead-code [<path>]from codebase
Find code nothing uses, with each candidate verified. [<path>]
Ships in codebase. 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.
Read when SKILL.md points to them.
Find symbols nothing in the codebase uses, and verify each candidate before reporting it. Derived from the current code on every run; nothing is saved and nothing is deleted.
| Argument | Type | Default | Description |
|---|---|---|---|
<path> | string | whole repo | Restrict to symbols defined under this path. |
Examples:
/codebase:dead-code
/codebase:dead-code scripts/lib
Prefer MCP first. If its tools are absent or the server is unreachable, automatically try the CLI without asking:
command -v codebase-memory-mcp
codebase-memory-mcp cli --json list_projects
Set codebase_transport to mcp or cli. All tool calls below use that transport. For CLI calls, pipe the same JSON arguments to codebase-memory-mcp cli --json <tool> via stdin; inspect isError and read the result from content[] text. Use each tool's --help for supported flags and output formats. Query and indexing errors are not transport failures: report them accurately, not as missing MCP. On a later MCP connection failure, retry through CLI. Preserve project selection, index settings, and consent rules; do not install anything automatically.
Resolve the transport above. If neither MCP nor CLI works, continue with source inspection only and label the whole answer as such.
Read references/freshness.md and follow it.
Call list_projects and match the project whose root_path equals git rev-parse --show-toplevel (or whose name equals that path with the leading / stripped and / replaced by -). Never match by directory basename. Strip or reject ', ", \\, and control characters from any argument before putting it in a Cypher string.
Read references/candidates.md and follow it.
Two lists: likely dead (symbol, file:line, kind, why it looks unused) and unsure: <reason> (with where the string reference was found). Then a one-line total and the offer from the reference. Give file:line for every symbol or file named. Label any part that came from source inspection. Do not dump raw MCP JSON.
Read references/share.md and follow it.
What SKILL.md sets; muted values are Claude Code's defaults
Use when the user wants unused code found: 'find dead code', 'what can I delete', 'unused functions or exports', 'is X still used anywhere'. Not for what a diff affects (use codebase:impact) or risky frequently changed code (use codebase:hotspots).
Other plugins' skills for the same job
npx claudepluginhub jskswamy/skills --plugin codebase12 skills in this plugin
/architectureRecover the architecture and check it against your rules. [--check] [--project <name>...]/askAsk a question about the codebase. <question>/capabilitiesMap functional capabilities and execution corridors. [<capability>] [--project <name>...] [--depth 1-5]/domainMap the main domain entities and who owns them. [<concept>]/exploreUse when gathering background codebase context as part of a larger workflow, such as the brainstorming or planning explore step, or before modifying unfamiliar code to understand architecture and structure. Not for a direct one-off question (use codebase:ask), a named symbol's callers/callees (use codebase:graph), the effect of a diff (use codebase:impact), capability mapping (use codebase:capabilities), boundary/seam inspection (use codebase:seams), the architecture map or rules (use codebase:architecture), or a guided reading order (use codebase:tour)./graphShow a symbol's callers and callees. <symbol> [--depth 1-5] [--direction inbound|outbound|both]