claude

working-effectively-with-legacy-code

16 legacy code skills from Working Effectively with Legacy Code by Michael C. Feathers — the Legacy Code Change Algorithm, seam type selection, characterization test writing, dependency-breaking techniques, monster method decomposition, big class extraction, and more

42 on GitHubby BookForgev1.0.0CC-BY-SA-4.0updated 6 months agosoftware-engineering
/

Plugin working-effectively-with-legacy-code from marketplace bookforge-skills in bookforge-ai/bookforge-skills. Commands read from the repo's manifest — 1 month ago.

This plugin runs code on your machine — its hooks fire automatically on events like tool use. The exact commands are listed below; read them before installing.

What it installs

Skills (16)

  • big-class-responsibility-extraction

    Identify and extract responsibilities from an oversized class using Feathers' 7 heuristics + feature sketches. Use whenever a developer faces 'this class is too big', 'god class', 'monster class', '500-line class', 'class with 50+ methods', 'class with too many responsibilities', 'SRP violation', 'h

  • change-effect-analysis

    Trace the blast radius of a legacy code change and produce a test placement plan with pinch points. Use whenever a developer needs to decide WHERE to write tests for a pending change — 'what should I test?', 'where to test?', 'how far do the effects propagate?', 'what else could this break?', 'how t

  • characterization-test-writing

    Write tests that pin down the actual current behavior of untested legacy code as a safety net for change. Use whenever a developer needs to create a regression safety net before modifying code — 'I don't know what tests to write', 'what should I test in legacy code', 'how do I write tests for code I

  • dependency-breaking-technique-executor

    Select and execute the right dependency-breaking technique from Michael Feathers' catalog of 24 named techniques (Part III of Working Effectively with Legacy Code) for a specific testability obstacle. Use when a class or method cannot be placed under test due to a hard-coded dependency, and you need

  • duplication-removal-via-extraction

    Remove duplicated code across methods and classes by extracting small shared utilities first and letting larger structure (superclass, Template Method) emerge. Use whenever a developer says 'I'm changing the same code in multiple places', 'I'm fixing the same bug in 3 files', 'copy-pasted code every

  • legacy-code-addition-techniques

    Add new functionality to untested legacy code using Sprout Method, Sprout Class, Wrap Method, or Wrap Class — whichever best fits the dependency profile. Use whenever a developer needs to add a feature, log statement, validation, or any new behavior to legacy code that they can't easily test — 'I ha

  • legacy-code-change-algorithm

    Guide safe modification of legacy code (untested production code) using Feathers' 5-step Legacy Code Change Algorithm. Use this skill whenever a developer needs to change code that lacks test coverage — adding a feature, fixing a bug, refactoring, or optimizing — and wants to avoid regressions. Acti

  • legacy-code-symptom-router

    Diagnose any legacy-code situation in plain language and route to the right technique. Use as the FIRST skill when a developer has a vague or specific complaint about a codebase — 'I have to change this but there are no tests', 'this method is huge', 'can't test this class', 'library is killing us',

  • library-seam-wrapper

    Isolate third-party library dependencies behind thin wrapper interfaces to break vendor lock-in and enable testing. Use whenever a developer has direct calls to library classes scattered through production code and can't test or swap the library — 'library is killing me', 'vendor lock-in', 'can't mo

  • monster-method-decomposition

    Decompose a very large method (100+ lines, deeply nested) safely using automated refactoring and Feathers' Bulleted/Snarled classification. Use whenever a developer faces 'a huge method', 'I have a 500-line function', 'deeply nested conditionals', 'monster method', 'god method', 'need to break up th

  • safe-legacy-editing-discipline

    Apply 4 editing disciplines when modifying legacy code: Hyperaware Editing, Single-Goal Editing, Preserve Signatures, Lean on the Compiler. Use whenever a developer is about to edit untested code, refactor without a safety net, or is caught in avoidance anti-patterns (Edit-and-Pray, Minimization Fre

  • scratch-refactoring-for-code-understanding

    Guide a developer through throwaway refactoring — restructure code freely without tests to understand it, then DISCARD. Use whenever a developer says 'I don't understand this code', 'this code is too complex to change safely', 'need to read legacy code', 'can't figure out what this does', 'overwhelm

  • seam-type-selector

    Select the right seam type (Preprocessor / Link / Object) for breaking a dependency in legacy code. Use whenever a developer needs to substitute behavior for testing without editing in place, is choosing between dependency-injection strategies in an existing codebase, or asks 'how do I intercept thi

  • tdd-and-programming-by-difference

    Add features to tested code using TDD or Programming by Difference. Use whenever a developer is adding a feature to a class that already has tests (or can be brought under test) — 'how do I add this feature', 'test-driven development for legacy', 'red green refactor', 'TDD cycle', 'add behavior with

  • test-harness-entry-diagnostics

    Diagnose exactly why a class or method cannot be placed under test and route to the right dependency-breaking technique. Use whenever a developer says 'I can't instantiate this class in tests', 'the test harness won't compile', 'this class has too many constructor dependencies', 'the constructor con

  • unit-test-quality-checker

    Evaluate a test suite against rigorous unit-test criteria, classify test types, and choose between fake and mock objects. Use whenever a developer asks 'are these unit tests?', 'why is my test suite slow', 'should I use mocks or fakes', 'fake vs mock', 'what's wrong with my tests', 'my tests hit the

Hooks (1)

  • SessionStart

    ${CLAUDE_PLUGIN_ROOT}/hooks/session-start

View source on GitHub

More from bookforge-ai/bookforge-skills

All 23 plugins →

16 skills for enterprise application architecture: pattern-family selectors, pattern implementers, and audit skills — extracted from Patterns of Enterprise Application Architecture by Martin Fowler.

16 skills · hooks

42

15 design pattern skills from Design Patterns: Elements of Reusable Object-Oriented Software

15 skills · hooks

42

14 agent skills for building secure and reliable systems — threat modeling, secure design, least-privilege access, blast radius containment, code review, deployment pipelines, incident response, and disaster recovery. From Building Secure and Reliable Systems by Adkins, Beyer, Blankinship, Lewandowski, Oprea, Stubblefield.

14 skills · hooks

42

14 skills for outbound prospecting, pipeline filling, and sales conversation opening, extracted from Fanatical Prospecting by Jeb Blount

14 skills · hooks

42

Similar plugins

Collection of example skills demonstrating various capabilities including skill creation, MCP building, visual design, algorithmic art, internal communications, web testing, artifact building, Slack GIFs, and theme styling

19 skills

anthropics/skills 193,780

Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification

1 command · 6 agents

anthropics/claude-code 155,476

storybook

claudecodex

Build, preview, and test UI components with Storybook.

7 skills

storybookjs/storybook 91,552

Agentic QE (external: maintained in proffesor-for-testing/agentic-qe, pinned to v3.15.17): a quality-engineering fleet with 11 QE agents, 9 skills, 9 commands, the agentic-qe MCP server pinned to the plugin version, and the aqe-mod guard that refuses destructive operations on AQE learning data

9 skills · 9 commands · 11 agents · 1 MCP server

ruvnet/ruflo 81,589

Automates browser interactions for web testing, form filling, screenshots, and data extraction

12 skills

vercel-labs/agent-browser 50,373

Maintain working-effectively-with-legacy-code?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex plugins23 plugins