wp-debug

wp-debug is a command for coding agents from yojahny55/claude-wp-builder. It costs 19 tokens per session (2,671 once invoked), scanned A, original, MIT.

A WordPress diagnostic command that runs health checks, identifies likely causes of problems, and suggests WP-CLI fixes.

In plain words
What is it for?
Use it to investigate general site problems or provide an issue description for extra diagnostics, including environment and log checks where supported.
Why use it?
It turns a vague WordPress issue into a structured set of checks and targeted troubleshooting steps.

Command

Part of the claude-wp-builder plugin — 14 skills, 27 commands, 15 agents 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/yojahny55/claude-wp-builder/wp-debug
Clone the repo
git clone --depth 1 https://github.com/yojahny55/claude-wp-builder

Or install claude-wp-builder, the plugin that ships this one along with the rest of its 14 skills, 27 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-debug

README.md
[![agentmods](https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-debug.svg)](https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-debug)
Your own site
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-debug"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-debug.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 2,671 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 $0.00019 $0.02671
Opus 5 $0.00010 $0.01336
Sonnet 5 $0.00004 $0.00534
Haiku 4.5 $0.00002 $0.00267

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

Security

Grade A, and why

wp-debug 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 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.

Makes network callslowCapability

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

| "email", "mail", "smtp" | Test email sending: `bash -c "$WP eval \"var_dump(wp_mail('[email protected]', 'WP Debug Test', 'Testing mail from wp-debug'));\""`. Check if Mailpit is running (Docker): `bash -c "curl -s http
commands/wp-debug.md · 274 lines

How it starts

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

WP Debug — Diagnostics & Debugging

Diagnose WordPress issues by running systematic health checks, identifying problems, and offering targeted WP-CLI fixes. Optionally accepts an issue description to run extra targeted diagnostics.

Step 0: Read Project Context

Read .wp-create.json from the project root to extract the WP-CLI wrapper command.

bash -c "cat .wp-create.json"

Set $WP to the value of wp_cli.wrapper from the manifest (e.g., docker exec my-project-wp wp --allow-root, ddev wp, lando wp, wp --path=/var/www/html/my-project).

If .wp-create.json does not exist:

  • Check if bare wp is available: bash -c "which wp"
  • If available, set $WP to wp and continue (assume the current directory is the WordPress root).
  • If not available, tell the user that WP-CLI is required and stop.

Also determine the environment type for log tailing later:

  • If wp_cli.wrapper contains docker execDocker
  • If wp_cli.wrapper starts with ddevDDEV
  • If wp_cli.wrapper starts with landoLando
  • Otherwise → Native

Store any user-provided issue description from the command argument for use in Step 2.

Step 1: Always-Run Diagnostics

Run ALL 8 check categories. Execute each command via Bash using bash -c. Collect all output for the report in Step 3.


Check 1: WordPress Health

bash -c "$WP core version"
bash -c "$WP core verify-checksums"
bash -c "$WP eval \"echo PHP_VERSION;\""
bash -c "$WP eval \"echo ini_get('memory_limit');\""

Note the WordPress version, whether checksums pass, PHP version, and memory limit.


Check 2: Debug Configuration

bash -c "$WP config get WP_DEBUG"
bash -c "$WP config get WP_DEBUG_LOG"
bash -c "$WP config get WP_DEBUG_DISPLAY"

Note whether debug mode is enabled, whether logging is active, and whether errors are displayed.


Check 3: Database Health

bash -c "$WP db check"
bash -c "$WP option get siteurl"
bash -c "$WP option get home"

Read the full file on GitHub · 274 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 First seen · 274 lines · 19 tokens per session scan A 30b23d016228

Subscribe to this mod's changes

wp-debug is a command published in the GitHub repository yojahny55/claude-wp-builder (6 stars, last pushed today), licensed MIT. It adds 19 tokens to every session and 2,671 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.