Wp Block Themes
WordPressOfficialPublished by WordPress
- Skill
- Tool integration
- Software development
- GPL-2.0-or-later
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to building and maintaining WordPress block themes. It covers the essential filesystem architecture, including theme.json configuration, HTML-based templates and template parts, pattern registration, and style variations. It also includes diagnostic procedures for troubleshooting common issues like style overrides, incorrect file placement, and caching behaviors within the WordPress Site Editor.
What it does
- Guides the creation of new block themes using standard filesystem structures.
- Facilitates the editing of theme.json for global settings and block-specific styles.
- Manages the organization of HTML templates and template parts.
- Assists in registering and implementing theme-owned patterns.
- Provides debugging steps for style hierarchy and user-customization conflicts.
- Identifies active theme roots and validates project structure.
When to use it
- When developing a new WordPress block theme from scratch.
- When modifying global styles or settings via theme.json.
- When creating or updating custom templates and template parts.
- When troubleshooting why theme changes are not appearing in the Site Editor.
- When implementing or updating theme-specific style variations.
Advantages
- Ensures adherence to correct WordPress block theme directory structures.
- Provides clear hierarchy awareness to avoid common style override pitfalls.
- Standardizes the process for theme configuration and pattern management.
- Includes specific diagnostic paths for common theme development failures.
Usage examples
- “Help me set up a new block theme structure.”
- The agent will guide you through creating the required theme folder, style.css, theme.json, and the necessary templates/parts directories.
- “My theme.json changes are not showing up in the Site Editor.”
- The agent will walk you through the style hierarchy, checking for user-level overrides and validating your theme.json syntax.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/wordpress/wp-block-themes/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip wp-block-themes.zip -d .agents/skills
Documentation by WordPress
WP Block Themes
When to use
Use this skill for block theme work such as:
editing
theme.json(presets, settings, styles, per-block styles)adding or changing templates (
templates/*.html) and template parts (parts/*.html)adding patterns (
patterns/*.php) and controlling what appears in the inserteradding style variations (
styles/*.json)debugging “styles not applying” / “editor doesn’t reflect theme.json”
Inputs required
Repo root and which theme is targeted (theme directory if multiple exist).
Target WordPress version range (theme.json version and features vary by core version).
Where the issue manifests: Site Editor, post editor, frontend, or all.
Procedure
0) Triage and locate block theme roots
Run triage:
node skills/wp-project-triage/scripts/detect_wp_project.mjs
Detect theme roots + key folders:
node skills/wp-block-themes/scripts/detect_block_themes.mjs
If multiple themes exist, pick one and scope all changes to that theme root.
1) Create a new block theme (if needed)
If you are creating a new block theme from scratch (or converting a classic theme):
Prefer starting from a known-good scaffold (or exporting from a WP environment) rather than guessing file layout.
Be explicit about the minimum supported WordPress version because
theme.jsonschema versions differ.
Read:
references/creating-new-block-theme.md
After creating the theme root, re-run detect_block_themes and continue below.
2) Confirm theme type and override expectations
Block theme indicators:
theme.jsonpresenttemplates/and/orparts/present
Remember the style hierarchy:
core defaults → theme.json → child theme → user customizations
user customizations can make theme.json edits appear “ignored”
Read:
references/debugging.md(style hierarchy + fastest checks)
3) Make theme.json changes safely
Decide whether you are changing:
settings (what the UI allows): presets, typography scale, colors, layout, spacing
styles (how it looks by default): CSS-like rules for elements/blocks
Read:
references/theme-json.md
4) Templates and template parts
Templates live under
templates/and are HTML.Template parts live under
parts/and must not be nested in subdirectories.
Read:
references/templates-and-parts.md
5) Patterns
Prefer filesystem patterns under patterns/ when you want theme-owned patterns.
Read:
references/patterns.md
6) Style variations
Style variations are JSON files under styles/. Note: once a user picks a style variation, that selection is stored in the DB, so changing the file may not “update what the user sees” automatically.
Read:
references/style-variations.md
Verification
Site Editor reflects changes where expected (Styles UI, templates, patterns).
Frontend renders with expected styles.
If styles aren’t changing, confirm whether user customizations override theme defaults.
Run the repo’s build/lint scripts if assets are involved (fonts, custom JS/CSS build).
Failure modes / debugging
Start with:
references/debugging.md
Common issues:
wrong theme root (editing an inactive theme)
user customizations override your defaults
invalid
theme.jsonshape/typos prevent applicationtemplates/parts in wrong folders (or nested parts)
Escalation
If upstream behavior is unclear, consult canonical docs:
Theme Handbook and Block Editor Handbook for
theme.json, templates, patterns, and style variations.
Files
- ATTRIBUTION.mdAdded by AutoGineer894 B
- LICENSELicence file added by AutoGineer750 B
- SKILL.md3.9 KiB
- references/creating-new-block-theme.md1.3 KiB
- references/debugging.md1008 B
- references/patterns.md592 B
- references/style-variations.md439 B
- references/templates-and-parts.md442 B
- references/theme-json.md3.4 KiB
- scripts/detect_block_themes.mjsScript2.7 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
The author says: Targets WordPress 7.0+ (PHP 7.4.0+). Filesystem-based agent with bash + node. Some workflows require WP-CLI.
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- WordPress
- Publisher
- WordPress (Official)
- Source
- WordPress/agent-skills · skills/wp-block-themes · commit 7374e6f
- Licence
- GNU General Public License v2.0 or later (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by WordPress.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download wp-block-themes.zip