skills/ghostbuster/SKILL.md
Dead-code forensics and spec cross-reference. Finds unreachable, orphaned, missing, or dormant code and classifies it DEAD, ZOMBIE, GHOST, or DORMANT. Use when the user says "find dead code", "what's unused", "what can I delete", "stale specs", "spec drift", "orphaned implementations", "find zombie code", or asks what's wired up vs sitting unused. Do NOT use for code-quality review (/age) or NIH/reinvented-wheel detection (/nih-audit).
npx skillsauth add paulnsorensen/dotfiles ghostbusterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find what's expired. Cross-reference against specs. Triage the remains.
Scope: $ARGUMENTS (or repo root if blank)
Detect languages from file extensions in scope. Build a file inventory:
Glob: {scope}/**/*.{ts,tsx,js,jsx,py,rs,go,sh,bash}
Filter out test files, node_modules/, vendor/, target/, dist/, build/.
Search broadly — specs and documentation both reference code symbols:
Glob: **/specs/**/*.md
Glob: **/.claude/specs/*.md
Glob: **/SPEC.md
Glob: **/spec.md
Glob: **/CLAUDE.md
Glob: **/README.md
Glob: **/CONTRIBUTING.md
Glob: **/docs/**/*.md
Read each file and extract symbol references (backtick-wrapped identifiers,
code blocks, prose references to functions/types/endpoints). Build a lookup
of {symbol → [file:line]}.
Spawn the ghostbuster agent:
Agent(
subagent_type="ghostbuster",
model="sonnet",
prompt="Run dead code forensics.
Scope: <$ARGUMENTS or repo root>
Languages: <detected languages>
Slug: <slug>",
run_in_background=false
)
The agent writes the full JSON report to $TMPDIR/ghostbuster-{slug}.json and returns
a structured summary (max 2000 chars). Read the full report for detailed findings.
Parse the agent's findings. Present the full report to the user:
For each category found, give one concrete example from the findings:
DEAD — Code with zero callers and no spec mention.
Example:
src/utils/legacy-parser.ts:parseLegacyFormat— 0 references, untouched since August. Safe to delete.
ZOMBIE — Spec says it should exist, but nothing calls it at runtime.
Example:
src/domains/billing/invoice-export.ts:exportToQuickbooks— mentioned in billing-integrations.md but has 0 callers. Incomplete implementation or abandoned?
GHOST — Spec references a symbol that doesn't exist in the codebase.
Example:
.claude/specs/billing-integrations.md:67referencesvalidateTaxRules— deleted 6 months ago. Stale spec.
DORMANT — Code has callers, but the root of the call chain is dead.
Example:
src/utils/tax-formatter.ts:formatTaxLine— only caller isvalidateTaxRuleswhich is itself dead. Entire chain can go.
Group findings by recommended action:
/xray on ZOMBIE modules to understand what's missing?". script.sh won't appear in Serena — Grep-only for shelltools
Reconstruct what a past coding-agent session was doing so you can resume it — goal, files touched, last verified state, and the next step — by querying the session logs. Use when the user says "what was I working on", "recover that session", "reconstruct where I left off", "resume my last session", "what did that session change", "rebuild context from logs", or invokes /work-recovery. Report-only — it never scores or judges. Do NOT use for usage scoring (that is /skill-improver, /tool-efficiency, /prompt-analytics) or one-off interactive log queries (that is /session-analytics).
development
Curate this repo's hallouminate wiki (.hallouminate/wiki/, the repo:dotfiles:wiki corpus) — add or update architecture pages, per-harness docs, and gotchas. Use when the user says "update the wiki", "document this in the wiki", "refresh the harness docs", "add a wiki page", "curate the wiki", "the wiki is stale", or invokes /wiki-curator. Also use at session end to write back a non-obvious decision or gotcha worth preserving. Grounds the existing wiki first, follows one-topic-per-file conventions, verifies every external doc URL before writing, and reindexes. Do NOT use for general code search (that is cheez-search) or for editing AGENTS.md command reference.
tools
Audit how a tool, command, or MCP server is actually used across coding-agent sessions and produce calibrated recommendations — tool-vs-task fit, error forensics, fix recommendations, permission friction, MCP health, and token economics. Use when the user says "tool efficiency", "am I using X efficiently", "audit tool usage", "why does X keep failing", "how do I fix this error", "what should I change", "permission friction", "is this MCP worth it", "tool error rate", "fix recommendations", or invokes /tool-efficiency. Do NOT use for auditing a skill or agent definition (that is /skill-improver) or for one-off interactive log queries (that is /session-analytics).
tools
Analyze how prompts and skill routing behave across coding-agent sessions and produce calibrated recommendations — prompt-pattern analysis, routing accuracy, and knowledge gaps. Use when the user says "analyze my prompts", "prompt patterns", "is routing working", "which skill should have fired", "knowledge gaps", "what do I keep asking", or invokes /prompt-analytics. Do NOT use for auditing a single skill/agent definition (that is /skill-improver), tool/MCP efficiency (that is /tool-efficiency), or one-off interactive log queries (that is /session-analytics).