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.
npx agentmods add commands/thevibeworks/claude-code-docs/modernize-preflightgit clone --depth 1 https://github.com/thevibeworks/claude-code-docsWrote 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.
[](https://agentmods.dev/commands/thevibeworks/claude-code-docs/modernize-preflight)<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>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.
| Model | Per session | Once 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 |
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.
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.
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.
- Scope — Is
legacy/$1the 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.) - 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.)
- 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?
- Prior attempts — Has anyone tried to modernize any of this before? What went wrong?
- Off limits — Is anything under
legacy/$1not 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.
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.
- yesterday First seen · 227 lines · 16 tokens per session scan A 50324049bc37
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.
Other commands, from other repositories
create-plan
Create a PLANS.md execution plan document for project management.
reconcile
Check developer guides for documentation drift against recent code changes.
review
Review proposed ADRs for lifecycle progression — accept implemented decisions, deprecate stale ones, archive trivial ones.
audit
Re-audit accepted ADRs against the codebase — verify each still holds, then amend, supersede, or deprecate the ones that don't.
from-spec
Extract Architecture Decision Records from a completed spec.
curate
Curate research files — inventory by type, identify stale/superseded candidates, update frontmatter status.