wp-scaffold

A command that creates starter code for WordPress components such as plugins, themes, blocks, custom content types, taxonomies, REST endpoints, widgets, shortcodes, and WooCommerce features. WooCommerce is a WordPress system for running an online shop.

In plain words
What is it for?
Use it to start a WordPress plugin or theme, Gutenberg block, custom post type, taxonomy, API route, widget, shortcode, product tab, or performance-monitoring plugin.
Why use it?
It avoids repeatedly setting up the same file structure and basic security and coding patterns by hand.

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/iwritec0de/wp-dev/wp-scaffold
Clone the repo
git clone --depth 1 https://github.com/iwritec0de/wp-dev
Per session 26 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,534 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.00026 $0.01534
Opus 5 $0.00013 $0.00767
Sonnet 5 $0.00005 $0.00307
Haiku 4.5 $0.00003 $0.00153

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

Security

Grade A, and why

wp-scaffold 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 yesterday.

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-scaffold.md · 140 lines

How it starts

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

/wp-scaffold

Generate WordPress component boilerplate that follows WPCS and includes proper security patterns.

Load the wordpress-engineer, wordpress-standards, and wordpress-security skills for coding conventions, security patterns, and architecture guidance.

Usage

Parse the user's arguments to determine what to scaffold:

  • plugin <slug> — Full plugin boilerplate
  • theme <slug> — Full theme boilerplate
  • block <slug> — Gutenberg block (block.json, edit.js, save.js, render.php)
  • cpt <name> — Custom Post Type registration
  • taxonomy <name> — Custom Taxonomy registration
  • rest <route> — REST API endpoint
  • widget <name> — Widget class
  • shortcode <name> — Shortcode handler
  • woo-product-tab — WooCommerce product data tab
  • perf-monitor — Performance monitoring mu-plugin (REST API diagnostics)

Arguments

The user provides arguments after /wp-scaffold. For example: /wp-scaffold plugin my-cool-plugin

If no arguments are given, ask the user what they want to scaffold using AskUserQuestion.

Scaffold Specifications

Plugin (plugin <slug>)

Create the following files:

  1. <slug>/<slug>.php — Main plugin file with header comment, constants (VERSION, PATH, URL), activation/deactivation hooks, and main class instantiation
  2. <slug>/includes/class-<slug>.php — Main plugin class with init method, hook registration
  3. <slug>/uninstall.php — Cleanup file that checks WP_UNINSTALL_PLUGIN, deletes options and custom tables
  4. <slug>/readme.txt — WordPress.org readme template
  5. <slug>/languages/<slug>.pot — Empty POT file placeholder

All files must include:

  • File header DocBlock with @package, @since
  • Proper text domain matching the slug
  • Security: defined( 'ABSPATH' ) || exit; at the top of each PHP file
  • Prefixed functions/hooks using slug converted to snake_case

Theme (theme <slug>)

Create:

  1. <slug>/style.css — Theme header with Theme Name, Version, Text Domain, etc.
  2. <slug>/functions.php — Theme setup (add_theme_support), enqueue, widget areas
  3. <slug>/index.php — Basic template with the loop
  4. <slug>/header.php — Document head, wp_head(), site header
  5. <slug>/footer.php — Site footer, wp_footer()
  6. <slug>/single.php — Single post template
  7. <slug>/page.php — Page template
  8. <slug>/404.php — Not found template
  9. <slug>/sidebar.php — Sidebar template

Read the full file on GitHub · 140 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. yesterday First seen · 140 lines · 26 tokens per session scan A a5cd6693d1bc

Subscribe to this mod's changes

wp-scaffold is a command published in the GitHub repository iwritec0de/wp-dev (1 stars, last pushed 4mo ago), licensed MIT. It adds 26 tokens to every session and 1,534 once invoked, about $0.0001 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.

Related

Other commands, from other repositories