Working Effectively with Legacy Code

Apply Michael Feathers's techniques for changing code that lacks tests — characterization tests, seams (object/link/preprocessor), dependency-breaking refactorings (Sprout Method, Extract Interface, Subclass and Override, Wrap Method, Break Out Method Object), effect sketches, and the Legacy Code Change Algorithm. Use when modifying inherited code without test coverage, when adding features to brittle code, when fixing bugs in code you don't yet understand, or when carving test points out of a tightly-coupled mess.

5 stars 2 forksSoftware Development Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add vnovakovits/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add vnovakovits/claude-skills --skill working-effectively-with-legacy-code
Manual install
git clone --depth 1 https://github.com/vnovakovits/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/engineering-practices/skills/working-effectively-with-legacy-code ~/.claude/skills/working-effectively-with-legacy-code

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Working Effectively with Legacy Code (Michael Feathers)

Apply this skill whenever you must change code that has no tests — which is most code in most codebases. The discipline solves the classic legacy-code dilemma: you need tests to change safely, but you need to change the code to make it testable. Feathers shows how to break that cycle.

## Core Philosophy

**Legacy code is simply code without tests.** Not "old code", not "ugly code", not "code I didn't write". If you cannot change it confidently because there's no safety net, it is legacy.

**The legacy-code dilemma.** To change code safely you need tests. To test code that wasn't designed for testing, you usually need to change it. The discipline is to make the smallest, safest changes to introduce test points, then refactor under the safety they provide.

**Conservative change.** When changing code you don't fully understand, prefer techniques that minimize risk per step — even if they are uglier than the "ideal" refactor. Get under test first; refactor toward beauty later.

**Characterize, don't specify.** When the existing behavior is undocumented, write tests that capture *what the code does* (right or wrong), not what it should do. Once captured, you can refactor with confidence and *then* change behavior deliberately.

---

## The Legacy Code Change Algorithm

Feathers's algorithm for any change to legacy code:
Read the full skill on GitHub

Details

Skill name
working-effectively-with-legacy-code
Path
plugins/engineering-practices/skills/working-effectively-with-legacy-code/SKILL.md
License
MIT
Repo updated
16 November 2026

FAQ

What does the Working Effectively with Legacy Code skill do?

Apply Michael Feathers's techniques for changing code that lacks tests — characterization tests, seams (object/link/preprocessor), dependency-breaking refactorings (Sprout Method, Extract Interface, Subclass and Override, Wrap Method, Break Out Method Object), effect sketches, and the Legacy Code Change Algorithm. Use when modifying inherited code without test coverage, when adding features to brittle code, when fixing bugs in code you don't yet understand, or when carving test points out of a tightly-coupled mess.

How do I install the Working Effectively with Legacy Code skill?

Claude Code plugin: /plugin marketplace add vnovakovits/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Working Effectively with Legacy Code popular?

It lives in vnovakovits/claude-skills, which has 5 GitHub stars and 2 forks.

Related skills

Accidental Cio

5

vnovakovits/claude-skills

Apply Scott Millett's "The Accidental CIO — A Lean and Agile Playbook for IT Leaders" (Wiley, 2024) when designing or reviewing how a technology organisation decides, funds, governs and delivers work. Covers the five components of an adaptive IT operating model (organised, work, govern, talent, lead) and its four themes (outcomes over output, intrinsic motivation, being not doing agile, manage flow not people); matching method and governance to context via Cynefin and Wardley evolution; governance as demand management + funding + measurement + decision rights, shifting from project funding to

Frontend & Design

Agent Retro

5

vnovakovits/claude-skills

Run a retrospective on a coding-agent session and improve the agent's environment, not the code. Combines Derby & Larsen's five-stage retrospective, Shigeo Shingo's poka-yoke (turn a mechanical mistake into a check that makes it impossible), and Matt Pocock's retro categories — navigation, automated checks, coding standards, steering files, tool economy, information access. Covers mining the session transcript for corrections, wrong turns and slow searches; deciding where each fix belongs (analyzer, hook, CI, reviewer standards, CLAUDE.md pointer, skill, doc or memory); the no-op test for stee

AI, LLMs & Agents

API Design

5

vnovakovits/claude-skills

Design APIs that are clear, evolvable, and idiomatic to their protocol — covering REST (Fielding, Richardson Maturity Model, Massé), GraphQL, gRPC/protobuf, versioning strategies, pagination, error responses (RFC 7807 Problem Details), idempotency, authentication, documentation (OpenAPI), and the pragmatic trade-offs between RESTful purity and developer ergonomics. Use when designing a new endpoint, choosing between REST/GraphQL/gRPC, defining versioning, structuring error responses, deciding pagination strategy, or evaluating an existing API's evolvability.

Software Development

Build Python Library

5

npow/claude-skills

Implements pip-installable Python libraries from scratch using src layout, pyproject.toml, and pytest. Use when the user asks to build, create, implement, or scaffold a Python library, package, pip package, middleware, SDK, or wrapper. Covers project scaffolding, proxy/wrapper patterns, provider-agnostic interfaces, async/sync support, and test infrastructure.

Software Development

Woocommerce

8

Freddy-CHEN-ux/00_claude_skills

WooCommerce API and WordPress integration patterns

Software Development

Canon Design Review

5

npow/claude-skills

Architecture-level design review evaluating 15 Tier 2 best practices drawn from DDD (Evans), POEAA (Fowler), Release It! (Nygard), DDIA (Kleppmann), Team Topologies (Skelton/Pais), How Buildings Learn (Brand), and Systemantics (Gall). Auto-invoke when a PR touches: - Service definitions, infrastructure code, API boundaries, or database schemas - Files matching **/architecture*, **/design*, **/api/*, **/schema*, **/migrations/* - Any directory named services/, infrastructure/, platform/, domain/, core/ Also invoke when the user says: - "design review", "architecture review", "review the design"

Software Development

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.