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.
git 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/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.
<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="Reviewed on agentmods" width="80" 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.1 | $0.00023 | $0.03159 |
| Opus 5.5 | $0.00009 | $0.01264 |
| Sonnet 5.5 | $0.00005 | $0.00632 |
| Haiku 4.5 | $0.00002 | $0.00316 |
Grade B, and why
modernize-preflight scanned grade B with 1 finding 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 29d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
(`~/.claude/settings.json`, or `settings.json` in `CLAUDE_CONFIG_DIR`). 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 — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Check whether this environment can analyze — and eventually modernize — the
system $system, and tell the user exactly what to fix before the other
commands run into it. Modernization runs fail late and confusingly when this is
skipped: metrics silently degrade without analysis tools, 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.
Where the code lives
The code is legacy/$system: a copy, or a symlink to where it really lives (how a large repository stays
put). Nothing is ever copied for you.
- If
$ARGUMENTScontains--source <path>(a directory, absolute or relative), check that it exists and is not the filesystem root or the user's home directory, then, only iflegacy/$systemdoes not exist yet, create the link:mkdir -p legacy && ln -s <absolute path> legacy/$system(on Windows a junction:cmd /c mklink /J legacy\$system <absolute path>). Iflegacy/$systemalready exists and points elsewhere, say so and change nothing. - Say where
legacy/$systempoints (readlink legacy/$system, or "a directory in this workspace") in one line before you start. - If
$target_stackstarts with--, it is a flag, not a stack.
Never modify anything under legacy/$system.
Check 0 — Ask the human (these answers are not in the source)
The most expensive modernization mistakes are things a person who knows the system answers in seconds. Ask only the five questions below — add none — and accept "don't know" for any of them.
Ask with the AskUserQuestion tool (a pop-up), never in chat text. It takes at most four questions per call: ask 1–4 in one call and 5 in a second. Give each question its own options, one of them "Don't know", and let the person type an answer instead. Do not print the questions in your reply and do not answer them yourself. While the pop-up is open, run the other checks — none of them needs the answers.
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.
- 29d ago Changed · -4 lines · +7 tokens per session scan A → B ba85391e98e4
- 1mo ago 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 (160 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 3,159 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 100% identical to modernize-preflight, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
triage
Process the user-feedback queue — triage new reports, keep the status mirror honest, and (at release time only) send the shipped emails.
reconcile
Check developer guides for documentation drift against recent code changes.
audit
Re-audit accepted ADRs against the codebase — verify each still holds, then amend, supersede, or deprecate the ones that don't.
review
Review proposed ADRs for lifecycle progression — accept implemented decisions, deprecate stale ones, archive trivial ones.
curate
Curate research files — inventory by type, identify stale/superseded candidates, update frontmatter status.
create
Create a new Architecture Decision Record.