unused-code-audit — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited unused-code-audit (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
把每个自动化结果都当作候选,而不是证明。只有在用法、入口、副作用和公共 API 风险都被排除后,才删除。
优先做小而有证据的删除。不要仅因为类型或导出名没有直接 import,就收缩公共 API;生成声明和推断出的消费者类型仍可能依赖它。
本技能回答“还有人在消费它吗?”。它不回答更广义的“它是否仍有必要?”。对于“被使用但不必要”的代码,切换到 necessary-code-audit。
不要在发现第一个未使用符号后停止。对于用户指定的目录或功能,必须审计作用域内所有文件、导出、本地 helper 和 re-export 路径后再报告完成。
不要把注释作为未使用代码删除或重写,除非相关代码被删除,或注释已经过期/误导。
本技能属于三个清理技能之一:
unused-code-audit 证明代码是否仍有消费者。necessary-code-audit。page-flow-cleanup-audit。本技能只回答“是否存在真实消费者,以及在零消费者时能否安全删除”。
适合本技能:
不适合本技能单独完成:
necessary-code-audit。necessary-code-audit 判断是否迁移调用方并收缩公共面。necessary-code-audit。page-flow-cleanup-audit。协作规则:
necessary-code-audit。git status --short --untracked-files=all。git diff --name-status -- <scope>、git diff --cached --name-status -- <scope>。rg --files <scope>。完成 unused-code audit 前必须:
不要要求用户再次提示,才在同一请求作用域内从一个候选继续到下一个候选。
删除前分类:
文件:模块、route、样式、setup、生成入口或副作用文件。运行时导出:函数、组件、hook、class、常量、store 或工厂。公共类型/API:导出的 interface/type/config,被声明文件或工厂返回类型使用。成员:属性、方法、action、enum member 或配置字段。本地 helper:单文件内非导出 helper。分类决定风险等级。公共 API、框架入口、副作用文件和持久化数据需要更强证据。
按以下顺序收集证据:
rg 搜索精确符号名、file stem、import path、别名和大小写变体。necessary-code-audit 推动复用,不能证明当前符号仍被消费。除非排除以下情况,否则保留代码:
全部满足才删除:
rg。git diff --check -- <scope>;如果有 staged 变更,也运行 git diff --cached --check -- <scope>。报告三类内容:
necessary-code-audit 判断必要性。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.