legacy-modernize

legacy-modernize is a command for Claude Code from HermeticOrmus/LibreUIUX-Claude-Code. It costs 0 tokens per session (1,854 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: $ARGUMENTS substitution.

Good fit Use it to assess legacy code, identify technical debt and risks, plan…

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.

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.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.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 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.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

Copies of this mod

2 near-identical copies found in the catalogue:

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 HermeticOrmus/LibreUIUX-Claude-Code (101 stars, last pushed 3mo 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.