legacy-modernize

legacy-modernize is a command for Claude Code from EngineerWithAI/engineerwith-agents. It costs 0 tokens per session (1,854 once invoked), scanned A, a copy of legacy-modernize, MIT.

A coordinated workflow for replacing an old software system piece by piece while it continues operating. It uses the strangler fig pattern, where new parts gradually take over from legacy parts.

In plain words
What is it for?
Use it to inventory technical debt, find outdated dependencies and security issues, plan migration phases, and validate each replacement before moving on.
Why use it?
It reduces the risk and disruption of a full rewrite by assessing, testing, securing, and replacing the system in stages.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to inventory technical debt, find outdated dependencies and security issues…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/engineerwithai/engineerwith-agents/legacy-modernize
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.

Clone the repo
git clone --depth 1 https://github.com/EngineerWithAI/engineerwith-agents

Made for: Claude Code.

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 legacy-modernize

README.md
[![agentmods](https://agentmods.dev/badge/commands/engineerwithai/engineerwith-agents/legacy-modernize.svg)](https://agentmods.dev/commands/engineerwithai/engineerwith-agents/legacy-modernize)
Your own site
<a href="https://agentmods.dev/commands/engineerwithai/engineerwith-agents/legacy-modernize"><img src="https://agentmods.dev/badge/commands/engineerwithai/engineerwith-agents/legacy-modernize.svg" alt="Measured on agentmods" 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,854 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 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.1 $0.00000 $0.01854
Opus 5 $0.00000 $0.00927
Sonnet 5 $0.00000 $0.00371
Haiku 4.5 $0.00000 $0.00185

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

Security

Grade A, and why

legacy-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 3d 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

This is a copy

100% identical to legacy-modernize — 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.

plugins/framework-migration/commands/legacy-modernize.md · 110 lines

How it starts

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

Legacy Code Modernization Workflow

Orchestrate a comprehensive legacy system modernization using the strangler fig pattern, enabling gradual replacement of outdated components while maintaining continuous business operations through expert agent coordination.

[Extended thinking: The strangler fig pattern, named after the tropical fig tree that gradually envelops and replaces its host, represents the gold standard for risk-managed legacy modernization. This workflow implements a systematic approach where new functionality gradually replaces legacy components, allowing both systems to coexist during transition. By orchestrating specialized agents for assessment, testing, security, and implementation, we ensure each migration phase is validated before proceeding, minimizing disruption while maximizing modernization velocity.]

Phase 1: Legacy Assessment and Risk Analysis

1. Comprehensive Legacy System Analysis

  • Use Task tool with subagent_type="legacy-modernizer"
  • Prompt: "Analyze the legacy codebase at $ARGUMENTS. Document technical debt inventory including: outdated dependencies, deprecated APIs, security vulnerabilities, performance bottlenecks, and architectural anti-patterns. Generate a modernization readiness report with component complexity scores (1-10), dependency mapping, and database coupling analysis. Identify quick wins vs complex refactoring targets."
  • Expected output: Detailed assessment report with risk matrix and modernization priorities

2. Dependency and Integration Mapping

  • Use Task tool with subagent_type="architect-review"
  • Prompt: "Based on the legacy assessment report, create a comprehensive dependency graph showing: internal module dependencies, external service integrations, shared database schemas, and cross-system data flows. Identify integration points that will require facade patterns or adapter layers during migration. Highlight circular dependencies and tight coupling that need resolution."
  • Context from previous: Legacy assessment report, component complexity scores
  • Expected output: Visual dependency map and integration point catalog

Read the full file on GitHub · 110 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. 3d ago First seen · 110 lines · 0 tokens per session scan A 072444ef599d

Subscribe to this mod's changes

legacy-modernize is a command published in the GitHub repository EngineerWithAI/engineerwith-agents (4 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,854 tokens. A static security scan graded it A with 0 findings. It is 100% identical to legacy-modernize, differing in 0 lines, and is treated as a copy.

Related

Other commands, from other repositories

qa-changes

This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…

OpenHands/extensions · 63 tokens

doctor

Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…

doncheli/don-cheli-sdd · 76 tokens

fix

Universal debugging and fix application with semantic code analysis.

stefan-jansen/claude-code-toolkit · 9 tokens

gh-issue-use-cypress

Like /gh-issue-use-browser, but pinned to the Cypress MCP — use when your project runs the Cypress MCP for browser automation. Example — /gh-issue-use-cypress "Composer > Save" saving toasts failure but the record persists.

skyfox675/agents-skills · 49 tokens

http-service

Build, review or debug a Bun HTTP service. Loads the http-service skill, then works the task through its workflow.

MadAppGang/magus · 27 tokens

auditar-cascading

Invoca cascading-failures-auditor — audita serviço para 5 triggers de cascade (sem timeout, retry sem jitter, sem circuit breaker, sem deadline, queue unbounded) e gera CASCADING-AUDIT.md.

luanpdd/kit-mcp · 54 tokens