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/abdulkader-safi/wp-to-code/wp-finishgit clone --depth 1 https://github.com/Abdulkader-Safi/wp-to-codeWrote 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/abdulkader-safi/wp-to-code/wp-finish)<a href="https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-finish"><img src="https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-finish.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.00347 |
| Opus 5 | $0.00008 | $0.00173 |
| Sonnet 5 | $0.00003 | $0.00069 |
| Haiku 4.5 | $0.00002 | $0.00035 |
Grade C, and why
wp-finish scanned grade C 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 3d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf .wp-to-code/ What it actually says
1. Verify before deleting anything
For every page in the config, at every viewport:
NODE_PATH="${CLAUDE_PLUGIN_DATA}/node_modules" \
node "${CLAUDE_PLUGIN_ROOT}/scripts/diff.mjs" --page <slug> --json
node "${CLAUDE_PLUGIN_ROOT}/scripts/audit.mjs"
Both must be clean. If anything is off, stop and report it. Deleting the mirror is the one irreversible step in this workflow: once it is gone, re-mirroring gets whatever the live site looks like that day, which may no longer be what you ported.
2. Report first, then ask
Show the user the full table across pages and viewports, plus the audit result and the size of what is about to be deleted. Ask before deleting. Do not treat a green diff as permission.
3. Delete
rm -rf .wp-to-code/
That removes the mirror, the measurement dumps, the diff reports and the config. Also remove:
- the mirror server from any process manager or npm script
.wp-to-code/from.gitignore, now that nothing writes there- any temporary route that served the original, if the stack needed one
Commit it in one go, after the last page matches.
On the source project this was about 8MB. The mirror is worth keeping until the last page is verified and not one day longer, because everything in it points at a site you no longer control.
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.
- 3d ago First seen · 37 lines · 16 tokens per session scan C d0d06d97a8fe
wp-finish is a command published in the GitHub repository Abdulkader-Safi/wp-to-code (2 stars, last pushed 15d ago), licensed MIT. It adds 16 tokens to every session and 347 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
brand
Generate a full editorial brand-guidelines book for any URL. 14 chapters covering brand essence/archetype, colour, typography, spacing, shape, iconography, motion, components, voice, accessibility, tokens, and how-to-use guidance. Print-ready, dark-mode toggle, hand-off-ready single HTML.
theme-swap
Recolour an extracted site's design around a new brand primary. OKLCH hue rotation preserves perceptual lightness — neutrals, type, spacing, and motion stay untouched. Side-by-side HTML preview + recoloured tokens (DTCG, Tailwind, shadcn, Figma).
dna
Place a design in the measured design space — nearest systems, per-axis percentiles, outliers.
extract
Extract the complete design language from a URL — DTCG tokens, Tailwind, Figma vars, motion, voice, components.
fidelity
Measure how faithfully a clone reproduces a site — pixel-diff plus motion-fidelity into one 0-100 score, a letter grade, a ranked correction plan, and a shareable card.
pack
Bundle every designlang output (DTCG tokens, Tailwind, shadcn, Figma vars, motion, anatomy, Storybook, prompts) into one polished design-system directory ready to zip and ship.