PluginInstalls cleanly
Upgrade old code with proof it works
Code Modernization
Anthropic's plugin assesses old code, maps it, mines its rules, plans an upgrade or rewrite you approve, then checks the new code acts like the old.
- Works with
- Claude Code
- Good for
- Build an app
What it does
Point Claude at an old codebase and this plugin walks you through modernising it in steps you can stop after:
modernize: asks what you want and writes it down once.modernize-preflight: five questions only a person can answer, plus a check that the code builds.modernize-assessandmodernize-map: what the code is, how complex it is, and an interactive map.modernize-extract-rulesandmodernize-review: the business rules as testable cards, which a person confirms.modernize-brief: a phased plan. Nothing is built until you approve it.modernize-uplift,modernize-transformormodernize-reimagine: a newer version of the same tech, a rewrite, or a rebuild.modernize-verify: re-runs the tests, runs old and new on the same inputs, tries new inputs, and gives each module PROVEN, PARTLY PROVEN or NOT PROVEN.modernize-harden: a security scan with a patch you apply yourself.
Each step updates one offline report page, analysis/<name>/REPORT.html. All 13 commands start with /code-modernization:. Eight helper agents do the reading, rule checks, tests and security work for the commands.
On Claude Code 2.1.287 or later a live progress pane also opens beside the chat once your folder has an analysis/ folder: a map of your code, the steps done, each module's verdict and the next command. It adds three short commands of its own: /modernize-panel, /modernize-review-pane and /modernize-sign.
Example prompts
- "/code-modernization:modernize" (then choose Understand it first)
- "/code-modernization:modernize-preflight shop --source ../old-shop"
- "/code-modernization:modernize-status shop"
- "Explain the PARTLY PROVEN verdict in my report in plain words."
How to install
/plugin install code-modernization@claude-plugins-officialHow to use it
Open a folder for the work and type /code-modernization:modernize. Choose Understand it first to get the assessment, map, rules and plan without rebuilding any code.
Check it works
Type /code-modernization: and the 13 modernize commands should appear. Run /code-modernization:modernize-status <name> at any time to see where you are and the next command. To see what usage counts would be sent, run python3 scripts/telemetry.py show /path/to/workspace from the plugin's folder (README).
Common problems
- A headless run (
claude -p) stops long steps after 10 minutes — setCLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS=0and answer approval gates with--resume— https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-modernization - The progress pane never appears — update Claude Code to 2.1.287 or later (mods are on by default there and the old
CLAUDE_CODE_ENABLE_FUNCTION_HOOKSflag is ignored), check that Progress pane is not off in/config, then type/modernize-panel— https://code.claude.com/docs/en/plugins/mods/overview - You want no usage counts sent — set Usage counts to off in
/config, or start withCODE_MODERNIZATION_TELEMETRY=0 claude;python3 scripts/telemetry.py showshows what would be sent — https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-modernization - Two runs found different rules — rule extraction is done by a model, so treat BUSINESS_RULES.md as reviewed output — https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-modernization
- The best verdict is PARTLY PROVEN — the old system cannot run where you work, so it can only be checked against recorded outputs — https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-modernization
Other assistants
- Codex and Gemini CLI: the README covers only Claude Code.
- Anthropic's separate code-migration-kit-with-claude-code repo has prompts, templates and scripts for large language migrations that you can adapt (README "Related").
What to watch out for
- Usage counts are on by default. The plugin hands whole numbers (which command ran, how many rules it found, your operating system and Python version, which kind of error happened) to Claude Code, which sends them to Anthropic with its own usage metrics; never code, names, paths, prompts or error text. Once per plugin version on each machine it also sends what it runs on when a session starts, even if you never use it. To turn it off, set Usage counts to off in /config, or start Claude Code with CODE_MODERNIZATION_TELEMETRY=0 claude (plugin.json, scripts/telemetry.sh, README Telemetry, Claude Code data-usage docs)
- Its settings hooks run scripts/telemetry.sh on every prompt, turn end, session start and failure; the script stops at once unless you typed a plugin command, the folder holds the plugin's analysis/ files, the failure names the plugin, or it is the once-per-version start-up count. The plugin itself makes no network call (hooks/hooks.json, scripts/telemetry.sh)
- The live progress pane is a mod. The plugin's README still says it needs CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1, but Claude Code 2.1.287 and later turns mods on by default and ignores that flag, so the pane opens by itself in any folder that has analysis/; set Progress pane to off in /config if you do not want it. On older Claude Code you see no pane and the commands work the same (README, Claude Code mods overview docs)
- X-ray reads are on by default: when Claude reads a file under legacy/, the pane adds what your own analysis/ files say about it (callers, data, rules) to what Claude sees. Turn off X-ray reads in /config if you want plain reads (hooks/README.md)
- Some steps start many agents at once (extract-rules started 50 to 200 in the README's test runs), so expect heavy plan usage on a large system; the README says to start with one module or one unit as a pilot, not the whole estate
- The commands never edit your legacy code or commit, but only by convention: the README asks you to add a deny rule Edit(/legacy/**) in .claude/settings.json, and preflight checks for it (README)
- The shell hooks need sh, so on Windows without Git Bash they do not start; the map, proof and report scripts need Python 3.8 or newer (README)
Licence and author
- Licence
- Apache-2.0
- Author
- Anthropic
How we tested it
We installed it on an empty test computer on 28 Oct 2026. Installed and started in a clean test system. Not yet used in a real AI session.
Not yet used on real work.
Technical details of the test
- Date
- 28 Oct 2026
- Method
- Intake sandbox run on 2026-10-28 in a clean container with no account: cloned the repository and checked its skill, agent and plugin files; installed code-modernization@claude-plugins-official with the Claude Code command line.
Checked again on 28 Oct 2026
Alternatives
- Superpowers — obra's plugin (not the paid Superpowers Pack): a general plan, test and review workflow for any coding task, not just old code
- Feature Dev plugin (Anthropic) — guided agents for building new features rather than moving old ones
FAQ
- Q: Does it cost money? A: The plugin is free (Apache-2.0); it uses your Claude plan, and big systems use a lot of it.
- Q: Does it send data about me? A: Only whole-number usage counts, through Claude Code's own metrics, and only while those are on. Set Usage counts to off in /config to stop them (README Telemetry).
- Q: Will it change my old code? A: Not on purpose. Its commands write only to analysis/ and modernized/ and check that the source stayed untouched, but this is a convention, so add the deny rule
Edit(/legacy/**)the README shows to .claude/settings.json. - Q: Do I need to be a developer? A: The README says a few steps need someone who knows how the system is built and run, so bring an engineer for the first questions.
Sources
- github.com/anthropics/claude-plugins-official/tree/main/plugins/code-modernization
- github.com/anthropics/claude-plugins-official/blob/main/plugins/code-modernization/CHANGELOG.md
- github.com/anthropics/claude-plugins-official/blob/main/plugins/code-modernization/hooks/hooks.json
- github.com/anthropics/claude-plugins-official/blob/main/plugins/code-modernization/scripts/telemetry.sh
- code.claude.com/docs/en/plugins/mods/overview
- code.claude.com/docs/en/data-usage