Agent Skills
› udecode/plate
› hard-cut
hard-cut
GitHub用于彻底删除功能及所有关联代码(调用方、测试、文档等),不进行弃用处理。适用于用户明确要求移除功能的场景,确保代码库干净无残留。
触发场景
用户要求完全移除功能
清理废弃代码或僵尸代码
安装
npx skills add udecode/plate --skill hard-cut -g -y
SKILL.md
Frontmatter
{
"name": "hard-cut",
"metadata": {
"skiller": {
"source": ".agents\/rules\/hard-cut.mdc"
}
},
"description": "Remove a feature completely with no backward compatibility. Use when the user says \"hard cut\", \"rip it out\", \"delete it\", \"unship\", \"kill this feature\", or wants dead code removed instead of deprecated. Delete the surface, callers, tests, docs, comments, fallbacks, and stubs."
}
Hard Cut
Use this when a feature should die, not linger.
Rules
- Delete the surface. Do not deprecate it.
- Do not leave
throw new Error("Not implemented"), placeholder notices, "feature removed" banners, or TODOs about bringing it back unless the user explicitly asks. - Do not keep compatibility aliases, deprecated shims, fallback parsing, migration bridges, or dead exports.
- Delete tests for deleted behavior. Keep tests only for the behavior that still exists.
- Delete comments that describe deleted code or mourn the old feature.
- If removal exposes adjacent dead code, keep cutting until the graph is clean.
Sweep
- Find the real surface area:
- exports
- commands and flags
- routes
- UI entrypoints
- feature flags
- docs and examples
- Trace references with
rg. - Delete the implementation and the glue:
- call sites
- types
- state
- tests
- docs
- comments
- Grep again for the removed name and obvious aliases.
- Run the narrowest honest verification for the surviving product.
Smells
- deprecated notices
- not-implemented throws
- stub handlers
- dead enum or union members
- permanently-false feature-flag branches
- unused env vars and config
- tests that only prove the deleted feature used to exist
Bias
If the choice is between deleting more code and leaving a zombie seam, delete more code.
版本历史
- af5e430 当前 2026-08-20 19:26


