legacy-modernization

legacy-modernization is a skill for Claude Code, Codex from saitarrun/Devforge-ai. It costs 33 tokens per session (723 once invoked), scanned A, original, Apache-2.0.

A guide for updating old, undocumented software systems in small steps while they keep running. It covers splitting large applications, changing databases safely, and moving from older technologies to newer ones.

In plain words
What is it for?
Use it to plan gradual migrations, separate parts of a monolith, evolve database schemas without downtime, and understand unfamiliar legacy code.
Why use it?
It helps avoid risky full rewrites and long outages. It provides a way to compare new code with the old system before sending real users to it.

Skill for Claude CodeCodex

Part of the devforge-ai plugin — 48 skills, 17 commands, 13 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 skills/saitarrun/devforge-ai/legacy-modernization
Any agent
npx skills add saitarrun/Devforge-ai --skill legacy-modernization
Clone the repo
git clone --depth 1 https://github.com/saitarrun/Devforge-ai

Made for: Claude Code, Codex.

Or install devforge-ai, the plugin that ships this one along with the rest of its 48 skills, 17 commands, 13 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 legacy-modernization

README.md
[![agentmods](https://agentmods.dev/badge/skills/saitarrun/devforge-ai/legacy-modernization.svg)](https://agentmods.dev/skills/saitarrun/devforge-ai/legacy-modernization)
Your own site
<a href="https://agentmods.dev/skills/saitarrun/devforge-ai/legacy-modernization"><img src="https://agentmods.dev/badge/skills/saitarrun/devforge-ai/legacy-modernization.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 723 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00033 $0.00723
Opus 5 $0.00016 $0.00362
Sonnet 5 $0.00007 $0.00145
Haiku 4.5 $0.00003 $0.00072

Measured 5d ago against content hash 14d2eab245ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

legacy-modernization 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 5d 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.

skills/legacy-modernization/SKILL.md · 77 lines

How it starts

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

Industrial Legacy Code Modernization & Migration Skill

This skill defines the strategy for safely refactoring, decoupling, and migrating mission-critical legacy systems (e.g., COBOL backends, 15-year-old monoliths, stored-procedure-heavy databases, PHP/Java EE stacks, and undocumented C++/C# engines) without production outages.


1. The Strangler Fig Modernization Pattern

Never attempt a "Big Bang" rewrite of an industrial legacy application. Always use the Strangler Fig Pattern:

[Phase 1: Ingress Interception & Routing Proxy]
  ↳ Direct traffic through an API gateway / reverse proxy (Envoy / Cloudflare / Nginx).
          ↓
[Phase 2: Shadow Traffic & Dark Launching]
  ↳ Duplicate live production requests to both the Legacy System and the Modern Microservice.
  ↳ Compare responses; assert 100% data equality (diff assertions) without returning modern output to clients yet.
          ↓
[Phase 3: Incremental Traffic Shifting]
  ↳ Route 1% → 10% → 50% → 100% of read traffic to the new service.
          ↓
[Phase 4: Legacy Strangling & Decommissioning]
  ↳ Decommission the legacy code path once all mutations and reads are fully migrated.

2. Reverse-Engineering Undocumented Legacy Code

When dealing with 100k+ lines of undocumented legacy spaghetti code:

  1. Golden Master Characterization Testing:
    • Before editing a single line, record input/output snapshots of the legacy system across hundreds of real-world scenarios.
    • Lock down behavior with automated characterization test suites.
  2. Extract Seams & Anti-Corruption Layers (ACL):
    • Introduce an Anti-Corruption Layer (ACL) between legacy data structures and modern domain models to prevent legacy naming/type pollution.
  3. Database Stored-Procedure Extraction:
    • Extract raw SQL triggers, cursors, and stored procedures into explicit, version-controlled domain services.

3. Zero-Downtime Database Migration (Expand & Contract)

When modifying legacy schemas touching millions of production records:

Read the full file on GitHub · 77 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. 5d ago First seen · 77 lines · 33 tokens per session scan A 14d2eab245ef

Subscribe to this mod's changes

legacy-modernization is a skill published in the GitHub repository saitarrun/Devforge-ai (5 stars, last pushed 22d ago), licensed Apache-2.0. It adds 33 tokens to every session and 723 once invoked, about $0.0002 per session on Opus 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-08-31.

Related

Other skills, from other repositories

watch

File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through /do. Use for automatic reactions to file changes; do NOT use for…

SethGammon/Citadel · 70 tokens

live-preview

Mid-build visual verification loop. Takes screenshots of components during construction, not just after. Catches visual regressions and invisible features before they compound. Requires Playwright or similar screenshot tool.

SethGammon/Citadel · 40 tokens

init

Set up docflow in a repo with no docs yet: scaffold the docs tree, write docflow.json, add agent guidance. Use when asked to "set up docflow", "initialize docs", "scaffold docs", or "make this repo use docflow".

MedAdemBHA/docflow · 56 tokens

status

Set a status message on your DevGlobe profile.

Nako0/devglobe-extension · 12 tokens

moss-comments

Comment annotation and sidecar rules for Moss notes. Use when adding, replying to, resolving, preserving, or editing comments and comments.json.

brsbl/moss-skills · 32 tokens

adr-workflow

Scaffold, accept, index, and link Architectural Decision Records (ADRs). Use when the user says "write an ADR", "record this decision", "resolve [deferred item] with an ADR", "supersede ADR-NNNN", or otherwise wants to capture a hard-to-reverse decision in docs/decisions/. Also use when a refinement-todo entry needs…

ramboz/jig · 122 tokens