devpilot-dead-code-cleanuplisted
Install: claude install-skill SiyuQian/devpilot
# Dead Code Cleanup (Go & TypeScript)
## Overview
A detector's report is a **candidate list, not a hit list**. Every finding must be cross-checked against the language's escape hatches (reflection, dynamic dispatch, public API, generated code, build tags) before deletion. Remove in leaves-first order, with build + test between clusters, one cluster per commit.
## When to Use
- "Clean up dead code in this repo"
- "Find unused functions / exports / types"
- "What can I delete safely?"
- Pre-release cleanup or post-feature-removal sweep
**Don't use for:** dependency-only cleanup (run `go mod tidy` / `knip --dependencies`), refactoring live code, or eyeball deletions without a detector.
## Workflow
```dot
digraph dead_code {
"Run detector" [shape=box];
"Filter false positives" [shape=box];
"Remove one cluster (leaves first)" [shape=box];
"Build + test passes?" [shape=diamond];
"Commit cluster" [shape=box];
"Revert + recheck" [shape=box];
"More candidates?" [shape=diamond];
"Done" [shape=doublecircle];
"Run detector" -> "Filter false positives" -> "Remove one cluster (leaves first)" -> "Build + test passes?";
"Build + test passes?" -> "Commit cluster" [label="yes"];
"Build + test passes?" -> "Revert + recheck" [label="no"];
"Revert + recheck" -> "Filter false positives";
"Commit cluster" -> "More candidates?";
"More candidates?" -> "Remove one cluster (leaves first)" [label="yes"];
"More candidates?" -> "Done" [la