code modernization — Agent Skill
by anthropics · Updated
Guided modernization for any legacy codebase: start with /modernize, get an assessment, an interactive map, the business rules mined from the code, and a plan you approve, then an upgrade, a rewrite or a rebuild with independent proof that the new code behaves like the old. Includes security hardening, a one-page repo…
At a glance
code-modernization is an Agent Skill by anthropics in the Coding & Engineering category. In Claude Code it installs with `/plugin install code-modernization@claude-plugins-official` after adding the anthropics/claude-plugins-official marketplace; other assistants use its SKILL.md instructions as rules. Its source repository has 45,210 GitHub stars (as of Oct 28, 2026).
How to install code modernization in your AI client
Setup for Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline and VS Code — copy-paste ready.
How to install code modernization in Claude CodeAnthropic's agentic CLI
Add the marketplace
claude/plugin marketplace add anthropics/claude-plugins-officialInstall the skill
claude/plugin install code-modernization@claude-plugins-officialUse it
These are slash commands for a Claude Code session, not your shell. Claude auto-invokes the skill when your request matches its description — or type its slash command if it exposes one.
How to install code modernization in Claude DesktopDesktop app (MCP config)
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/code-modernization — that folder contains the SKILL.md.
Add the SKILL.md to your Skills folder
Settings → Capabilities → Skills → add the folder containing SKILL.md. Claude picks it up automatically.
How to install code modernization in CursorAI-first code editor
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/code-modernization — that folder contains the SKILL.md.
Convert to a Cursor rule
Create .cursor/rules/code-modernization.mdc and paste the SKILL.md body. Set `alwaysApply` or a glob so the Agent loads it in context.
How to install code modernization in Codex CLIOpenAI coding agent
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/code-modernization — that folder contains the SKILL.md.
Reference in AGENTS.md
Add the skill's instructions (or a link) to AGENTS.md at your repo root — Codex reads it on every run.
How to install code modernization in WindsurfCodeium's agentic IDE
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/code-modernization — that folder contains the SKILL.md.
Add to your rules / context
Paste the SKILL.md instructions into this tool's custom rules or workspace instructions so the agent follows them.
How to install code modernization in ClineVS Code autonomous agent
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/code-modernization — that folder contains the SKILL.md.
Add to your rules / context
Paste the SKILL.md instructions into this tool's custom rules or workspace instructions so the agent follows them.
How to install code modernization in VS CodeCopilot / MCP support
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/code-modernization — that folder contains the SKILL.md.
Add to your rules / context
Paste the SKILL.md instructions into this tool's custom rules or workspace instructions so the agent follows them.
Documentation
Full READMECode Modernization
Point Claude at a legacy codebase and get four things: an understanding of what it is and what it does, a plan you approve, the modernized code, and proof that the new code behaves like the old. It works with any language and any kind of move: a newer version of the same technology, a rewrite in another one, or a rebuild on a new architecture.
Install
You need Claude Code. Then:
/plugin install code-modernization@claude-plugins-officialSome steps start many agents at once, so expect real usage on a large system (see *What to expect*). Start with one module or one unit as a pilot, not the whole estate.
Start here
Open a folder for the work and type /code-modernization:modernize. It asks what you want to do with your code (a couple of short questions), finds the code, writes your answers down once, shows the road ahead, and gives you the exact first command. Every later command reads what you said, so nothing is asked twice. Not sure what you want? Choose *Understand it first*: you get the assessment, the map, the business rules and a plan, and no code is rebuilt.
To go step by step instead, point the first command at your code and follow the "next step" line each command ends with:
/code-modernization:modernize-preflight <name> --source <path to your code>
/code-modernization:modernize-status <name> # where am I, and what is next: run it any time<name> is a short label of your choice (letters, digits, -, _). --source makes a link at legacy/<name> and copies nothing, so a huge repository stays where it is. Nothing edits your legacy source. Commands write only to analysis/<name>/ and modernized/ (a build check writes build output where your build normally does), and each refreshes analysis/<name>/REPORT.html: one page, with everything found so far, that you can open or share. A few steps need someone who knows how the system is built and run, so bring an engineer for the first questions.
The path
Each step stands alone, so you can stop and review after any of them.
| Step | Command | What you get | | --- | --- | --- | | 0 | modernize | Say what you want. Writes INTENT.md; every later command reads it. | | 1 | modernize-preflight <name> [target-stack] [--source <path>] | Is the environment ready? Asks five questions only a person can answer (is this the whole system or a slice, can it build and test here, is there custom build tooling, has anyone tried before, is anything off limits), proves a build works on this code, and finds missing source. | | 2 | modernize-assess <name> | What am I dealing with: inventory, complexity, debt, security, and a recommended pattern. | | 3 | modernize-map <name> | The structure: dependencies, data flow, entry points and business flows, as an interactive map. | | 4 | modernize-extract-rules <name> | The business rules as testable Given/When/Then cards with file:line citations, each re-checked by a second agent. | | 4b | modernize-review <name> | A person confirms or corrects the rules that look wrong. Your answers reach the plan and the build. With the live pane on, /modernize-review-pane does the same one card at a time. | | 5 | modernize-brief <name> [target-stack] | The phased plan a steering committee approves. Nothing is built until you approve it. | | 6 | uplift, transform or reimagine | The build (see below). | | 7 | modernize-verify <name> | The proof. An independent re-check with one verdict per module. | | 8 | modernize-harden <name> | A security scan of the legacy system with a reviewed patch you apply yourself. |
Excerpt — the full document is on GitHub.
More Coding & Engineering skills
- Coding & Engineering308k
superpowers
Superpowers teaches Claude brainstorming, subagent driven development with built in code review, systematic debugging, and red/green TDD. Additionally, it teaches Claude how to author and test new skills.
Claude Plugins (Official)by obra
- Coding & Engineering306k
mattpocock skills
Matt Pocock's agent skills for real engineering — grilling, spec/ticket flows, TDD, code review, domain modelling and more. Plug-and-play, not vibe coding.
Claude Plugins (Official)by mattpocock
- Coding & Engineering45k
asana
Asana project management integration. Connects Claude Code to Asana's V2 MCP server to create and manage tasks, search projects, update assignments, and track progress. Requires a one-time Asana OAuth app setup — run /asana-setup after installing.
Claude Plugins (Official)by anthropics
- Coding & Engineering45k
clangd lsp
C/C++ language server (clangd) for code intelligence
Claude Plugins (Official)by anthropics
- Coding & Engineering45k
code review
Automated code review for pull requests using multiple specialized agents with confidence-based scoring to filter false positives
Claude Plugins (Official)by anthropics
- Coding & Engineering45k
commit commands
Commands for git commit workflows including commit, push, and PR creation
Claude Plugins (Official)by anthropics
Catalog data refreshed . Something wrong? Report it.