/modernize:modernizefrom modernize
Plans the modernization of a legacy system (runtime, framework or dependency upgrade, migration or rewrite) with a feasibility spike, testability milestone, safety ladder, hazard red-team and phased exit criteria. Also plans a sunset (deprecate or keep an API, service or feature, and move its consumers off it). Use for "modernize this", "plan the migration", "how do we get off this stack", "sunset the v1 API", or a major version upgrade plan.
Ships in modernize. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produce a phased plan to upgrade, migrate, or rewrite a legacy system. This skill plans and does not execute. Legacy systems are often hard to run at all (end-of-life runtimes, native modules that no longer compile, retired package mirrors), so the plan can't assume the old stack is alive. It measures how alive the system is first, then picks a strategy and a level of regression safety to match.
Not for general implementation plans (planning), executing the migration (coding), or recording a single decision (adr-writing). Use each one if installed. For a guided, agent-driven modernization with assessments, business-rule mining and a dashboard, Anthropic's code-modernization plugin (claude-plugins-official) is a heavier alternative installed directly; don't run both on the same request.
Read references/sunset.md when the request is deprecating or removing an API, service or feature, or moving its consumers to a replacement, rather than upgrading a stack: it has the sunset-or-keep decision, the advisory-versus-compulsory call, the process and the zombie-code rule. For a legacy system the same reference covers any component you decide to retire in step 6.
Get the evidence base. Use an existing architecture document or README the user points to. Otherwise map the system first: when the project is indexed in codebase-memory, start with get_architecture (default aspects are languages, packages and entry points; add dependencies, routes and hotspots for a migration) and follow up with search_graph and trace_path; then read the manifests, deployment files, and test setup directly. Collect the stack with versions, the main functional areas, known pain points, and how it runs and deploys. Trust the map, and open a file only to check a specific detail, such as whether a declared dependency is used.
Run a time-boxed feasibility spike. Set a hard limit (for example half a day) and ask whether the system can run even once, not whether CI can go green. Run the spike in a scratch worktree or container with a frozen-lockfile install (npm ci, uv sync --frozen, and the like) and discard it afterward, so the user's checkout stays untouched. Per component, record what you observe.
Partial results are normal, especially in a monorepo where one service tests green while another can't build. When the box expires, decide with what you have, because resurrecting a system that can't be resurrected is itself a project.
Locate the testability milestone per component. This is the first phase at which a component runs on a supported runtime, installs from a lockfile without patching, builds on the current toolchain, and passes at least one meaningful test in CI. Name it explicitly for each component. Before that point, don't require an automated test gate on the component, because you would be demanding green tests from something that doesn't run yet. After it, real CI and characterization tests are worth the investment. Label every phase as before or after its component's milestone.
Choose the migration strategy per component.
Pick the highest reachable rung of the safety ladder and name the risk that remains. Read references/safety-ladder.md for the rungs, the sources of safety other than tests, and how to choose an oracle. Weigh regression cost: an abandoned app with no users doesn't justify an expensive gate, and a production system with users does.
Pick the least disruptive approach per component. Stop at the first one that solves the problem.
Record each choice and why. Use adr-writing, if installed, for decisions that need a durable record.
Red-team every phase against the hazard catalog before it is implemented. Read references/migration-hazards.md. For each hazard, decide whether the phase triggers it, run its detection probe against the real repo, and fold the plan action into the phase's tasks and exit criteria. Record the hazards you checked and cleared along with those that fired, since a skipped hazard looks the same as a missed one.
Write the phased plan. Read references/plan-template.md for the phase shape and exit criteria. Each phase is small enough to merge on its own, states its safety rung, and ends with an observable exit criterion.
Before presenting the plan, run the closing review from the planning skill, if installed (its references/closing-review.md): gap review, blocking decisions through AskUserQuestion, then save. Without it, do the same three steps by hand. Return the plan in the conversation as well. Include the spike results, the milestone and strategy per component, the target rung, the approach per component, the hazard checks, the phases, and the open decisions that need the user. Keep the plan proportionate to the system. A small service needs a few phases and a short hazard pass.
For the work itself, hand each phase to coding and the tests it needs to unit-testing, or a whole approved plan to implement-plan. For a Postgres major upgrade, postgres covers the database side. Use each one if installed.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin modernize