Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add thevibeworks/claude-code-docs/plugin install code-modernizationWrote 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-harden)<a href="https://agentmods.dev/commands/thevibeworks/claude-code-docs/modernize-harden"><img src="https://agentmods.dev/badge/commands/thevibeworks/claude-code-docs/modernize-harden/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-harden"><img src="https://agentmods.dev/badge/commands/thevibeworks/claude-code-docs/modernize-harden.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.00025 | $0.02178 |
| Opus 5.5 | $0.00010 | $0.00871 |
| Sonnet 5.5 | $0.00005 | $0.00436 |
| Haiku 4.5 | $0.00003 | $0.00218 |
Grade A, and why
modernize-harden 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 2mo 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.
This is a copy
100% identical to modernize-harden — 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 — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Run a security hardening pass on the legacy system: find vulnerabilities, rank them, and produce a
reviewable patch for the critical ones. $system is the first argument; flags go after it
(<system> --show-secrets), since a flag in first place would be read as the system name.
The code is legacy/$system, often a symlink to where it really lives: say where it points (readlink legacy/$system) in one line before you start. If legacy/$system does not exist, stop and say so: nothing can run without the code, so the fix is /code-modernization:modernize $system --source <path to the code>. Run every subagent in the foreground and wait for its result: never end your turn while one is still running.
This command never edits legacy/$system: it writes findings and a proposed patch to analysis/$system/, and the
user reviews and applies (or not).
Step 0 — Secrets quarantine
Findings get shared, committed and pasted into decks, so discovered credential values never land in them. Before scanning:
- Ensure
analysis/.gitignorecontainsSECRETS.local.mdand*.local.patch(create or append). - In a git repo, verify with
git check-ignore -q analysis/$system/SECRETS.local.md; if that exits non-zero, fix the rule first. Write no findings until it passes. - With no git repo (check
.svn,.hg,CVStoo: a.gitignoreprotects nothing under another VCS), refuse--show-secretsand writeSECRETS.local.mdand any.local.patchto~/.modernize/$system/, telling the user where and why.
Every shareable artifact masks secret values (AKIA****, password=****) and cites file:line. Raw values
may appear in exactly two gitignored places: the *.local.patch remediation hunks (unavoidably, see
Remediate) and, only with --show-secrets, SECRETS.local.md. Never in SECURITY_FINDINGS.md or patch
commentary.
Scan
Preferred, with the Workflow tool (this command authorizes it). Tell the user the agent count as a formula, 5 + N + M: 5 finders, N refuters (one per distinct finding), M second judges (one per finding still Critical or High after refutation); N and M are known only once the finders return.
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.
- 2mo ago Changed · -18 lines · +4 tokens per session c295a7dee264
- 2mo ago First seen · 155 lines · 21 tokens per session scan A 82281d6535fc
modernize-harden is a command published in the GitHub repository thevibeworks/claude-code-docs (183 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 2,178 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to modernize-harden, differing in 0 lines, and is treated as a copy.
modernize-harden compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| modernize-hardenthevibeworks/claude-code-docs | Command | 183 | today | MIT | A | 25 | Claude Code |
| reconciledork-labs/dorkos | Command | 11 | today | MIT | A | 10 | Claude Code |
| reviewdork-labs/dorkos | Command | 11 | today | MIT | A | 21 | Claude Code |
| auditdork-labs/dorkos | Command | 11 | today | MIT | A | 30 | Claude Code |
| createdork-labs/dorkos | Command | 11 | today | MIT | A | 6 | Claude Code |
| from-specdork-labs/dorkos | Command | 11 | today | MIT | A | 8 | Claude Code |
| curatedork-labs/dorkos | Command | 11 | today | MIT | A | 21 | Claude Code |