Plugin Official

Code Modernization

Guided modernization of legacy codebases: assess, map, extract rules, plan, rebuild, and prove the new code matches the old.

Author
Anthropic
Works with
Claude Code
License
Apache-2.0
Documented
Oct 2, 2026

What Code Modernization is

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

How Code Modernization plugs in: which agents run it and what it addsRUNS INYour agentClaude Codeone host documentedPLUGIN · OFFICIALCode ModernizationBundles of skills, commands, hook…5 install steps3 permission noteslicense: Apache-2.0WHAT IT ADDSWhat it doesmodernize-assess inventories comp…modernize-map builds an interacti…modernize-extract-rules writes bu…modernize-uplift, transform and r…agent → extension → new capability · from the official repository or docs
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

  1. Run Claude Code
  2. Run /plugin install code-modernization@claude-plugins-official
  3. Open a folder for the work and run /code-modernization:modernize
  4. Or run /code-modernization:modernize-preflight --source
  5. 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

Tools it extends

Frequently asked questions

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

Related guides

Sources and gaps

Not stated by the maintainers: Release date and version history are not shown in the plugin README; README tail (results section) not fully read.

More extensions to look at