# Working Effectively With Legacy Code

Apply Michael Feathers-inspired legacy-code rules when changing hard-to-test code...

- Repository: https://github.com/ciembor/agent-rules-books (3164 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-09-10
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ciembor/agent-rules-books --skill working-effectively-with-legacy-code -g -a claude-code -y`
Codex: `npx skills add ciembor/agent-rules-books --skill working-effectively-with-legacy-code -g -a codex -y`
Cursor: `npx skills add ciembor/agent-rules-books --skill working-effectively-with-legacy-code -g -a cursor -y`
Gemini CLI: `npx skills add ciembor/agent-rules-books --skill working-effectively-with-legacy-code -g -a gemini-cli -y`

## Description

Apply Michael Feathers-inspired legacy-code rules when changing hard-to-test code safely with characterization tests, seams, sprout methods, or wrap methods.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Working Effectively with Legacy Code Skill

Use this skill when a task involves risky legacy changes, missing tests, characterization tests, seams, dependency breaking, sprout method, wrap method, or incremental risk reduction.

Before making design or code decisions, read and apply [working-effectively-with-legacy-code.mini.md](working-effectively-with-legacy-code.mini.md). Use [working-effectively-with-legacy-code.md](working-effectively-with-legacy-code.md) only as a deeper reference when the mini rules are not enough for the current legacy-code tradeoff.

