modernize

modernize is a command for Claude Code from anthropics/claude-plugins-official. It costs 0 tokens per session (1,100 once invoked), scanned A, original, Apache-2.0.

A guided starting command for modernizing an older code system, from locating the source and understanding its state to choosing the next step.

In plain words
What is it for?
Use it to find the legacy code, inspect existing analysis, ask what kind of modernization is wanted, and produce the next exact command.
Why use it?
It gives a project a clear path through discovery and planning instead of asking an agent to change unfamiliar code immediately.

Command for Claude Code ✓ vendor

Written for Claude Code: argument-hint in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the code-modernization plugin — 13 commands, 8 agents shipped together

Good fit Use it to find the legacy code, inspect existing analysis, ask what kind of modernization is wanted, and produce the next exact command.

Compare 6 commands from other repositories ↓
About the project

Claude Code Plugins Directory is a marketplace containing plugins for Claude Code, including tools, commands, skills, agents, hooks, and model context servers. Claude Code users browse it to install Anthropic-maintained or approved third-party extensions.

anthropics/claude-plugins-official · 39,070 stars · on GitHub · code.claude.com

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add anthropics/claude-plugins-official
Claude Code
/plugin install code-modernization

Made for: Claude Code.

Or install code-modernization, the plugin that ships this one along with the rest of its 13 commands, 8 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modernize

README.md
[![agentmods](https://agentmods.dev/badge/commands/anthropics/claude-plugins-official/modernize/github.svg)](https://agentmods.dev/commands/anthropics/claude-plugins-official/modernize)
Your own site
<a href="https://agentmods.dev/commands/anthropics/claude-plugins-official/modernize"><img src="https://agentmods.dev/badge/commands/anthropics/claude-plugins-official/modernize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for modernize

Your own site · 80×15
<a href="https://agentmods.dev/commands/anthropics/claude-plugins-official/modernize"><img src="https://agentmods.dev/badge/commands/anthropics/claude-plugins-official/modernize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,100 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01100
Opus 5.5 $0.00000 $0.00440
Sonnet 5.5 $0.00000 $0.00220
Haiku 4.5 $0.00000 $0.00110

Measured 20d ago against content hash fc3ba0a9a3e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

modernize scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • modernize — 100% identical, 0 lines differ
plugins/code-modernization/commands/modernize.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the front door of a guided modernization. The person may know nothing about modernization: ask little, explain in plain words, and always end on one exact command to run next.

1 — Find where things stand

  • If $system was given, use it. Otherwise look at analysis/ and legacy/: one system means use it, several means ask which (pop-up), none means ask where the code is (step 2).
  • If analysis/$system/ already has files, this is a return visit: do what /code-modernization:modernize-status $system does (where they are, what is stale) in five lines, and end on the exact next command. Stop there.

2 — Find the code

The code is legacy/$system (a copy, or a symlink to where it really lives). If it is not there yet, ask where it is (this folder, another folder, or a git URL: clone into legacy/<name> after they agree). If $ARGUMENTS has --source <path>, use that path. Pick a short name for it (letters, digits, - and _) if none was given. Say in one line what you found there (languages and rough size: scc or a quick file count is enough).

3 — Ask what they want (two short pop-ups at most)

Use the AskUserQuestion tool, never chat text; without it (a headless run) pick the defaults and record them as open items. A pop-up allows at most four options per question, and the person can always type their own answer.

Pop-up 1, two questions:

  1. What do you want to do with it? Move to a newer version of the same technology (for example .NET Framework to .NET 8, Java 8 to 17, Python 2 to 3), Rewrite it in a different technology, one piece at a time, while the old system keeps running, Rebuild it from scratch on a new architecture, Understand it first: map it and list what it does (also the right choice when they are not sure: the assessment then recommends one of the other three).
  2. What must stay true? Pick any: The old system keeps running during the move, Behavior must match exactly, including known quirks, Fix known bugs as we go, A security review comes first. Choosing none means nothing special.

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago First seen · 65 lines · 0 tokens per session scan A fc3ba0a9a3e3

Subscribe to this mod's changes

modernize is a command published in the GitHub repository anthropics/claude-plugins-official (39,070 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,100 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-26.