wp-finalize

wp-finalize is a command for Claude Code from yojahny55/claude-wp-builder. It costs 19 tokens per session (5,989 once invoked), scanned A, original, MIT.

A pre-delivery checker for WordPress themes that reports whether key requirements are met. It checks items such as safe output handling, multilingual coverage, responsive design, menus, and theme setup.

In plain words
What is it for?
Use it to validate a theme’s security-related escaping, search and language coverage, mobile behavior, navigation, and required files.
Why use it?
It helps find problems before delivery without changing the theme, including unsafe PHP output or missing translations.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

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, 28 commands, 15 agents shipped together

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, 28 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-finalize

README.md
[![agentmods](https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-finalize.svg)](https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-finalize)
Your own site
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-finalize"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-finalize.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,989 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.1 $0.00019 $0.05989
Opus 5 $0.00010 $0.02995
Sonnet 5 $0.00004 $0.01198
Haiku 4.5 $0.00002 $0.00599

Measured yesterday against content hash c65499b4c677, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

wp-finalize scanned grade A 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "$SITE/<a-cpt-archive-slug>/" | grep -o 'rel="canonical"' | wc -l # must be 1
commands/wp-finalize.md · 458 lines

How it starts

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

WP Finalize — Pre-Delivery Checklist

Run a comprehensive validation checklist on the theme before delivery. This command does NOT fix issues — it reports them so you can address them.

Step 1: Read Project Context

Read .claude/CLAUDE.md to extract:

  • Function prefix (e.g., kairo_)
  • Theme slug
  • Languages (all configured languages)
  • Theme directory path

If .claude/CLAUDE.md does not exist, tell the user to run /wp-init first and stop.

Step 2: Determine Theme Directory

Use the theme directory from .claude/CLAUDE.md. Verify it exists. If not, search for it under wp-content/themes/.

Step 3: Run All Validation Checks

Run each check category using Grep and Glob. Track pass/fail status and collect issues.


Check 1: Escaping Validation

Search all .php files in the theme directory for unescaped output:

  1. Find echo statements that are NOT followed by esc_html, esc_url, esc_attr, wp_kses_post, wp_kses, or wp_kses_allowed_html:

    • Search pattern: echo\s+\$ (echo followed directly by a variable)
    • Search pattern: echo\s+[^e][^s][^c] and exclude safe functions
    • Exclude: echo esc_html, echo esc_url, echo esc_attr, echo wp_kses
  2. Allowlist: These are safe and should NOT be flagged:

    • echo get_template_part (no output)
    • echo wp_nav_menu (self-escaping)
    • echo get_search_form (self-escaping)
    • the_content(), the_title(), the_excerpt() (WordPress auto-escapes)

PASS if no unescaped echo statements found. FAIL with file:line list if any found.


Check 2: Bilingual Coverage

Branch on the project's i18n strategy (read it from .claude/CLAUDE.md):

  1. Field files check — suffix only. Under suffix, glob fields/*.php, and for each file search for field names ending in _en. Verify corresponding _es (or other language) variants exist. Under polylang, skip this item: field files carry ONE set of fields with no _<lang> duplicates (one post per language carries its own values), so there are no _es variants to verify — running it would fail every correct Polylang project.

Read the full file on GitHub · 458 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. yesterday Changed · +10 lines c65499b4c677
  2. 2d ago Changed · +43 lines 64046e7f1f2c
  3. 6d ago First seen · 405 lines · 19 tokens per session scan A 0e39d785143d

Subscribe to this mod's changes

wp-finalize is a command published in the GitHub repository yojahny55/claude-wp-builder (6 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 5,989 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.