Legacy Code
Safely change untested code: seams and characterization tests
Safely change untested codebases using Michael C. Feathers' Working Effectively with Legacy Code. This skill equips your AI agent with the legacy code change algorithm — finding seams, breaking dependencies, pinning behavior with characterization tests, and making changes one safe, verifiable step at a time.
Working Effectively with Legacy Code
npx skills add wondelai/skills/working-with-legacy-code What your agent learns
The Change Algorithm
Identify change points, find test points, break dependencies, write tests, then change — cover and modify, never edit and pray.
Seams
Places where you can alter behavior without editing the code — object seams, link seams, and their enabling points are how tests take control.
Characterization Tests
Document what the code actually does: assert something absurd, read the failure, pin the observed behavior in place.
Sprout & Wrap
When you can't test the host today, write new logic as fresh, tested code called from a single line — or wrap the old method decorator-style.
Dependency Breaking
A catalog of mechanical moves — Parameterize Constructor, Extract Interface, Subclass and Override — that unblock testing with minimal risk.
Try these with the skill installed
Get this class with a hard-wired database connection under test using working-with-legacy-code skill
Dependency breakingWrite characterization tests for this function before I refactor it using working-with-legacy-code skill
Safety netAdd this feature to an untested module using sprout method using working-with-legacy-code skill
Safe changePlan incremental test coverage for our legacy codebase using working-with-legacy-code skill
Test strategyInstall Legacy Code
Free, open-source, and ready in 30 seconds.
npx skills add wondelai/skills/working-with-legacy-code MIT Licensed · Works with Claude Code, Cursor, Claude Cowork & OpenClaw · No account needed
Don’t guess your AI engineering level.
Measure it.
AI Developer Scorecard
How production-grade is your AI engineering?
Twenty-five questions across the practices that separate vibe-coding from production-grade engineering. Instant score, per-section breakdown, and a 30/60/90-day playbook.
Score 0–75 · 30/60/90-day playbook Score yourself For CTOs & foundersCTO Scorecard
Is your engineering team ready for AI at scale?
Twenty-five questions on how your org adopts AI — adoption, governance, automation, and ROI. See where you sit on the path from Reactive to Strategic Leader.
Score 0–75 · Reactive → Strategic Leader Score your org