Skip to main content
skill CX Codex

working-effectively-with-legacy-code — Claude Code skill

working-effectively-with-legacy-code — a skill for Claude Code and Codex that enforces Michael Feathers' legacy code techniques. Activates during risky refactoring, missing test coverage, and dependency breaking.

MIT 602 installs ★ 3,328 updated 2026-09-10

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ciembor/agent-rules-books --skill working-effectively-with-legacy-code -a claude-code
Open on GitHub

What working-effectively-with-legacy-code does

This skill guides the AI assistant through modifying hard-to-test code bases using Michael Feathers' engineering practices. It steers changes toward characterization tests, seam identification, and sprout or wrap techniques.

Prior to changing any code or structure, the assistant consults working-effectively-with-legacy-code.mini.md. The extended guide working-effectively-with-legacy-code.md serves as a fallback reference when compact rules do not resolve the design dilemma.

Execution requires no external runtime, network API keys, or specialized tool setup.

What it helps with

  • modify untested legacy routines without unexpected regressions
  • capture existing system behavior using characterization tests
  • break tight dependencies by introducing testable seams
  • add functionality using sprout method or wrap method patterns

Example prompts for the agent

  • Add input validation to this legacy controller using a sprout method
  • Write characterization tests around this service before touching its logic
  • Find an execution seam in this class to break the database dependency

How to install working-effectively-with-legacy-code

1Skills CLI (Vercel)

npx skills add ciembor/agent-rules-books --skill working-effectively-with-legacy-code -a claude-code

2Manually: put the files in place

~/.claude/skills/working-effectively-with-legacy-code/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/working-effectively-with-legacy-code/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about working-effectively-with-legacy-code

How to install working-effectively-with-legacy-code in Claude Code?

Run npx skills add ciembor/agent-rules-books --skill working-effectively-with-legacy-code -a claude-code. The rule definition is placed at ~/.claude/skills/working-effectively-with-legacy-code/SKILL.md.

What does working-effectively-with-legacy-code do?

It instructs coding agents to follow legacy-code patterns from Michael Feathers, focusing on risk reduction, test seams, and safe modifications.

What reference files does this skill require?

The workflow reads working-effectively-with-legacy-code.mini.md for standard decisions and references working-effectively-with-legacy-code.md when deeper legacy-code tradeoffs emerge.

Source text

SKILL.md · MIT
---
name: working-effectively-with-legacy-code
description: Apply Michael Feathers-inspired legacy-code rules when changing hard-to-test code safely with characterization tests, seams, sprout methods, or wrap methods.
license: MIT
---

# 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.

© ciembor · MIT · ciembor/agent-rules-books

Similar skills

All skills for Code review and refactoring →

From the same set14

The whole set →
a-philosophy-of-software-design The a-philosophy-of-software-design Claude Code skill applies software design principles to complexity, module boundaries, APIs, and abstractions. It activates during design reviews or refactoring of shallow interfaces. CX Codex +1 643installs code-complete The code-complete Claude Code skill applies software construction rules to routines, classes, control flow, defensive code, and tests. It activates for implementation and design tasks. CX Codex +1 611installs release-it The release-it Claude Code skill applies production reliability rules to failure handling, timeouts and retries. It activates on tasks involving integration failures, deployment or operational readiness. CX Codex +1 607installs the-pragmatic-programmer the-pragmatic-programmer — a skill for Claude Code and Codex applying Hunt and Thomas-inspired engineering guidelines. Triggers during architecture decisions, automation work, and code refactoring. CX Codex +1 603installs refactoring-guru refactoring-guru — a skill for Claude Code helps diagnose code smells and choose focused refactoring techniques. The agent applies its rules to code changes while preserving behavior. CX Codex +1 598installs designing-data-intensive-applications designing-data-intensive-applications — a skill for Claude Code that applies Martin Kleppmann-inspired data-system rules when designing scalable architectures. CX Codex +1 598installs domain-driven-design-distilled domain-driven-design-distilled — a skill for Claude Code that integrates lightweight Domain-Driven Design (DDD) rules into the development workflow. It assists in modeling domains and contexts without excess ceremony. CX Codex +1 593installs domain-driven-design The domain-driven-design Claude Code skill applies DDD rules to domain modeling. It activates for complex domains, bounded contexts, ubiquitous language, and aggregate design. CX Codex +1 589installs

Project sponsors

Companies that keep this analytics open