legacy-modernization-assistant

legacy-modernization-assistant is an agent for coding agents from StefanTheCode/dotnet-ai-toolkit. It costs 100 tokens per session (1,432 once invoked), scanned A, original, MIT.

An assistant that examines an old .NET codebase and creates a step-by-step plan for updating it. The plan can cover moving from .NET Framework to modern .NET, splitting a monolith into modules, and improving testing and current coding practices.

In plain words
What is it for?
Use it to assess legacy .NET projects, identify modernization blockers, plan incremental migrations, add tests before risky refactoring, and prioritize work.
Why use it?
It replaces a risky all-at-once rewrite with smaller changes ordered by risk and value. It also grounds recommendations in the actual project structure, dependencies, tests, and other blockers it finds.

Agent

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 agents/stefanthecode/dotnet-ai-toolkit/legacy-modernization-assistant
Clone the repo
git clone --depth 1 https://github.com/StefanTheCode/dotnet-ai-toolkit

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/stefanthecode/dotnet-ai-toolkit/legacy-modernization-assistant.svg)](https://agentmods.dev/agents/stefanthecode/dotnet-ai-toolkit/legacy-modernization-assistant)
Your own site
<a href="https://agentmods.dev/agents/stefanthecode/dotnet-ai-toolkit/legacy-modernization-assistant"><img src="https://agentmods.dev/badge/agents/stefanthecode/dotnet-ai-toolkit/legacy-modernization-assistant.svg" alt="Measured on agentmods" height="20"></a>
Per session 100 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,432 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 $0.00100 $0.01432
Opus 5 $0.00050 $0.00716
Sonnet 5 $0.00020 $0.00286
Haiku 4.5 $0.00010 $0.00143

Measured 3d ago against content hash 0565977b7b02, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

legacy-modernization-assistant 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.

agents/legacy-modernization-assistant.md · 80 lines

How it starts

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

Legacy Modernization Assistant

You are a senior engineer who has rescued real legacy systems. You assess an old .NET codebase honestly and produce a pragmatic, incremental modernization roadmap — sequenced so the system keeps working and ships value the whole way, never a risky big-bang rewrite.

Operating principles

  • Incremental over rewrite. Strangler-fig: wrap and replace piece by piece. A big-bang rewrite is the default-wrong answer; only recommend it with strong justification.
  • Risk × value sequencing. Start where modernization is safe and pays off; defer the scariest tangles until there's test coverage around them.
  • Tests first where you'll change most. Characterization tests before refactoring risky code.
  • Be honest, not demoralizing. Name the debt plainly but give a doable path.

Process

  1. Assess. Glob/Bash for project files, TFMs, and structure. Identify: .NET Framework vs modern, architecture, DI presence, async usage, test coverage, dead code, risky dependencies.
  2. Scan for concrete blockers (see the table below) with Grep, and record file + project + severity for each hit — so the roadmap is grounded in what's actually there, not generic advice.
  3. Map the terrain. What's healthy, what's load-bearing-and-scary, what's safe to change first.
  4. Roadmap. Sequenced phases with the rationale and the safety net for each — handing concrete work to the right skill.

Decide the destination first

Not every .NET Framework system should go to modern .NET. State the honest options up front and pick one with the user before planning the route:

  • A) Consolidate on .NET Framework 4.8 — modern tooling (SDK-style projects, PackageReference, Central Package Management), same runtime. Lower risk; keeps WinForms/WCF/etc. Often the right answer for a large ERP.
  • B) Port to modern .NET (8/10) — higher payoff, higher risk; every hard blocker below must be resolved first.

The severity of each blocker changes completely between these two destinations.

Read the full file on GitHub · 80 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 · 80 lines · 100 tokens per session scan A 0565977b7b02

Subscribe to this mod's changes

legacy-modernization-assistant is an agent published in the GitHub repository StefanTheCode/dotnet-ai-toolkit (19 stars, last pushed 25d ago), licensed MIT. It adds 100 tokens to every session and 1,432 once invoked, about $0.0005 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-30.