modernize-transform

modernize-transform is a command for coding agents from anthropics/claude-plugins-official. It costs 17 tokens per session (1,375 once invoked), scanned A, original, Apache-2.0.

A command that rewrites one module of an old software system for a different technology stack. It uses tests to check that the new module behaves like the original.

In plain words
What is it for?
Use it to transform a single legacy module, verify the target runtime and tools, create equivalent tests, and place the modernized module in the project’s output.
Why use it?
It limits the change to one vertical slice, making a large modernization easier to control and giving the rewrite a behavior check.

Command

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

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 · 35,867 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/anthropics/claude-plugins-official/modernize-transform
Clone the repo
git clone --depth 1 https://github.com/anthropics/claude-plugins-official

Or install code-modernization, the plugin that ships this one along with the rest of its 10 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-transform

README.md
[![agentmods](https://agentmods.dev/badge/commands/anthropics/claude-plugins-official/modernize-transform.svg)](https://agentmods.dev/commands/anthropics/claude-plugins-official/modernize-transform)
Your own site
<a href="https://agentmods.dev/commands/anthropics/claude-plugins-official/modernize-transform"><img src="https://agentmods.dev/badge/commands/anthropics/claude-plugins-official/modernize-transform.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 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,375 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00017 $0.01375
Opus 5 $0.00009 $0.00687
Sonnet 5 $0.00003 $0.00275
Haiku 4.5 $0.00002 $0.00137

Measured 5d ago against content hash ba747f617a30, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

modernize-transform 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 5d 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:

plugins/code-modernization/commands/modernize-transform.md · 124 lines

How it starts

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

Transform legacy/$1 module $2 into $3, with proof of behavioral equivalence.

This is a surgical, single-module transformation — one vertical slice of the strangler fig. Output goes to modernized/$1/$2/.

Step 0a — Toolchain check (fail fast on target, adapt on legacy)

Verify the build environment before planning, not when the tests first run:

  • Target stack ($3) — required. Runtime, package manager, and test framework all respond (java -version + mvn -v, node -v + npm -v, python3 -V + pytest --version, …). If any are missing, stop and report what to install — the new code and its tests cannot run without them, so a plan gate now would just defer the failure an hour. Suggest /modernize-preflight $1 $3 for the full readiness report.
  • Legacy stack — advisory, never a blocker. Try a syntax-only compile of the module being transformed (e.g. cobc -fsyntax-only). Legacy code often cannot build locally by nature, not by misconfiguration — CICS/IMS programs have no local translator, and the real runtime may be a mainframe you don't have. A failed or impossible legacy compile does not stop the transform; it changes the equivalence strategy:
    • dual-execution proof is off the table — characterization tests assert against recorded traces / golden-master fixtures (real production outputs, captured reports/screens, SME-confirmed examples) instead of live legacy runs
    • say so explicitly in the Step 0b plan and later in TRANSFORMATION_NOTES.md ("equivalence is trace-based; legacy was not executable in this environment"), so reviewers know the strength of the proof they're approving

Step 0b — Plan (HITL gate)

The brief is binding — read it first. If analysis/$1/MODERNIZATION_BRIEF.md exists, this transform is one phase (or one module of a phase) of that plan: read it before deciding anything below. Find the phase that names this command with $2 in scope, and treat that phase's scope, entry criteria, exit criteria, and any edits the user made to it as binding on the plan you present below. Entry criteria are gates, not context: if one is not met (a prior phase's exit criteria, an SME sign-off the brief requires), meeting it is the next step — do not proceed past it and do not silently re-plan around it. If the brief exists but no phase covers $2, stop and ask which phase this is. The user steers execution by editing the brief; a brief the execution command never reads cannot steer anything.

Read the full file on GitHub · 124 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. 5d ago First seen · 124 lines · 17 tokens per session scan A ba747f617a30

Subscribe to this mod's changes

modernize-transform is a command published in the GitHub repository anthropics/claude-plugins-official (35,867 stars, last pushed yesterday), licensed Apache-2.0. It adds 17 tokens to every session and 1,375 once invoked, about $0.0001 per session on Opus 5. 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-08-30.