modernize

modernize is a command for coding agents from ruslan-korneev/claude-plugins. It costs 14 tokens per session (1,823 once invoked), scanned A, original, MIT.

A command that examines an older Python codebase and creates a staged plan for updating it. It uses the Strangler Fig approach, which replaces parts of an old system gradually instead of rewriting everything at once.

In plain words
What is it for?
Use it to inspect project structure, identify frameworks and entry points, map dependencies, find models and routes, review configuration, and plan gradual changes.
Why use it?
It turns a large modernization effort into phases and identifies structural problems such as oversized classes, circular dependencies, mixed responsibilities, and shared mutable state.

Command

Part of the tech-lead plugin — 14 commands, 9 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 commands/ruslan-korneev/claude-plugins/modernize
Clone the repo
git clone --depth 1 https://github.com/ruslan-korneev/claude-plugins

Or install tech-lead, the plugin that ships this one along with the rest of its 14 commands, 9 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 modernize

README.md
[![agentmods](https://agentmods.dev/badge/commands/ruslan-korneev/claude-plugins/modernize.svg)](https://agentmods.dev/commands/ruslan-korneev/claude-plugins/modernize)
Your own site
<a href="https://agentmods.dev/commands/ruslan-korneev/claude-plugins/modernize"><img src="https://agentmods.dev/badge/commands/ruslan-korneev/claude-plugins/modernize.svg" alt="Measured on agentmods" 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,823 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.00014 $0.01823
Opus 5 $0.00007 $0.00911
Sonnet 5 $0.00003 $0.00365
Haiku 4.5 $0.00001 $0.00182

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

Security

Grade A, and why

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.

plugins/tech-lead/commands/modernize.md · 259 lines

How it starts

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

Command /architect:modernize

Analyze legacy codebase and create a phased modernization plan using Strangler Fig pattern.

Instructions

Step 1: Discover Project Structure

# Find all Python files
find {{ path | default: "." }} -name "*.py" -type f | head -50

# Check for common patterns
ls -la {{ path | default: "." }}

Use Glob and Grep to understand the codebase:

  • Find entry points (main.py, app.py, wsgi.py)
  • Identify frameworks (Flask, Django, FastAPI)
  • Locate models, views/routes, services

Step 2: Analyze Current Architecture

Check for architectural patterns:

# Look for layered architecture
Glob: **/models.py, **/views.py, **/services.py, **/repositories.py

# Look for module structure
Glob: **/modules/*/__init__.py, **/apps/*/__init__.py

# Find configuration
Glob: **/config.py, **/settings.py, **/.env.example

Identify anti-patterns:

Anti-Pattern Detection
God Objects Classes > 500 lines, > 20 methods
Circular Dependencies Imports inside functions
No Separation Business logic in views/routes
Global State Module-level mutable variables

Step 3: Map Dependencies

Internal dependencies:

# Find imports between modules
Grep: "from src\." or "from app\."

External dependencies:

# Check requirements
cat requirements.txt 2>/dev/null || cat pyproject.toml 2>/dev/null

Database dependencies:

  • Find all models and their relationships
  • Identify shared tables between modules
  • Check for raw SQL queries

Step 4: Assess Test Coverage

# Check for existing tests
find {{ path | default: "." }} -name "test_*.py" -o -name "*_test.py" | wc -l

# Check pytest configuration
cat pytest.ini 2>/dev/null || cat pyproject.toml | grep -A 20 "\[tool.pytest"

Step 5: Identify Critical Paths

Analyze which code paths are:

  1. High traffic — frequently executed
  2. High risk — complex, poorly tested
  3. High value — core business logic

Read the full file on GitHub · 259 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 · 259 lines · 14 tokens per session scan A ca40a848118d

Subscribe to this mod's changes

modernize is a command published in the GitHub repository ruslan-korneev/claude-plugins (4 stars, last pushed 6mo ago), licensed MIT. It adds 14 tokens to every session and 1,823 once invoked, about $0.0001 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.