legacy-modernize

legacy-modernize is a command for Claude Code from HermeticOrmus/LibreUIUX-Claude-Code. It costs 14 tokens per session (1,884 once invoked), scanned A, original, MIT.

A workflow for gradually replacing parts of an old software system while the existing system continues serving users. This approach is often called the strangler fig pattern.

In plain words
What is it for?
Use it to assess legacy code, identify technical debt and risks, plan replacement phases, and coordinate testing, security, and implementation work.
Why use it?
It breaks a large modernization effort into smaller changes, reducing disruption to ongoing business operations.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the framework-migration plugin — 4 skills, 3 commands shipped together

Good fit Use it to assess legacy code, identify technical debt and risks, plan replacement phases, and coordinate testing, security, and implementation work.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libreuiux-claude-code/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/HermeticOrmus/LibreUIUX-Claude-Code

Made for: Claude Code.

Or install framework-migration, the plugin that ships this one along with the rest of its 4 skills, 3 commands.

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/hermeticormus/libreuiux-claude-code/legacy-modernize/github.svg)](https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/legacy-modernize)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/legacy-modernize"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/legacy-modernize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for legacy-modernize

Your own site · 80×15
<a href="https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/legacy-modernize"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/legacy-modernize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 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,884 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 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.00014 $0.01884
Opus 5.5 $0.00006 $0.00754
Sonnet 5.5 $0.00003 $0.00377
Haiku 4.5 $0.00001 $0.00188

Measured 23d ago against content hash e31b4966bd72, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 23d 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

2 near-identical copies found in the catalogue:

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

How it starts

The opening of the file, as written. The whole thing — 115 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 · 115 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. 23d ago Changed · +5 lines · +14 tokens per session e31b4966bd72
  2. 1mo 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 HermeticOrmus/LibreUIUX-Claude-Code (115 stars, last pushed 19d ago), licensed MIT. It adds 14 tokens to every session and 1,884 once invoked, about $0.0001 per session on Opus 5.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-09-03.