Scripts
Detect Block Themes19 skills · 52 min
Skills
Skill 7 of 19
Use when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troubleshooting (style…
2 minutes · 424 words · 13 sections
Install
npx skills add WordPress/agent-skills --skill wp-block-themesnpx skills add WordPress/agent-skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Use this skill for block theme work such as:
theme.json (presets, settings, styles, per-block styles)templates/*.html) and template parts (parts/*.html)patterns/*.php) and controlling what appears in the inserterstyles/*.json)node skills/wp-project-triage/scripts/detect_wp_project.mjsnode skills/wp-block-themes/scripts/detect_block_themes.mjsIf multiple themes exist, pick one and scope all changes to that theme root.
If you are creating a new block theme from scratch (or converting a classic theme):
theme.json schema versions differ.Read:
references/creating-new-block-theme.mdAfter creating the theme root, re-run detect_block_themes and continue below.
theme.json presenttemplates/ and/or parts/ presentRead:
references/debugging.md (style hierarchy + fastest checks)theme.json changes safelyDecide whether you are changing:
Read:
references/theme-json.mdtemplates/ and are HTML.parts/ and must not be nested in subdirectories.Read:
references/templates-and-parts.mdPrefer filesystem patterns under patterns/ when you want theme-owned patterns.
Read:
references/patterns.mdStyle 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.mdStart with:
references/debugging.mdCommon issues:
theme.json shape/typos prevent applicationIf upstream behavior is unclear, consult canonical docs:
theme.json, templates, patterns, and style variations.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).
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
skills/wp-block-themes/SKILL.mdtrunk, last pushed 23 September 2026.SKILL.md, not by matching a directory convention. One layout observed: skills/*/SKILL.md.h1 and no skipped levels:/WordPress/agent-skills.md, and each skill at its own .md URL.7 files · 10 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 7.
Documentation the agent loads on demand, rather than up front.
Executable code the skill can run.