wp-block

wp-block is a command for coding agents from siddik-web/wp-block-theme-converter. It costs 30 tokens per session (2,730 once invoked), scanned A, original, MIT.

A command that creates the files needed for a custom WordPress block, such as its metadata, editor code, display code, and styles. A custom block is a new content component when WordPress's built-in blocks are not enough.

In plain words
What is it for?
Use it to scaffold static or server-rendered blocks, custom editor interfaces, blocks backed by REST data, and blocks registered by a plugin.
Why use it?
It provides a starting structure for custom functionality while encouraging developers to use simpler built-in blocks or patterns when those are sufficient.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/siddik-web/wp-block-theme-converter/wp-block.svg)](https://agentmods.dev/commands/siddik-web/wp-block-theme-converter/wp-block)
Your own site
<a href="https://agentmods.dev/commands/siddik-web/wp-block-theme-converter/wp-block"><img src="https://agentmods.dev/badge/commands/siddik-web/wp-block-theme-converter/wp-block.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 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,730 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.1 $0.00030 $0.02730
Opus 5 $0.00015 $0.01365
Sonnet 5 $0.00006 $0.00546
Haiku 4.5 $0.00003 $0.00273

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

Security

Grade A, and why

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

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.

commands/wp-block.md · 333 lines

How it starts

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

/wp-block

Purpose: Scaffold a custom WordPress block — block.json, edit.js, save.js or render.php, style.css, and editor.css — ready to register inside a block theme.

When to Use

Use this command when no core block (or combination of core blocks in a pattern) satisfies the requirement. Ask before scaffolding a custom block:

"This interaction/layout could also be achieved with a core/group + Interactivity API pattern. Do you want a custom block, or would a block pattern be simpler?"

Only proceed with a custom block if the user confirms or the use case clearly requires it (e.g., server-side dynamic rendering with custom REST data, deeply custom editor UI, registering a new block type for a plugin).

Workflow

Step 1: Gather Block Requirements

Ask (or infer from context):

Question Default if silent
Block name (human-readable) Required — always ask
Block slug (namespace/block-name) Derive from theme slug + block name
Block category theme
Block type: static (save.js renders HTML) or dynamic (render.php renders HTML server-side) Ask — explain the tradeoff below
Attributes needed Infer from description
Supports needed (innerBlocks, align, color, typography, spacing) Minimal — only what's asked
Icon block-default (dashicons slug)
Keywords 3 inferred from block name

Static vs Dynamic — explain the tradeoff:

Static Block Dynamic Block
Output stored in Post content (HTML) Database (attributes only)
Re-renders when Post saved Every page load
Best for Design components (hero, card, CTA) Data-driven content (recent posts, live inventory)
save.js Required Must return null
render.php Not used Required

Step 2: Plan the Block Structure

State the file list before generating:

BLOCK PLAN: {{namespace}}/{{block-name}}
Type: Static | Dynamic
Files to generate:
  blocks/{{block-name}}/block.json
  blocks/{{block-name}}/edit.js
  blocks/{{block-name}}/save.js          (static only)
  blocks/{{block-name}}/render.php       (dynamic only)
  blocks/{{block-name}}/style.css
  blocks/{{block-name}}/editor.css
  inc/block-registration.php             (only if not already present)
Attributes: [list]
Supports: [list]

Read the full file on GitHub · 333 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 · 333 lines · 30 tokens per session scan A c2cdfd483fa1

Subscribe to this mod's changes

wp-block is a command published in the GitHub repository siddik-web/wp-block-theme-converter (45 stars, last pushed 3mo ago), licensed MIT. It adds 30 tokens to every session and 2,730 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-30.