modernize-uplift

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

A command that moves software from an older version of its existing technology to a newer version, such as .NET Framework 4.8 to .NET 8. It preserves the code’s structure and checks behavior across runtimes when both can run.

In plain words
What is it for?
Use it for same-stack upgrades, updating version-specific code, running the test suite on old and new runtimes when possible, and comparing the results.
Why use it?
It addresses version-related breaking changes without turning the work into a full rewrite of the software’s business logic.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: positional $N argument.

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 — 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,945 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 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-uplift

README.md
[![agentmods](https://agentmods.dev/badge/commands/anthropics/claude-plugins-official/modernize-uplift.svg)](https://agentmods.dev/commands/anthropics/claude-plugins-official/modernize-uplift)
Your own site
<a href="https://agentmods.dev/commands/anthropics/claude-plugins-official/modernize-uplift"><img src="https://agentmods.dev/badge/commands/anthropics/claude-plugins-official/modernize-uplift.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,995 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.1 $0.00044 $0.05995
Opus 5 $0.00022 $0.02998
Sonnet 5 $0.00009 $0.01199
Haiku 4.5 $0.00004 $0.00600

Measured 6d ago against content hash 7630f9109cd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

modernize-uplift 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 6d 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-uplift.md · 421 lines

How it starts

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

Uplift legacy/$1 from $2 to $3 — same stack, newer version.

This is not /modernize-transform. There you extract intent and rewrite idiomatically. Here the code is good; it just needs to run on a newer runtime. You preserve structure and make the smallest diffs that compile and behave identically on the target, driven by the known breaking changes between $2 and $3 — not by re-deriving the business logic.

The potential advantage of a same-stack uplift: if both runtimes execute in this environment, the same test suite can run on both and your equivalence proof becomes a real differential test (run on both, diff the results). That is the strong case — but it is not always available, and the command is explicit about when it is:

  • It depends on the stack. .NET can multi-target one test project to both framework monikers (<TargetFrameworks>net48;net8.0</TargetFrameworks>), but net48 only executes on Windows/Mono — on a Linux/macOS box or most CI sandboxes the old leg cannot run. Java 8→17 is not one suite over two targets at all — it is the whole build run twice under two JDK toolchains. Python 2→3 cannot import the same un-rewritten module under both interpreters. So "true dual-run" is the best case, common only for .NET-on-Windows.
  • When both runtimes are not runnable here, equivalence degrades — exactly like /modernize-transform — to characterization tests pinned to recorded/expected outputs on the target only. That is fine; it just must be labelled honestly (Step 0.3, Step 7).

Optional 4th arg $4 scopes to projects/modules matching a pattern.

Step 0 — Toolchain & version pinning (fail fast)

  1. Pin the version pair precisely. "$2 → $3". If either is vague (e.g. ".NET" with no number), stop and ask — the entire delta catalog depends on the exact pair.
  2. Target runtime — required for dual-run. Verify the target toolchain builds and tests (dotnet --version + dotnet test smoke; mvn/gradle; python3 -V + pytest).
  3. Source runtime — required for the baseline oracle. A same-stack uplift's strength is that the old version also runs locally. Verify it. If the source runtime is NOT available here (common in CI/sandboxes — e.g. no .NET Framework on Linux), say so explicitly: dual-run degrades to target-only, and equivalence falls back to characterization tests pinned to recorded/expected outputs (as in /modernize-transform). Note this in the plan and UPLIFT_NOTES — reviewers must know whether the proof was a true dual-run or target-only.
  4. Test framework on the target — the one question that reshapes the plan. Answer, before any planning: can the existing test suite execute on $3 as-is? The test framework is a dependency like any other, and one whose runner/adapter does not support the target runtime is the single most common reason an uplift's phase order comes out wrong: the test migration is then a prerequisite, not a leaf, because nothing you migrate can be validated until the tests that validate it run on $3. Read the framework and version out of the test manifests and check it against $3 — NUnit 2 or MSTest v1 cannot execute on modern .NET, JUnit 4 needs the vintage engine on newer platforms, nose/unittest2 do not run on Python 3, and so on for whatever this stack's test manifests declare. If the answer is no, say so now: it becomes an explicit early phase in the plan (Step 2) and in /modernize-brief, never a trailing one.
  5. Detect the ecosystem migration tool — and distinguish present / runnable-here / actually-ran. Most of these tools need a working restore + build (and often network), which a read-only sandbox does not have, so "installed" ≠ "produced findings". Report all three states and never fold a tool's findings into the catalog unless it actually ran — say "coverage lost: needs restore+network, unavailable here" instead.
    • .NET: dotnet upgrade-assistant (loads + restores the project; also applies changes in place — see Step 5). The legacy Portability Analyzer (apiport) analyzes compiled assemblies, not source, and is Windows-centric/archived — treat as optional, not primary.
    • Java/Spring: OpenRewrite (mvn rewrite:dryRun is genuinely headless and emits a patch — the most reliable of these; lean on it).
    • Python: pyupgrade (source-level, runnable). Note 2to3 is deprecated and removed in Python 3.13; python-modernize is abandoned — don't rely on them.
    • JS/Angular: ng update (edits in place, needs a clean git tree + node_modules; no real report-only mode).

Read the full file on GitHub · 421 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. 6d ago First seen · 421 lines · 44 tokens per session scan A 7630f9109cd7

Subscribe to this mod's changes

modernize-uplift is a command published in the GitHub repository anthropics/claude-plugins-official (35,945 stars, last pushed yesterday), licensed Apache-2.0. It adds 44 tokens to every session and 5,995 once invoked, about $0.0002 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.