modernize-uplift

modernize-uplift is a command for coding agents from thevibeworks/claude-code-docs. It costs 44 tokens per session (5,995 once invoked), scanned A, a copy of modernize-uplift, MIT.

A command that updates software to a newer version of the same technology stack while preserving its structure and behavior.

In plain words
What is it for?
Use it for upgrades such as .NET Framework 4.8 to .NET 8, Java 8 to 17, or Python 2 to 3, with build and equivalence checks.
Why use it?
It focuses on version-related breaking changes and can compare test results across old and new runtimes when both can run.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

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

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/thevibeworks/claude-code-docs/modernize-uplift
Clone the repo
git clone --depth 1 https://github.com/thevibeworks/claude-code-docs

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/thevibeworks/claude-code-docs/modernize-uplift.svg)](https://agentmods.dev/commands/thevibeworks/claude-code-docs/modernize-uplift)
Your own site
<a href="https://agentmods.dev/commands/thevibeworks/claude-code-docs/modernize-uplift"><img src="https://agentmods.dev/badge/commands/thevibeworks/claude-code-docs/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 100% copy Near-identical to another mod 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.00044 $0.05995
Opus 5 $0.00022 $0.02998
Sonnet 5 $0.00009 $0.01199
Haiku 4.5 $0.00004 $0.00600

Measured yesterday against content hash 7630f9109cd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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

This is a copy

100% identical to modernize-uplift — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

content/github/claude-plugins-official/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. yesterday 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 thevibeworks/claude-code-docs (39 stars, last pushed yesterday), licensed MIT. 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. It is 100% identical to modernize-uplift, differing in 0 lines, and is treated as a copy.