
Description
Working with Legacy Code is an agent skill for changing and testing code that has no tests, based on Michael C. Feathers' book Working Effectively with Legacy Code. The skill defines legacy code as code without tests, not old or ugly code. Without tests, a change cannot be shown to preserve behavior, so every edit is a gamble. The skill helps get untestable classes into a test harness, pin down current behavior with characterization tests, and then make changes one safe, verifiable step at a time, without a rewrite. Its rule is to cover and modify rather than edit and pray. It breaks dependencies only as much as needed to add tests before a change. It scores changes to untested code from 0 to 10 against its principles. A score of 9 or 10 means characterization tests cover the change points before any edit, behavior changes and refactoring ship as separate verified steps, and dependencies are broken with the least invasive technique. Lower scores describe edits made on faith, tests written after the change, and refactoring mixed with behavior changes in one commit. The skill reports the current score and the steps needed to reach 10. It is part of the wondelai/skills repository and is listed on skills.sh as free. Its security audits are all Pass.…
Highlights
- Adds tests to untestable code before changing it
- Characterization tests pin down current behavior
- Changes made in small, verified steps
- Scores changes against a 0 to 10 scale
Ratings & Reviews
No ratings yet
Be the first to rate working-with-legacy-code.
People also visit
working-with-legacy-code FAQ
What does it help with?
Changing code that has no tests safely, by adding characterization tests and breaking dependencies only as far as needed, then making each change in a verified step.
Does it rewrite the code?
No. The skill states that the approach is to cover and modify without resorting to a rewrite.
How do I install it?
Run npx skills add https://github.com/wondelai/skills --skill working-with-legacy-code in your project.
Is it free?
Yes. The skill page lists its pricing as Free.
What do the security audits say?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best working-with-legacy-code alternatives?
Popular alternatives to working-with-legacy-code include improve-codebase-architecture, speckit-baseline and improve. See all working-with-legacy-code alternatives


















