From auto-mobile
Detects and removes dead code in the repo using TypeScript scripts, reviews candidates in context, cleans in small batches, and validates with lint/build/test to prevent regressions.
How this command is triggered — by the user, by Claude, or both
Slash command
/auto-mobile:SKILLdead-code/The summary Claude sees in its command listing — used to decide when to auto-load this command
# Dead Code Use this when the user wants dead-code analysis or cleanup. ## Workflow 1. Start with detection, not deletion. 2. For TypeScript, run `bash scripts/detect-dead-code-ts.sh`, optionally writing reports to `scratch/dead-code/`. 3. Review each candidate in full context before removing it. Unused exports in tooling output are often false positives. 4. Check callers, tests, generated code, and dynamic entry points before deleting anything. 5. Remove dead code in small batches so regressions are easy to isolate. 6. Re-run the detector and the relevant validation after each batch. #...
Use this when the user wants dead-code analysis or cleanup.
bash scripts/detect-dead-code-ts.sh, optionally writing reports to scratch/dead-code/.bun tasks over ad hoc dead-code tools.package.json dependency findings as suggestions until confirmed.bun run lintbun run buildbun testbash scripts/validate-bun-test-timings.sh when test changes may affect the 100ms expectationnpx claudepluginhub kaeawc/auto-mobile --plugin auto-mobile/refactor-cleanSafely identifies and removes dead code with test verification after each deletion. Runs language-specific analysis tools, categorizes findings by risk, and atomically deletes with rollback on test failure.
/refactor-cleanSafely detects and removes dead code using tools like knip, ts-prune, vulture; verifies each deletion with full test suite; categorizes by risk and reports summary.
/dead-codeFinds and removes dead code: unused imports/exports, unreachable code, dead feature flags. Uses TypeScript/ESLint/Python(Ruff)/Go linters; verifies with tests/build.
/refactor-cleanIdentifies and removes dead code using knip, depcheck, and ts-prune, with test verification before each deletion. Categorizes findings by severity and generates a report.
/find-dead-codeScans codebase for dead code like unused exports, files, variables, unreachable code, and long comments. Builds dependency graph from entry points and generates sorted report with confidence levels and totals.
/dead-codeReports unreachable files, unused exports, and zombie packages tiered by confidence using Repowise's graph-reachability analysis. Supports filtering by path, confidence level, and kind.