Skip to main content

kill-dead-code

Find and remove unreachable/unused code safely. Use during cleanup or before a refactor.

来源信息

仓库
Archive228/loopkit
最近来源活动
2026年6月29日 21:52
检测到的 SKILL.md 语言
英语
星标
757
Forks
124

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
kill-dead-code
description
Find and remove unreachable/unused code safely. Use during cleanup or before a refactor.
when_to_use
cleanup, "remove unused", before refactoring, dead branches
# Kill Dead Code 1. **Prove it's dead** — no references (grep the symbol across the repo, including dynamic/string usage and tests). Unused export ≠ dead if it's a public API. 2. Check it's not feature-flagged off (dead today, alive when the flag flips). 3. Delete it AND its now-orphaned tests, imports, and config. 4. Run the full suite + a build. Dead code removal should change behavior in exactly zero ways. Bias to delete: every line someone has to read is a cost. But never delete what you can't prove is unreachable — say "I think X is unused, confirm?" instead of guessing.
在 GitHub 查看