modernize-preflight

modernize-preflight is a command for coding agents from thevibeworks/claude-code-docs. It costs 16 tokens per session (3,013 once invoked), scanned A, a copy of modernize-preflight, MIT.

A command that checks whether an environment is ready to analyze and modernize a legacy software system.

In plain words
What is it for?
Use it to check source completeness, required toolchains, analysis readiness, and access to system data before starting modernization work.
Why use it?
It finds missing analysis tools, build tools, source files, and telemetry access early, before later modernization steps fail or produce incomplete results.

Command

Part of the code-modernization plugin — 10 commands, 8 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/thevibeworks/claude-code-docs/modernize-preflight
Clone the repo
git clone --depth 1 https://github.com/thevibeworks/claude-code-docs

Or install code-modernization, the plugin that ships this one along with the rest of its 10 commands, 8 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-preflight

README.md
[![agentmods](https://agentmods.dev/badge/commands/thevibeworks/claude-code-docs/modernize-preflight.svg)](https://agentmods.dev/commands/thevibeworks/claude-code-docs/modernize-preflight)
Your own site
<a href="https://agentmods.dev/commands/thevibeworks/claude-code-docs/modernize-preflight"><img src="https://agentmods.dev/badge/commands/thevibeworks/claude-code-docs/modernize-preflight.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,013 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00016 $0.03013
Opus 5 $0.00008 $0.01507
Sonnet 5 $0.00003 $0.00603
Haiku 4.5 $0.00002 $0.00301

Measured yesterday against content hash 50324049bc37, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

modernize-preflight 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 yesterday.

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

This is a copy

100% identical to modernize-preflight — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

content/github/claude-plugins-official/plugins/code-modernization/commands/modernize-preflight.md · 227 lines

How it starts

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

Check whether this environment is ready to analyze — and eventually transform — legacy/$1, and tell the user exactly what to fix before the other commands run into it. Modernization sessions fail late and confusingly when this isn't done: assessment metrics silently degrade without analysis tools, characterization tests can't run without a build toolchain, and dependency maps come out wrong when half the source isn't in the tree.

Run every check even when an early one fails — the point is one complete readiness report, not the first error.

Check 0 — Ask the human (these answers are not in the source)

Before any automated check, ask the person running this command the five questions below. The most expensive modernization mistakes are things a person who knows the system answers in seconds and that cost real money to discover wrong from the source alone. Ask only these — add none — and accept "don't know" for any of them.

Ask, then do not block on the answers. None of Checks 1–6 needs one (Check 6 verifies the scope boundary from the source independently — the human's answer says whether a crossing matters, not whether it exists), so proceed to the checks immediately after asking and write the report with whatever answers exist by then. Any question still unanswered goes in the report verbatim, marked as an open item the human must fill in — it is not dropped. This way an interactive user answers while the checks run, a headless or scripted run still produces a complete PREFLIGHT.md, and the one thing that never happens is a readiness report silently missing the questions.

  1. Scope — Is legacy/$1 the complete system, or one slice of a larger codebase? If a slice: what outside it depends on code inside it, and is breaking those consumers acceptable? (Check 6 verifies this from the source independently; the human's answer says whether it matters.)
  2. Build & test locally — Can this environment restore, build, and run the tests? Roughly how long does the full CI pipeline take? (A pipeline measured in hours changes the whole validation strategy: you cannot afford to first learn you were wrong from CI.)
  3. Bespoke build infrastructure — Is there organization-specific build or dependency-resolution machinery (an internal package feed, a custom binary store, a code generator, a wrapper around the standard build tool) that someone new to this codebase would not guess? Where is it documented?
  4. Prior attempts — Has anyone tried to modernize any of this before? What went wrong?
  5. Off limits — Is anything under legacy/$1 not allowed to change in this pass (a component another team owns, a frozen branch, generated code)?

Record every answer verbatim in the report — downstream commands, and /modernize-brief most of all, read them from there. Do not paraphrase away a caveat the human gave you.

Read the full file on GitHub · 227 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. yesterday First seen · 227 lines · 16 tokens per session scan A 50324049bc37

Subscribe to this mod's changes

modernize-preflight is a command published in the GitHub repository thevibeworks/claude-code-docs (39 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 3,013 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to modernize-preflight, differing in 0 lines, and is treated as a copy.