wp-finish

wp-finish is a command for coding agents from Abdulkader-Safi/wp-to-code. It costs 16 tokens per session (347 once invoked), scanned C, original, MIT.

A command that checks a WordPress site port against its source at different page sizes, audits the result, and then removes temporary migration files after approval. A mirror is a local copy of the original site used during the port.

In plain words
What is it for?
Use it to compare every configured page and viewport, run the audit, report what will be removed, and clean up the migration setup after confirmation.
Why use it?
It provides a final comparison before deleting the source mirror and measurement data. This reduces the risk of losing useful files before the rebuilt pages match.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the wp-to-code plugin — 1 skill, 8 commands, 1 hook 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/abdulkader-safi/wp-to-code/wp-finish
Clone the repo
git clone --depth 1 https://github.com/Abdulkader-Safi/wp-to-code

Or install wp-to-code, the plugin that ships this one along with the rest of its 1 skill, 8 commands, 1 hook.

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 wp-finish

README.md
[![agentmods](https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-finish.svg)](https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-finish)
Your own site
<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>
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 347 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found 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.00347
Opus 5 $0.00008 $0.00173
Sonnet 5 $0.00003 $0.00069
Haiku 4.5 $0.00002 $0.00035

Measured 3d ago against content hash d0d06d97a8fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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/
plugins/wp-to-code/commands/wp-finish.md · 37 lines

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.

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. 3d ago First seen · 37 lines · 16 tokens per session scan C d0d06d97a8fe

Subscribe to this mod's changes

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.