wp-migrate

wp-migrate is a command for coding agents from siddik-web/wp-block-theme-converter. It costs 29 tokens per session (4,245 once invoked), scanned C, original, MIT.

A migration tool for moving existing WordPress content into a block theme. It covers content from the Classic Editor, widgets, custom fields, shortcodes, page builders, and custom content types.

In plain words
What is it for?
Use it to turn classic posts into block-editor content, replace widgets or shortcodes, connect custom fields, or display custom post types through block templates and query lists.
Why use it?
It helps preserve and expose existing site content when changing to a block-based theme instead of rebuilding that content manually.

Command

Part of the wp-block-theme-converter plugin — 1 skill, 11 commands, 1 agent, 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/siddik-web/wp-block-theme-converter/wp-migrate
Clone the repo
git clone --depth 1 https://github.com/siddik-web/wp-block-theme-converter

Or install wp-block-theme-converter, the plugin that ships this one along with the rest of its 1 skill, 11 commands, 1 agent, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/siddik-web/wp-block-theme-converter/wp-migrate.svg)](https://agentmods.dev/commands/siddik-web/wp-block-theme-converter/wp-migrate)
Your own site
<a href="https://agentmods.dev/commands/siddik-web/wp-block-theme-converter/wp-migrate"><img src="https://agentmods.dev/badge/commands/siddik-web/wp-block-theme-converter/wp-migrate.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,245 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00029 $0.04245
Opus 5 $0.00015 $0.02122
Sonnet 5 $0.00006 $0.00849
Haiku 4.5 $0.00003 $0.00424

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

Security

Grade C, and why

wp-migrate scanned grade C 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 5d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- wp:paragraph { "metadata": { "bindings": { "content": { "source": "core/post-meta", "args": { "key": "{{meta_key}}" } } } } } -->
commands/wp-migrate.md · 488 lines

How it starts

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

/wp-migrate

Purpose: Generate the code, queries, and patterns needed to migrate existing WordPress content — classic editor posts, widget areas, ACF fields, shortcodes, or Custom Post Types — into the new block theme structure.

When to Use

Trigger this command when:

  • The user has an existing WordPress site (not a static HTML project) they are upgrading to a block theme
  • The user wants to convert Classic Editor content to block editor content
  • The user has custom fields (ACF, CMB2, Meta Box) they want to surface via Block Bindings API
  • The user has widget areas they want to replace with template parts
  • The user has shortcodes they want to replace with blocks or patterns
  • The user has a Custom Post Type they want to surface via Query Loop or a custom dynamic block

This command is NOT for converting static HTML → WordPress (use /convert-to-wp-theme for that).

Page Builder Detection

If the user mentions or you detect a page builder in scope, load references/page-builder-migration.md before Step 2. That reference contains per-builder playbooks with element→block mapping tables, WP-CLI extraction commands, and worked examples. Use the builder-specific workflow from that reference instead of the generic approach below for content extraction.

Builder detected Action
Elementor / Elementor Pro Load page-builder-migration.md §1
Divi / Divi Builder Load page-builder-migration.md §2
WPBakery / Visual Composer Load page-builder-migration.md §3
Beaver Builder / BB Themer Load page-builder-migration.md §4
Classic Gutenberg (no builder) Load page-builder-migration.md §5
None / unknown Continue with generic workflow below

Workflow

Step 1: Identify Migration Scope

Ask (or infer from context):

Question Why it matters
WordPress version currently running Determines available migration tools
Active page builder (Elementor, Divi, Beaver Builder, WPBakery, none) Different conversion strategies per builder — see page-builder-migration.md
Using Classic Editor or already using Gutenberg? Classic content needs block conversion
Custom Post Types (CPTs) — list their slugs Need Query Loop templates or custom blocks
Custom fields plugin (ACF, CMB2, Meta Box, Pods, none) Determines Block Bindings approach
Widget areas — list names and their content Become template parts in block theme
Shortcodes in use — list them Need block or pattern equivalents
How many posts/pages need migration (estimate) Batch vs programmatic migration
WooCommerce products? WooCommerce-specific template migration

Read the full file on GitHub · 488 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. 5d ago First seen · 488 lines · 29 tokens per session scan C d736a081a0b4

Subscribe to this mod's changes

wp-migrate is a command published in the GitHub repository siddik-web/wp-block-theme-converter (45 stars, last pushed 3mo ago), licensed MIT. It adds 29 tokens to every session and 4,245 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.