wp-template

wp-template is a command for coding agents from siddik-web/wp-block-theme-converter. It costs 23 tokens per session (1,080 once invoked), scanned C, original, MIT.

A converter that turns one HTML page into a WordPress Full Site Editing template file. It chooses the matching template for a homepage, blog, article, archive, search page, 404 page, or product page.

In plain words
What is it for?
Use it to convert a single HTML page into templates such as front-page.html, single.html, archive.html, search.html, 404.html, or a WooCommerce product template.
Why use it?
It removes the need to manually translate page markup into WordPress template files and places the result in the theme's templates directory.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/siddik-web/wp-block-theme-converter/wp-template.svg)](https://agentmods.dev/commands/siddik-web/wp-block-theme-converter/wp-template)
Your own site
<a href="https://agentmods.dev/commands/siddik-web/wp-block-theme-converter/wp-template"><img src="https://agentmods.dev/badge/commands/siddik-web/wp-block-theme-converter/wp-template.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,080 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.00023 $0.01080
Opus 5 $0.00012 $0.00540
Sonnet 5 $0.00005 $0.00216
Haiku 4.5 $0.00002 $0.00108

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

Security

Grade C, and why

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

2. For `single.html` and `page.html`, use `<!-- wp:post-content /-->` for the editable content area
commands/wp-template.md · 131 lines

How it starts

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

/wp-template

Purpose: Convert a single HTML page into a WordPress FSE template (.html file in the theme's templates/ directory).

Trigger

User types /wp-template followed by an HTML page or URL.

Workflow

Step 1: Identify Template Type

From the HTML structure and content, determine which WordPress template to generate:

HTML Page Pattern Template File Notes
Homepage / landing front-page.html Static front page
Blog index / news listing home.html Latest posts
Single blog post / article single.html Uses core/post-content
About / Contact / static page page.html OR page-{slug}.html Custom = registered in theme.json
Category / tag / author archive archive.html Uses Query Loop
Search results search.html
404 page 404.html
Generic fallback index.html Required — every theme needs this
WooCommerce single product single-product.html Requires WC
WooCommerce product archive archive-product.html Requires WC

If unsure, ask: "Is this the homepage, a blog post layout, a static page, or something else?"

Step 2: Identify Shared Regions

Look for <header>, <footer>, sidebars. These should be extracted into template parts and referenced via:

<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
<!-- wp:template-part {"slug":"sidebar","tagName":"aside"} /-->

If template parts don't exist yet, generate them too and note that they go in parts/ not templates/.

Step 3: Convert Body to Block Markup

Apply the conversion map from references/block-conversion-map.md. Key rules:

  1. Wrap main content area in <!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
  2. For single.html and page.html, use <!-- wp:post-content /--> for the editable content area
  3. For home.html / archive.html, use <!-- wp:query --> (Query Loop) instead of hardcoded post markup
  4. For repeating sections, use <!-- wp:pattern {"slug":"theme-slug/pattern-name"} /-->
  5. Convert color classes to block attributes: class="text-primary"{"textColor":"primary"}
  6. Convert font sizes similarly: class="text-xl"{"fontSize":"large"}
  7. NEVER include <style> or <script> tags
  8. NEVER include style="" attributes — use block attributes

Read the full file on GitHub · 131 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 · 131 lines · 23 tokens per session scan C 7b9612021f44

Subscribe to this mod's changes

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