Point Claude at a legacy codebase and get an understanding of it, a plan you approve, modernized code and proof that behavior matches. Works with any language and any move: version upgrade, rewrite or rebuild. Start with /code-modernization:modernize.
What it does
Where Code Modernization runs and what it adds, from its documentation
modernize-assess inventories complexity, debt and security
modernize-map builds an interactive dependency and data-flow map
modernize-extract-rules writes business rules as Given/When/Then cards with file:line citations
modernize-uplift, transform and reimagine rebuild the code
modernize-verify re-runs tests and compares old and new outputs, giving PROVEN / PARTLY PROVEN / NOT PROVEN
modernize-harden scans the legacy system and prepares a reviewed patch
When to use it
Good fit
Moving to a newer version of the same stack (e.g. Java 8 to 17)
Rewriting a legacy module in a new technology with behavior proof
Understanding an unfamiliar legacy system before deciding
Not for
Rehost or Replace moves, which change no code (analysis only helps)
Running on a whole large estate at once; the README advises a pilot first
How to install Code Modernization
You need: Claude Code; An engineer who knows how the system is built and run for the first questions
Run Claude Code
Run /plugin install code-modernization@claude-plugins-official
Open a folder for the work and run /code-modernization:modernize
Or run /code-modernization:modernize-preflight --source
Follow the 'next step' line each command prints
Permissions and security
What it can access
Writes only to analysis// and modernized/ (build output where your build normally writes)
Does not edit legacy source
Links source via legacy/ without copying
Security notes from the maintainers
Source is checked for being untouched by file times
Security patch is for you to apply yourself
Review the source before granting an agent access to credentials or production systems. We document what the maintainers state; we do not audit code.
Limitations
Some steps start many agents, so real usage on large systems
Same command can give different counts on a second run
If the old system cannot run, best verdict is PARTLY PROVEN
How does Code Modernization prove the new code behaves like the old?
modernize-verify re-runs tests from clean, runs old and new on the same inputs with a script comparison, invents new inputs and uses canary checks. source
Where do I start with the code-modernization plugin?
Run /code-modernization:modernize; it asks what you want, writes INTENT.md and gives the first command. source
Does code-modernization edit my legacy source code?
No. It writes only to analysis// and modernized/. source
Which modernization types does code-modernization support?
Uplift (same tech, newer version), transform (new tech module by module) and reimagine (new architecture). source