wp-polish

wp-polish is a command for Claude Code from yojahny55/claude-wp-builder. It costs 16 tokens per session (2,838 once invoked), scanned A, original, MIT.

An HTML-cleanup command that converts a page into a consistent demo structure with named sections, semantic HTML, and BEM-style CSS classes.

In plain words
What is it for?
Use it on exported or hand-written HTML, including an existing demo that needs its structure and class names normalized.
Why use it?
It removes structural inconsistencies that can make a page harder for a WordPress plugin or later editing process to use.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-wp-builder plugin — 15 skills, 30 commands, 15 agents shipped together

Good fit Use it on exported or hand-written HTML, including an existing demo that needs its structure and class names normalized.

Compare 6 commands from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add yojahny55/claude-wp-builder
Claude Code
/plugin install claude-wp-builder

Made for: Claude Code.

Or install claude-wp-builder, the plugin that ships this one along with the rest of its 15 skills, 30 commands, 15 agents.

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-polish

README.md
[![agentmods](https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-polish/github.svg)](https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-polish)
Your own site
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-polish"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-polish/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.

agentmods 80×15 button for wp-polish

Your own site · 80×15
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-polish"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-polish.svg" alt="Reviewed on agentmods" width="80" 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 2,838 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00016 $0.02838
Opus 5 $0.00008 $0.01419
Sonnet 5 $0.00003 $0.00568
Haiku 4.5 $0.00002 $0.00284

Measured 4d ago against content hash 21a67d5c5ba0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

wp-polish 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 4d 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.

commands/wp-polish.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WP Polish — Demo Normalizer

Normalize any HTML file into a plugin-compatible demo with section delimiters, semantic HTML5, and BEM class naming. Works with external HTML (Figma exports, hand-coded, other tools) or existing demos that need structural cleanup.

--craft (retrofit audit)

Read ${CLAUDE_PLUGIN_ROOT}/skills/wp-demo-craft/SKILL.md and audit the existing demo against the refuse list and the taste floor. Report findings as a list, each naming the rule and the offending selector or line. Do not add motion and do not restructure the page; converting a plain demo to craft is a rebuild, not a polish. The existing backup behaviour at demo/.prepolish/ is unchanged.

Step 1: Resolve Input Path

This step resolves paths and decides nothing else. It creates no directories and it puts no file anywhere, so the copy Step 2 takes really is the document as it stood before this command ran.

Check $ARGUMENTS:

  • If $ARGUMENTS is provided: use it as the path to the HTML file to polish — the source document.
    • If the path points to a file outside demo/, the polished output is destined for demo/index.html, and Step 6 creates demo/ when it writes there. Do not copy the source over demo/index.html here. Step 6 puts the polished result at that path anyway, and doing it early destroys the page already sitting there before Step 2 has preserved anything at all.
    • If the path points to a file inside demo/ that is not index.html (e.g., demo/pricing.html), polish it in-place — source and destination are the same file. Step 2 preserves the pre-polish copy under demo/.prepolish/ (e.g., demo/.prepolish/pricing.html), never beside the demo pages.
  • If $ARGUMENTS is empty: Default to demo/index.html, as both source and destination. If the file does not exist, tell the user to provide a path or create a demo first with /wp-demo.

Step 2: Preserve the Source Document

Save a copy of the source document under demo/.prepolish/ before anything is written:

Read the full file on GitHub · 212 lines

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. 4d ago Changed · +8 lines 21a67d5c5ba0
  2. 9d ago First seen · 204 lines · 16 tokens per session scan A e2eebb1be08f

Subscribe to this mod's changes

wp-polish is a command published in the GitHub repository yojahny55/claude-wp-builder (6 stars, last pushed today), licensed MIT. It adds 16 tokens to every session and 2,838 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.