wp-cpt

wp-cpt is a command for Claude Code from yojahny55/claude-wp-builder. It costs 25 tokens per session (3,253 once invoked), scanned A, original, MIT.

A WordPress command that creates a custom content type, such as “projects” or “services,” along with its fields and display templates.

In plain words
What is it for?
Use it to create a custom post type, generate its ACF fields, archive and single templates, optionally add a homepage teaser section, and create sample content.
Why use it?
It removes the repetitive setup needed to register the content type and build the pages that list and display its entries.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-wp-builder plugin — 15 skills, 30 commands, 15 agents shipped together

Good fit Use it to create a custom post type, generate its ACF fields, archive and single templates, optionally add a homepage teaser section, and create sample content.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add yojahny55/claude-wp-builder
Claude Code
/plugin install claude-wp-builder

Made for: Claude Code.

Or install claude-wp-builder, the plugin that ships this one along with the rest of its 15 skills, 30 commands, 15 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-cpt/github.svg)](https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-cpt)
Your own site
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-cpt"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-cpt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-cpt

Your own site · 80×15
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-cpt"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-cpt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,253 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00025 $0.03253
Opus 5 $0.00013 $0.01626
Sonnet 5 $0.00005 $0.00651
Haiku 4.5 $0.00003 $0.00325

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

Security

Grade A, and why

wp-cpt 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-cpt.md · 224 lines

How it starts

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

WP CPT — Custom Post Type Builder

Register a custom post type and generate everything it needs: registration, ACF fields bound to the type, archive + single templates, an optional home/teaser query-section, and a seed helper.

Step 1: Parse Arguments

  • First word = CPT name, singular lowercase (e.g., team, service, project). Required.
  • --no-teaser = skip the teaser query-section.
  • --from-demo <section-name> = read field/seed hints from that section in demo/index.html.

If no name: print usage error and exit.

Step 2: Read Project Context

Read .claude/CLAUDE.md for function prefix, theme slug, languages, theme directory. If missing, tell the user to run /wp-init first and exit.

CSS agent routing

Read Template: from .claude/CLAUDE.md. When Template: is tailwind, dispatch wp-tailwind; when it is basic, dispatch wp-css.

  • basic → dispatch wp-css exactly as described below.
  • tailwind → dispatch wp-tailwind in author mode instead, passing the CPT name (which selects components/<name>.css) and the block name. The agent reads skills/wp-tailwind-system/SKILL.md for the decision ladder. It writes utility classes into the markup and only adds @apply rules where the ladder demands them. It must never write assets/css/styles.css.

Dispatch exactly one of the two, never both.

Every tailwind dispatch opens its quoted prompt with this line, verbatim:

Mode: author

The quoted prompt it opens is the one under "The tailwind prompt body" below — not the quoted prompt at the dispatch site, which is the basic branch's and names assets/css/styles.css, the one file the tailwind path must never write.

agents/wp-tailwind.md gates Section Authoring Mode on that line and on nothing else, so the line is not decoration: omit it and the dispatched agent falls into Demo Conversion Mode, reads the prompt as a demo-file conversion and writes a .tmp nobody asked for. A bare author anywhere else in the prompt — in prose, or inside an input path like demo/author.html — selects nothing, precisely so that an ordinary demo page named after the word cannot flip the mode by accident.

Read the full file on GitHub · 224 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 Changed · +13 lines 628c98b59da2
  2. 8d ago First seen · 211 lines · 25 tokens per session scan A 4a2c3bfb824c

Subscribe to this mod's changes

wp-cpt is a command published in the GitHub repository yojahny55/claude-wp-builder (6 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 3,253 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.