wpbakery-batch

A batch migration command for converting several WordPress pages from WPBakery, a visual page builder, into Gutenberg, WordPress's block editor.

In plain words
What is it for?
Use it to find candidate pages, choose which ones to convert, run one conversion per page, and report the outcomes.
Why use it?
It removes the need to convert each page manually while keeping the work and results organized in one report.

Command

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/a8cteam51/claude-code-plugins/wpbakery-batch
Clone the repo
git clone --depth 1 https://github.com/a8cteam51/claude-code-plugins
Per session 44 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,894 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.00044 $0.02894
Opus 5 $0.00022 $0.01447
Sonnet 5 $0.00009 $0.00579
Haiku 4.5 $0.00004 $0.00289

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

Security

Grade A, and why

wpbakery-batch 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/wpbakery-to-gutenberg/commands/wpbakery-batch.md · 197 lines

How it starts

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

/wpbakery-to-gutenberg:wpbakery-batch

Orchestrate a batch WPBakery→Gutenberg conversion across multiple posts on a local Studio site. Each per-page conversion runs inside a subagent so that the main context window only ever holds the candidate list, the user's choices, and per-page summaries — never the actual post content, rendered HTML, or block markup. This is the only reason this command exists as a command instead of just looping inside the single-page skill.

Per-page work follows the wpbakery-to-gutenberg skill verbatim. Do not reimplement that procedure here — read ${CLAUDE_PLUGIN_ROOT}/skills/wpbakery-to-gutenberg/SKILL.md once at the start so you know what to delegate, then dispatch.

Inputs

  • $ARGUMENTS — site path (absolute path to the Studio site's WordPress root). Required.

If $ARGUMENTS is empty or doesn't look like an absolute path, ask the user via AskUserQuestion (free-text via "Other").

Step 1 — preconditions (orchestrator-side, run once)

Do these in parallel before any discovery. If any fails, stop with a plain-text reason — no recovery, no workarounds.

  1. command -v studio and studio --versionstudio CLI must be on PATH.
  2. studio site status --path=<site-path> — must report a managed site. Capture the Local URL for the report header.
  3. If status reports stopped, run studio site start --path=<site-path> and wait.
  4. studio wp core is-installed --path=<site-path> — must exit 0.
  5. Confirm mcp__wordpress-studio__validate_blocks is exposed in the current session. If not, surface it: the batch will run, but per-page subagents will skip the validate-and-fix pass and the report will flag every page as validate=skipped.
  6. mkdir -p <site-path>/.wpbakery-migration/ (subagents will stage converted-<id>.txt and update-<id>.php here, just like the single-page skill).

Step 2 — discover candidates

List every post that contains a WPBakery shortcode marker. Use wp post list --s, not wp db query — on a Studio (SQLite) site $wpdb is not fully loaded under wp db query / wp eval, and raw-SQL paths can return an empty result set even when matching posts exist. wp post list --s runs through WP_Query, which the SQLite integration handles cleanly:

Read the full file on GitHub · 197 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. 2d ago First seen · 197 lines · 44 tokens per session scan A b6fd96614c9b

Subscribe to this mod's changes

wpbakery-batch is a command published in the GitHub repository a8cteam51/claude-code-plugins (3 stars, last pushed 4d ago), licensed MIT. It adds 44 tokens to every session and 2,894 once invoked, about $0.0002 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.