Agent Skill · WordPress

wp-block-themes

Use when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troubleshooting (style hierarchy, overrides, caching).

Provider: WordPress Path in repo: skills/wp-block-themes/SKILL.md

Skill body

WP Block Themes

When to use

Use this skill for block theme work such as:

Inputs required

Procedure

0) Triage and locate block theme roots

  1. Run triage:
    • node skills/wp-project-triage/scripts/detect_wp_project.mjs
  2. 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):

Read:

After creating the theme root, re-run detect_block_themes and continue below.

2) Confirm theme type and override expectations

Read:

3) Make theme.json changes safely

Decide whether you are changing:

Read:

4) Templates and template parts

Read:

5) Patterns

Prefer filesystem patterns under patterns/ when you want theme-owned patterns.

Read:

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:

Verification

Failure modes / debugging

Start with:

Common issues:

Escalation

If upstream behavior is unclear, consult canonical docs:

Skill frontmatter

compatibility: Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node. Some workflows require WP-CLI.