Skip to main content

legacy-code-safety

Applies Michael Feathers' Working Effectively with Legacy Code discipline when changing code that lacks trustworthy tests or has unclear, hard-to-observe behavior: characterize current behavior before redesigning it, find or create a seam, break the one dependency actually blocking a test, make the change, then leave the area more testable than found. Use whenever the user modifies code with weak or missing test coverage, works in an unfamiliar or "legacy" codebase, needs to test code that resists testing (hard-to-construct objects, hidden statics, framework entanglement), or is tempted to rewrite something risky instead of changing it safely. Trigger on phrases like "this code has no tests", "I need to change this safely", "how do I test this", or "this is legacy code". Distilled from Feathers' book via the agent-rules-books project (MIT licensed); references/full-reference.md carries the complete seam catalog and dependency-breaking technique index for deeper sessions.

跳到安装

来源信息

仓库
infinyte/custom_claude_skills
最近来源活动
2026年7月24日 06:32
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

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

检查来源文件

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