wp-audit

A command-line checker for websites ported from another implementation. It looks for CSS and layout mistakes that can produce incorrect pages without showing an error.

In plain words
What is it for?
Auditing a ported page before and after visual measurement work, and before declaring it finished.
Why use it?
It catches problems that visual measurements may miss, such as missing style tokens, dynamic class names, loose line spacing, and padding that changes box sizes.

Command

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-audit
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.

Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00020 $0.00361
Opus 5 $0.00010 $0.00180
Sonnet 5 $0.00004 $0.00072
Haiku 4.5 $0.00002 $0.00036

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

Security

Grade A, and why

wp-audit 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 2d 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.

plugins/wp-to-code/commands/wp-audit.md · 27 lines

What it actually says

node "${CLAUDE_PLUGIN_ROOT}/scripts/audit.mjs"

Run this before trusting any measurement pass, and again before calling a page done.

What it catches, and why each one hides

Undefined tokens. text-28 used, --text-28 never defined. Tailwind emits nothing, the element inherits its parent's size, and if the block is absolutely positioned every section height stays correct. On the port this plugin came from, that shipped at half size across four pages and survived a full geometry pass.

Interpolated class names. Tailwind's scanner reads source text, so pl-[${x}px] is a string it cannot resolve, not a class. No CSS is generated and no error is raised. Use an inline style for genuinely dynamic values.

leading-normal on text over 18px. Renders at 1.5x. The original is usually tighter. Take line-height from the measurement.

Horizontal padding on a fixed-width box. w-[287px] pl-[15px] is a 272px content box. Text rewraps and the height changes with nothing in the class list to explain it.

Arbitrary values that duplicate a token. text-[24px] where --text-23 exists. Usually a measurement that was not reconciled.

The last section counts single-use classes. A high proportion suggests two sections that should be one component.

Exit code is non-zero when there are findings, so this works as a gate in a script.

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. 2d ago First seen · 27 lines · 20 tokens per session scan A 0a78524223db

Subscribe to this mod's changes

wp-audit is a command published in the GitHub repository Abdulkader-Safi/wp-to-code (2 stars, last pushed 14d ago), licensed MIT. It adds 20 tokens to every session and 361 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.