wp-custom-theme

wp-custom-theme is a skill for Claude Code from trtmn/agent-plugins. It costs 143 tokens per session (9,060 once invoked), scanned C, original, Unlicense.

A guide for building and maintaining custom WordPress themes, including PHP templates, site styling, and WordPress editing features.

In plain words
What is it for?
Use it to create or change templates such as header.php and single.php, add WordPress hooks, and style Gutenberg content.
Why use it?
It gives developers a structured way to choose a theme approach and handle common theme code, performance, and security work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the wp-custom-theme plugin — 1 skill shipped together

Good fit Use it to create or change templates such as header.php and single.php, add WordPress hooks, and style Gutenberg content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trtmn/agent-plugins/wp-custom-theme
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.

Any agent
npx skills add trtmn/agent-plugins --skill wp-custom-theme
Clone the repo
git clone --depth 1 https://github.com/trtmn/agent-plugins

Made for: Claude Code.

Or install wp-custom-theme, the plugin that ships this one along with the rest of its 1 skill.

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-custom-theme

README.md
[![agentmods](https://agentmods.dev/badge/skills/trtmn/agent-plugins/wp-custom-theme/github.svg)](https://agentmods.dev/skills/trtmn/agent-plugins/wp-custom-theme)
Your own site
<a href="https://agentmods.dev/skills/trtmn/agent-plugins/wp-custom-theme"><img src="https://agentmods.dev/badge/skills/trtmn/agent-plugins/wp-custom-theme/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-custom-theme

Your own site · 80×15
<a href="https://agentmods.dev/skills/trtmn/agent-plugins/wp-custom-theme"><img src="https://agentmods.dev/badge/skills/trtmn/agent-plugins/wp-custom-theme.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00143 $0.09060
Opus 5.5 $0.00057 $0.03624
Sonnet 5.5 $0.00029 $0.01812
Haiku 4.5 $0.00014 $0.00906

Measured 1mo ago against content hash 7b9e51ef5472, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

wp-custom-theme 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 1mo 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:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","inherit":true}} -->
plugins/wp-custom-theme/skills/wp-custom-theme/SKILL.md · 1,118 lines

How it starts

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

Custom WordPress Theme Skill

A comprehensive guide for creating and maintaining custom WordPress themes at an intermediate level, covering theme structure, PHP hooks & template tags, CSS/Gutenberg, and performance & security.


0. Discovery Interview (Start Here for New Themes)

Before writing any code, interview the user to understand their requirements. Use the answers to recommend the right theme approach (FSE, Classic, or Hybrid) and tailor the implementation.

Interview Questions

Ask these questions — you can combine them into a single message, but keep it conversational:

  1. Site type — What kind of site is this? (blog, portfolio, business/marketing, e-commerce, membership, news/magazine, or other)
  2. Client editing — Will the site owner / client edit pages and layouts themselves after launch, or is this developer-managed?
  3. Dynamic PHP logic — Does the theme need complex server-side logic in templates? (e.g. conditional content based on user roles, custom WP_Query loops, real-time data from external APIs)
  4. WordPress version — What WP version will this run on? (or: is the host keeping WP up to date?)
  5. Existing base — Starting from scratch, extending an existing theme, or building a child theme?
  6. Plugins — Any must-have plugins? (WooCommerce, ACF, Elementor, etc. — some conflict with FSE)
  7. Design complexity — Is this a pixel-perfect custom design, or is an opinionated block-based layout acceptable?

You do not need to ask all seven at once. Start with 1–4; follow up if answers are ambiguous.

FSE Recommendation Logic

After gathering answers, apply this decision table:

Signal Favours
Client will edit layouts/pages themselves FSE
New project on WP 6.4+ FSE
Design-focused, visually rich site FSE
No complex PHP needed in templates FSE
Complex PHP logic in templates (conditional output, custom queries) Classic
Legacy/existing classic theme being extended Classic
Page-builder plugin (Elementor, Divi) in use Classic
WooCommerce without FSE-compatible theme Classic (or verify plugin FSE support first)
Wants block editor design system, but keeps some PHP templates Hybrid
Migrating gradually from classic → FSE Hybrid

Read the full file on GitHub · 1,118 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. 1mo ago First seen · 1,118 lines · 143 tokens per session scan C 7b9e51ef5472

Subscribe to this mod's changes

wp-custom-theme is a skill published in the GitHub repository trtmn/agent-plugins (2 stars, last pushed 11d ago), licensed Unlicense. It adds 143 tokens to every session and 9,060 once invoked, about $0.0006 per session on Opus 5.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-31.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards…

vercel/next.js · 123 tokens