modernize-assess

modernize-assess is a command for Claude Code from ronmkr/PromptBook. It costs 18 tokens per session (1,703 once invoked), scanned A, original, Apache-2.0.

A command for examining one legacy system or a group of systems and producing an inventory, complexity measures, technical-debt findings, and effort estimates. A legacy system is older software that may be difficult to change or maintain.

In plain words
What is it for?
Use it to count code and files, inspect dependency freshness, measure code complexity, estimate work, and create a portfolio heat map across systems.
Why use it?
It turns scattered code facts into an assessment that can guide modernization priorities and sequencing.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; positional $N argument.

Good fit Use it to count code and files, inspect dependency freshness, measure code complexity, estimate work, and create a portfolio heat map across systems.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ronmkr/promptbook/modernize-assess
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/ronmkr/PromptBook

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 modernize-assess

README.md
[![agentmods](https://agentmods.dev/badge/commands/ronmkr/promptbook/modernize-assess/github.svg)](https://agentmods.dev/commands/ronmkr/promptbook/modernize-assess)
Your own site
<a href="https://agentmods.dev/commands/ronmkr/promptbook/modernize-assess"><img src="https://agentmods.dev/badge/commands/ronmkr/promptbook/modernize-assess/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 modernize-assess

Your own site · 80×15
<a href="https://agentmods.dev/commands/ronmkr/promptbook/modernize-assess"><img src="https://agentmods.dev/badge/commands/ronmkr/promptbook/modernize-assess.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 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,703 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.00018 $0.01703
Opus 5 $0.00009 $0.00851
Sonnet 5 $0.00004 $0.00341
Haiku 4.5 $0.00002 $0.00170

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

Security

Grade A, and why

modernize-assess 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 9d 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/standard/code-modernization/commands/modernize-assess.md · 162 lines

How it starts

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

Mode select. If $ARGUMENTS starts with --portfolio, run Portfolio mode against the directory that follows. Otherwise run Single-system mode against legacy/$1.


Portfolio mode (--portfolio <parent-dir>)

Sweep every immediate subdirectory of the parent dir and produce a heat-map a steering committee can use to sequence a multi-year program.

Step P1 — Per-system metrics

For each subdirectory <sys>:

cloc --quiet --csv <parent>/<sys>          # LOC by language
lizard -s cyclomatic_complexity <parent>/<sys> 2>/dev/null | tail -1

If cloc/lizard are not installed, fall back to scc <parent>/<sys> (LOC + complexity) or find + wc -l grouped by extension, and estimate complexity by counting decision keywords per file. Note which tool you used.

Capture: total SLOC, dominant language, file count, mean & max cyclomatic complexity (CCN). For dependency freshness, locate the manifest (package.json, pom.xml, *.csproj, requirements*.txt, copybook dir) and note its age / pinned-version count.

Step P2 — COCOMO-II effort

Compute person-months per system using COCOMO-II basic: PM = 2.94 × (KSLOC)^1.10 (nominal scale factors). Show the formula and inputs so the figure is defensible, not a guess.

Step P3 — Documentation coverage

For each system, count source files with vs without a header comment block, and list architecture docs present (README, docs/, ADRs). Report coverage % and the top undocumented subsystems.

Step P4 — Render the heat-map

Write analysis/portfolio.html (dark #1e1e1e bg, #d4d4d4 text, #cc785c accent, system-ui font, all CSS inline). One row per system; columns: System · Lang · KSLOC · Files · Mean CCN · Max CCN · Dep Freshness · Doc Coverage % · COCOMO PM · Risk. Color-grade the PM and Risk cells (green→amber→red). Below the table, a 2-3 sentence sequencing recommendation: which system first and why.

Then stop. Tell the user to open analysis/portfolio.html.


Single-system mode

Read the full file on GitHub · 162 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. 9d ago First seen · 162 lines · 18 tokens per session scan A f41a37532190

Subscribe to this mod's changes

modernize-assess is a command published in the GitHub repository ronmkr/PromptBook (2 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,703 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.