WooCommerce Code Review
woocommerce/woocommerce
Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.
WordPress theme code review and block theme development patterns for WordPress 6.6+.
$ npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jorgerosal/wordpress-skills wp-theme-development --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jorgerosal/wordpress-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/claude-skills/wp-theme-development .claude/skills/wp-theme-development && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "wp-theme-development" agent skill from https://github.com/jorgerosal/wordpress-skills/tree/main/claude-skills/wp-theme-development into .claude/skills/wp-theme-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wp-theme-development", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jorgerosal/wordpress-skills/tree/main/claude-skills/wp-theme-developmentType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jorgerosal/wordpress-skills wp-theme-development --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jorgerosal/wordpress-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/claude-skills/wp-theme-development .agents/skills/wp-theme-development && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "wp-theme-development" agent skill from https://github.com/jorgerosal/wordpress-skills/tree/main/claude-skills/wp-theme-development into .agents/skills/wp-theme-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wp-theme-development", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jorgerosal/wordpress-skills wp-theme-development --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jorgerosal/wordpress-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/claude-skills/wp-theme-development .cursor/skills/wp-theme-development && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "wp-theme-development" agent skill from https://github.com/jorgerosal/wordpress-skills/tree/main/claude-skills/wp-theme-development into .cursor/skills/wp-theme-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wp-theme-development", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jorgerosal/wordpress-skills.git --path claude-skills/wp-theme-development--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jorgerosal/wordpress-skills wp-theme-development --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jorgerosal/wordpress-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/claude-skills/wp-theme-development .gemini/skills/wp-theme-development && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "wp-theme-development" agent skill from https://github.com/jorgerosal/wordpress-skills/tree/main/claude-skills/wp-theme-development into .gemini/skills/wp-theme-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wp-theme-development", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jorgerosal/wordpress-skills wp-theme-developmentInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jorgerosal/wordpress-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/claude-skills/wp-theme-development .github/skills/wp-theme-development && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "wp-theme-development" agent skill from https://github.com/jorgerosal/wordpress-skills/tree/main/claude-skills/wp-theme-development into .github/skills/wp-theme-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wp-theme-development", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jorgerosal/wordpress-skills wp-theme-development --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jorgerosal/wordpress-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/claude-skills/wp-theme-development .opencode/skills/wp-theme-development && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "wp-theme-development" agent skill from https://github.com/jorgerosal/wordpress-skills/tree/main/claude-skills/wp-theme-development into .opencode/skills/wp-theme-development/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wp-theme-development", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
wp-theme-developmentWordPress theme code review and block theme development patterns for WordPress 6.6+.
Wp Theme Development is an agent skill from jorgerosal/wordpress-skills. WordPress theme code review and block theme development patterns for WordPress 6.6+. Use when reviewing theme code, auditing theme.json schema, checking template hierarchy, validating block templates, analyzing global styles, verifying style variations, reviewing template parts, detecting hardcoded styles, checking classic-to-block migration, or when user mentions "theme review", "theme development", "theme.json", "block theme", "FSE", "Full Site Editing", "template parts", "template hierarchy", "global styles"…
Its SKILL.md is about 12k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/classic-to-block-guide.md`, `references/fse-guide.md` and `references/template-patterns.md`).
It sits in Development, covering Code review. It works with WordPress and PHP. The repository describes itself as: ✅ 🎉 Claude skills and Codex skills for Wordpress development❗️. The licence is MIT.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 8c96442. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
rgFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
schemas.wp.orggnu.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Wp Theme Development loads about 12k tokens when it runs, and up to ~39k if it reads all its reference files. Until then it costs about 218 tokens; SKILL.md has 2,786 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jorgerosal/wordpress-skills at commit 8c96442, republished under its MIT licence (© jorgerosal). 2,786 words, ~11,937 tokens.
.claude/skills/wp-theme-development/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Systematic theme development review for WordPress 6.6+ with primary focus on block themes (Full Site Editing) and secondary coverage of classic themes for migration guidance. Core principle: WordPress themes have undergone a paradigm shift—block themes use HTML templates with block markup and theme.json for global settings/styles, replacing PHP templates and add_theme_support() calls. theme.json v3 is the single source of truth for design configuration. Review validates theme.json structure, block template hierarchy (HTML files in templates/), template parts (parts/), global styles, style variations, block patterns in themes, child theme compatibility, and classic-to-block migration opportunities. Auto-detects theme type (block/classic/hybrid/child/WordPress.org) and adjusts guidance accordingly. Report findings grouped by file (PHP, HTML template, JSON files intermixed by actual path) with line numbers, severity labels (CRITICAL/WARNING/INFO), and BAD/GOOD code pairs.
Note: This skill reviews PHP files (functions.php, classic templates), HTML block template files (templates/, parts/), JSON files (theme.json, style variations), and PHP pattern files (patterns/). PHP follows WordPress PHP Coding Standards (spaces in parentheses, array() not [], Yoda conditions). HTML templates use valid block markup. JSON follows theme.json v3 schema.
Use when:
Don't use for:
Follow this seven-step workflow for systematic theme reviews:
Identify theme type and context (THM-01)
Auto-detection pattern:
# Block theme detection
[ -f templates/index.html ] && [ -f theme.json ] && echo "Block theme"
# Classic theme detection
[ -f index.php ] && [ ! -d templates ] && echo "Classic theme"
# Hybrid theme detection
[ -f index.php ] && [ -f theme.json ] && [ ! -d templates ] && echo "Hybrid theme"
# Child theme detection
grep -q "^Template:" style.css && echo "Child theme"Validate theme.json schema (THM-02, THM-03, THM-04, THM-05)
Check template hierarchy (THM-06, THM-07)
Check template parts (THM-08)
<!-- wp:template-part --> blocksScan for CRITICAL/WARNING/INFO patterns
Apply context-aware severity adjustments
Report with cross-references
/wp-sec-review for comprehensive security analysis."/wp-plugin-review for plugin development guidance."/wp-block-review for block development guidance."version field:
"version": 3$schema field:
"$schema": "https://schemas.wp.org/trunk/theme.json"settings.color:
settings.typography:
"defaultFontSizes": false → WordPress defaults override theme sizessettings.spacing:
"defaultSpacingSizes": false → WordPress defaults override theme sizessettings.layout:
"contentSize": "640px", "wideSize": "1200px"settings.useRootPaddingAwareAlignments:
styles section:
var(--wp--preset--color--primary) not "#0073aa"templateParts array:
customTemplates array:
Required header fields:
Block theme style patterns:
Classic theme style patterns:
Child theme patterns:
Required template:
Template file naming:
Block markup validation:
Template part usage:
<!-- wp:template-part {"slug":"header","area":"header"} /-->useBlockProps equivalent:
Template part files:
Area designation:
Block markup:
ABSPATH check:
defined( 'ABSPATH' ) || exit; → Direct file access possibleBlock theme setup:
Classic theme setup:
Theme hooks:
Asset enqueuing:
Pattern file headers:
Pattern file structure:
<?php ?> tags for PHP code, then block markupBlock markup in patterns:
get_theme_file_uri(), esc_url(), esc_html(), translation functionsPattern registration:
Variation file structure:
Variation naming:
Variation schema:
Child theme detection:
Template overrides:
Child theme compatibility:
Use these rg commands and shell checks for quick theme scanning. Organized by severity. Cover PHP, HTML template, and JSON files.
# Missing required files for block theme
[ ! -f templates/index.html ] && [ -f theme.json ] && echo "CRITICAL: Block theme missing templates/index.html"
[ ! -f theme.json ] && [ -d templates ] && echo "CRITICAL: templates/ exists but theme.json missing"
# Missing required files for classic theme
[ ! -f index.php ] && [ ! -d templates ] && echo "CRITICAL: Classic theme missing index.php"
# theme.json with invalid or missing version
test -f theme.json && ! rg -q "\"version\"" theme.json && echo "CRITICAL: theme.json missing version"
rg -n "\"version\": 1" theme.json # Deprecated
rg -n "\"version\": [^23]" theme.json # Invalid version
# Missing style.css required header
test -f style.css && ! rg -q "Theme Name:" style.css && echo "CRITICAL: style.css missing Theme Name header"
# v3 theme.json with custom fontSizes but missing defaultFontSizes: false
rg -n "\"fontSizes\"" theme.json
# Manual follow-up: if custom fontSizes are defined, confirm defaultFontSizes is explicitly false.
# v3 theme.json with custom spacingSizes but missing defaultSpacingSizes: false
rg -n "\"spacingSizes\"" theme.json
# Manual follow-up: if custom spacingSizes are defined, confirm defaultSpacingSizes is explicitly false.
# Child theme missing Template header
test -f style.css && ! rg -q "Template:" style.css && echo "CRITICAL: If this is a child theme, style.css is missing Template header"# theme.json version 2 (should upgrade to v3)
rg -n "\"version\": 2" theme.json
# Hardcoded inline styles in block templates
rg -n "style=\"" templates/ parts/ -g '*.html'
# Hardcoded color hex values in templates
rg -n "#[0-9a-fA-F]{6}" templates/ parts/ -g '*.html'
# Hardcoded pixel font sizes in templates
rg -n "font-size:\s*[0-9]+px" templates/ parts/ -g '*.html'
# Root padding without useRootPaddingAwareAlignments
rg -n "\"padding\"" theme.json
# Manual follow-up: if root padding is present, confirm useRootPaddingAwareAlignments is enabled.
# useRootPaddingAwareAlignments with CSS shorthand padding (won't work)
rg -n "useRootPaddingAwareAlignments.*true" theme.json
rg -n "\"padding\":\s*\"" theme.json
# Block theme with add_theme_support() that should be in theme.json
rg -n "add_theme_support.*editor-color-palette" functions.php
rg -n "add_theme_support.*editor-font-sizes" functions.php
rg -n "add_theme_support.*custom-line-height" functions.php
rg -n "add_theme_support.*custom-spacing" functions.php
# Missing ABSPATH check in functions.php
test -f functions.php && ! sed -n '1,10p' functions.php | rg -q "defined.*ABSPATH" && echo "WARNING: functions.php missing ABSPATH check in first 10 lines"
# Pattern file without required headers
rg -L "Title:" patterns -g '*.php'
rg -L "Slug:" patterns -g '*.php'# Missing $schema in theme.json
test -f theme.json && ! rg -q "\"\\$schema\"" theme.json && echo "INFO: theme.json missing \$schema"
# Missing style variations directory
[ ! -d styles ] && echo "INFO: Could add style variations in styles/"
# Missing block patterns directory
[ ! -d patterns ] && echo "INFO: Could add block patterns in patterns/"
# Missing templateParts registration in theme.json
test -f theme.json && ! rg -q "\"templateParts\"" theme.json && echo "INFO: theme.json missing templateParts registration"
# Missing customTemplates registration in theme.json
test -f theme.json && ! rg -q "\"customTemplates\"" theme.json && echo "INFO: theme.json missing customTemplates registration"
# Google Fonts CDN usage (could use local fonts)
rg -n "fonts.googleapis.com" .
# Classic theme without theme.json (could be hybrid)
[ -f index.php ] && [ ! -f theme.json ] && echo "INFO: Classic theme could add theme.json for block editor support"Note: HTML template patterns require different regex than PHP. Use --include="*.html" for templates, --include="*.php" for PHP files, --include="*.json" for theme.json and variations.
Context-aware review notes based on detected theme type:
Structure: templates/index.html + theme.json + style.css, optional parts/, patterns/, styles/ Review focus:
Structure: index.php + style.css + functions.php, header.php, footer.php, template files Review focus:
Structure: index.php + theme.json + functions.php (classic templates with theme.json) Review focus:
Structure: style.css with "Template:" header, optional template overrides Review focus:
Structure: Any theme type but stricter standards Review focus:
Common theme patterns organized by concern. PHP examples use WordPress PHP Coding Standards (spaces in parentheses, array() not [], Yoda conditions). HTML templates use valid block markup. JSON examples use valid theme.json v3 syntax.
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"settings": {
"appearanceTools": true,
"useRootPaddingAwareAlignments": true,
"color": {
"defaultPalette": false,
"palette": [
{
"slug": "primary",
"color": "#0073aa",
"name": "Primary"
},
{
"slug": "secondary",
"color": "#005177",
"name": "Secondary"
},
{
"slug": "foreground",
"color": "#333333",
"name": "Foreground"
},
{
"slug": "background",
"color": "#ffffff",
"name": "Background"
}
]
},
"typography": {
"defaultFontSizes": false,
"fluid": true,
"fontFamilies": [
{
"fontFamily": "\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif",
"name": "Inter",
"slug": "inter",
"fontFace": [
{
"fontFamily": "Inter",
"fontWeight": "400",
"fontStyle": "normal",
"src": [ "file:./assets/fonts/inter-regular.woff2" ]
},
{
"fontFamily": "Inter",
"fontWeight": "700",
"fontStyle": "normal",
"src": [ "file:./assets/fonts/inter-bold.woff2" ]
}
]
}
],
"fontSizes": [
{
"slug": "small",
"size": "0.875rem",
"name": "Small"
},
{
"slug": "medium",
"size": "1rem",
"name": "Medium"
},
{
"slug": "large",
"size": "1.5rem",
"name": "Large"
}
]
},
"spacing": {
"defaultSpacingSizes": false,
"spacingSizes": [
{
"slug": "30",
"size": "1rem",
"name": "Small"
},
{
"slug": "40",
"size": "1.5rem",
"name": "Medium"
},
{
"slug": "50",
"size": "2rem",
"name": "Large"
}
],
"units": [ "px", "rem", "vh", "vw", "%" ]
},
"layout": {
"contentSize": "640px",
"wideSize": "1200px"
},
"border": {
"radius": true,
"color": true,
"style": true,
"width": true
}
},
"styles": {
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--foreground)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--inter)",
"fontSize": "var(--wp--preset--font-size--medium)",
"lineHeight": "1.6"
},
"spacing": {
"padding": {
"top": "var(--wp--preset--spacing--50)",
"right": "var(--wp--preset--spacing--50)",
"bottom": "var(--wp--preset--spacing--50)",
"left": "var(--wp--preset--spacing--50)"
}
},
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--primary)"
}
},
"heading": {
"typography": {
"fontWeight": "700",
"lineHeight": "1.2"
}
}
},
"blocks": {
"core/button": {
"color": {
"background": "var(--wp--preset--color--primary)",
"text": "var(--wp--preset--color--background)"
}
}
}
},
"customTemplates": [
{
"name": "page-no-title",
"title": "Page Without Title",
"postTypes": [ "page" ]
}
],
"templateParts": [
{
"name": "header",
"title": "Header",
"area": "header"
},
{
"name": "footer",
"title": "Footer",
"area": "footer"
}
]
}❌ BAD: Hardcoded inline styles defeat theme.json
<!-- wp:template-part {"slug":"header"} /-->
<main style="max-width: 1200px; margin: 0 auto; padding: 2rem; color: #333;">
<h1 style="font-size: 32px; color: #0073aa;">Post Title</h1>
<div style="font-size: 16px; line-height: 1.6;">
<!-- wp:post-content /-->
</div>
</main>
<!-- wp:template-part {"slug":"footer"} /-->✅ GOOD: Use block attributes and theme.json presets
<!-- wp:template-part {"slug":"header","area":"header"} /-->
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
<main class="wp-block-group">
<!-- wp:post-title {"level":1} /-->
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:post-author {"showAvatar":true} /-->
<!-- wp:post-date /-->
</div>
<!-- /wp:group -->
<!-- wp:post-content {"layout":{"type":"constrained"}} /-->
</main>
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","area":"footer"} /-->❌ BAD: Hardcoded colors and spacing
<div style="background: #ffffff; padding: 20px; border-bottom: 1px solid #cccccc;">
<div style="max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between;">
<h1 style="font-size: 24px; color: #0073aa;">Site Title</h1>
<nav>Navigation</nav>
</div>
</div>✅ GOOD: Use block attributes with theme.json preset references
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull">
<!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:site-logo {"width":60} /-->
<!-- wp:site-title {"level":0} /-->
<!-- wp:navigation {"layout":{"type":"flex","orientation":"horizontal"}} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->❌ BAD: Root padding without useRootPaddingAwareAlignments
{
"version": 3,
"styles": {
"spacing": {
"padding": {
"left": "2rem",
"right": "2rem"
}
}
}
}Result: Full-width blocks have white space on left/right edges
❌ BAD: useRootPaddingAwareAlignments with CSS shorthand
{
"version": 3,
"settings": {
"useRootPaddingAwareAlignments": true
},
"styles": {
"spacing": {
"padding": "2rem"
}
}
}Result: Won't work, must use object notation
✅ GOOD: useRootPaddingAwareAlignments with object notation
{
"version": 3,
"settings": {
"useRootPaddingAwareAlignments": true
},
"styles": {
"spacing": {
"padding": {
"top": "var(--wp--preset--spacing--50)",
"right": "var(--wp--preset--spacing--50)",
"bottom": "var(--wp--preset--spacing--50)",
"left": "var(--wp--preset--spacing--50)"
}
}
}
}❌ BAD: Upgrading version without adjusting defaults
{
"version": 3,
"settings": {
"typography": {
"fontSizes": [
{ "slug": "small", "size": "14px" },
{ "slug": "medium", "size": "16px" }
]
}
}
}Result: WordPress default font sizes also appear, theme sizes don't override
✅ GOOD: v3 with explicit defaultFontSizes: false
{
"version": 3,
"settings": {
"typography": {
"defaultFontSizes": false,
"fontSizes": [
{ "slug": "small", "size": "0.875rem", "name": "Small" },
{ "slug": "medium", "size": "1rem", "name": "Medium" }
]
},
"spacing": {
"defaultSpacingSizes": false,
"spacingSizes": [
{ "slug": "30", "size": "1rem", "name": "Small" }
]
}
}
}❌ BAD: Pattern without required headers
<?php
// Missing Title and Slug headers
?>
<!-- wp:cover -->
<div class="wp-block-cover">
<h1>Welcome</h1>
</div>
<!-- /wp:cover -->✅ GOOD: Complete pattern with headers and dynamic values
<?php
/**
* Title: Hero Section
* Slug: mytheme/hero
* Categories: featured, banner
* Keywords: hero, banner, header
* Block Types: core/cover
* Viewport Width: 1400
* Description: Full-width hero section with heading and CTA
*/
?>
<!-- wp:cover {"url":"<?php echo esc_url( get_theme_file_uri( 'assets/images/hero.jpg' ) ); ?>","dimRatio":50,"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}}} -->
<div class="wp-block-cover alignfull">
<span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span>
<img class="wp-block-cover__image-background" alt="" src="<?php echo esc_url( get_theme_file_uri( 'assets/images/hero.jpg' ) ); ?>" data-object-fit="cover" />
<div class="wp-block-cover__inner-container">
<!-- wp:heading {"textAlign":"center","level":1} -->
<h1 class="has-text-align-center"><?php echo esc_html_x( 'Welcome to Our Site', 'Pattern placeholder', 'mytheme' ); ?></h1>
<!-- /wp:heading -->
<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons">
<!-- wp:button -->
<div class="wp-block-button">
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Get Started', 'Pattern placeholder', 'mytheme' ); ?></a>
</div>
<!-- /wp:button -->
</div>
<!-- /wp:buttons -->
</div>
</div>
<!-- /wp:cover -->❌ BAD: Variation missing version or title
{
"settings": {
"color": {
"palette": [
{ "slug": "background", "color": "#1a1a1a" }
]
}
}
}✅ GOOD: Complete variation with version and title
{
"version": 3,
"title": "Dark Mode",
"settings": {
"color": {
"palette": [
{
"slug": "foreground",
"color": "#ffffff",
"name": "Foreground"
},
{
"slug": "background",
"color": "#1a1a1a",
"name": "Background"
},
{
"slug": "primary",
"color": "#3dadff",
"name": "Primary"
}
]
}
},
"styles": {
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--foreground)"
}
}
}❌ BAD: Using add_theme_support() instead of theme.json
<?php
function mytheme_setup() {
add_theme_support( 'align-wide' );
add_theme_support( 'custom-line-height' );
add_theme_support( 'custom-spacing' );
add_theme_support( 'editor-color-palette', array(
array(
'name' => 'Primary',
'slug' => 'primary',
'color' => '#0073aa',
),
) );
}
add_action( 'after_setup_theme', 'mytheme_setup' );✅ GOOD: Minimal functions.php, settings in theme.json
<?php
/**
* Theme setup and initialization
*/
defined( 'ABSPATH' ) || exit;
/**
* Theme setup
*/
function mytheme_setup() {
// Still valid in block themes
add_theme_support( 'wp-block-styles' );
add_theme_support( 'responsive-embeds' );
add_theme_support( 'editor-styles' );
// Load editor stylesheet
add_editor_style( 'style.css' );
// Internationalization
load_theme_textdomain( 'mytheme', get_template_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'mytheme_setup' );
/**
* Enqueue additional scripts (if needed)
*/
function mytheme_enqueue_assets() {
// Only if theme needs custom JS
if ( is_front_page() ) {
wp_enqueue_script(
'mytheme-interactions',
get_theme_file_uri( '/assets/js/interactions.js' ),
array(),
wp_get_theme()->get( 'Version' ),
true
);
}
}
add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_assets' );❌ BAD: Classic approach (deprecated for block themes)
<?php
// functions.php in classic theme
function classictheme_setup() {
add_theme_support( 'custom-logo' );
add_theme_support( 'custom-header' );
add_theme_support( 'custom-background' );
add_theme_support( 'editor-color-palette', array(
array( 'name' => 'Primary', 'slug' => 'primary', 'color' => '#0073aa' ),
) );
add_theme_support( 'editor-font-sizes', array(
array( 'name' => 'Small', 'size' => 14, 'slug' => 'small' ),
) );
}
add_action( 'after_setup_theme', 'classictheme_setup' );✅ GOOD: Block theme approach via theme.json
{
"version": 3,
"settings": {
"layout": {
"contentSize": "640px",
"wideSize": "1200px"
},
"typography": {
"defaultFontSizes": false,
"fontSizes": [
{
"slug": "small",
"size": "0.875rem",
"name": "Small"
}
]
},
"color": {
"defaultPalette": false,
"palette": [
{
"slug": "primary",
"color": "#0073aa",
"name": "Primary"
}
]
}
}
}❌ BAD: Child theme style.css missing Template header
/*
Theme Name: My Child Theme
Description: A child theme
Author: Author Name
*/Result: WordPress won't recognize parent theme
✅ GOOD: Complete child theme style.css
/*
Theme Name: My Child Theme
Template: parent-theme-folder
Description: A child theme extending Parent Theme
Author: Author Name
Author URI: https://example.com
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-child-theme
*/Child theme template part override:
parent-theme/
├── parts/
│ └── header.html
child-theme/
├── style.css (with Template: parent-theme)
└── parts/
└── header.html ← Must match filename exactly to override| Severity | Definition | Examples |
|---|---|---|
| CRITICAL | Theme won't work OR WordPress.org rejection | Missing required files (templates/index.html for block themes, index.php for classic themes, style.css for all themes), invalid theme.json version (v1 deprecated), missing style.css "Theme Name" header, template hierarchy violations, child theme missing "Template:" header, theme.json v3 with custom fontSizes/spacingSizes but missing defaultFontSizes/defaultSpacingSizes: false (WordPress defaults override theme), useRootPaddingAwareAlignments with CSS shorthand padding (must use object notation), pattern file missing Title or Slug header |
| WARNING | Theme works but has quality/compatibility issues | theme.json v2 (should upgrade to v3 for breaking changes), hardcoded styles in block theme templates (inline style attributes, hardcoded hex colors, pixel font sizes), missing useRootPaddingAwareAlignments with root padding (full-width blocks won't reach edges), classic patterns where block patterns preferred, deprecated add_theme_support() calls in block theme (editor-color-palette, editor-font-sizes, custom-line-height, custom-spacing should be in theme.json), missing ABSPATH check in functions.php, template part files without theme.json registration, hardcoded WordPress paths (/wp-content/themes/) |
| INFO | Best practice improvements OR optimization opportunities | Missing $schema in theme.json (IDE validation), missing style variations directory, missing block patterns directory, missing templateParts or customTemplates registration, Google Fonts CDN instead of local fonts (GDPR, performance), classic theme without theme.json (could be hybrid), could add specific templates (single.html, page.html) for better hierarchy, child theme could use unregister_block_pattern() to remove parent patterns, missing version requirements in style.css (Requires at least, Tested up to, Requires PHP) |
Report findings grouped by FILE (PHP, HTML template, JSON files intermixed by actual file path), with line numbers and severity labels. Use BAD/GOOD code pairs for each finding.
# WordPress Theme Review: my-theme
## Theme Type: Block Theme
**Detected:** templates/index.html + theme.json + style.css
## FILE: theme.json
### Line 2: WARNING - theme.json version 2 (upgrade to v3)
theme.json v2 still works but v3 is recommended for WP 6.6+. Breaking changes: defaultFontSizes and defaultSpacingSizes now default to true.
❌ **BAD:**
```json
{
"version": 2
}✅ GOOD:
{
"version": 3,
"settings": {
"typography": {
"defaultFontSizes": false,
"fontSizes": [ /* custom sizes */ ]
}
}
}Root-level padding present but useRootPaddingAwareAlignments not set. Full-width blocks won't reach viewport edges.
❌ BAD:
{
"styles": {
"spacing": {
"padding": { "left": "2rem", "right": "2rem" }
}
}
}✅ GOOD:
{
"settings": {
"useRootPaddingAwareAlignments": true
},
"styles": {
"spacing": {
"padding": {
"top": "2rem",
"right": "2rem",
"bottom": "2rem",
"left": "2rem"
}
}
}
}Inline style attribute defeats theme.json purpose. Users can't customize via Site Editor.
❌ BAD:
<div style="max-width: 1200px; padding: 2rem;">✅ GOOD:
<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">Add ABSPATH check at top of file to prevent direct access.
❌ BAD:
<?php
function mytheme_setup() {✅ GOOD:
<?php
defined( 'ABSPATH' ) || exit;
function mytheme_setup() {editor-color-palette should be in theme.json for block themes.
❌ BAD:
add_theme_support( 'editor-color-palette', array(
array( 'name' => 'Primary', 'slug' => 'primary', 'color' => '#0073aa' ),
) );✅ GOOD:
// In theme.json:
{
"settings": {
"color": {
"palette": [
{ "slug": "primary", "color": "#0073aa", "name": "Primary" }
]
}
}
}Add Requires at least, Tested up to, Requires PHP for version enforcement.
/*
Theme Name: My Theme
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 7.4
*/Total issues: 6
Upgrade recommendation: Update theme.json to v3 with explicit defaultFontSizes and defaultSpacingSizes settings.
Hardcoded styles: Found in templates - migrate to theme.json presets for user customization.
Security note: Missing ABSPATH check. Run /wp-sec-review for comprehensive security analysis.
Plugin note: functions.php hooks detected. Run /wp-plugin-review for plugin development patterns.
## Common Mistakes (THM-25)
Patterns that look like issues but are NOT problems:
| Pattern | Why It's NOT a Problem | Context |
|---------|------------------------|---------|
| **Block theme with minimal style.css** | Block themes use theme.json for styling, style.css is primarily metadata | Correct for block themes - style.css contains theme header, minimal CSS |
| **Classic theme without theme.json** | Classic themes work without theme.json, optional for block editor support | Valid classic theme - theme.json is optional for hybrid approach |
| **Hybrid theme with both index.php and theme.json** | Intentional pattern for incremental block editor adoption | Valid hybrid approach - theme.json enhances block editor, classic templates still work |
| **Template part without theme.json registration** | Template parts work by filename, registration is for UI labels only | Works correctly - registration enhances Site Editor UI but not required |
| **Style variation missing some settings sections** | Variations only need to override specific settings, not full schema | Intentional - variations merge with main theme.json |
| **Block template without template-part blocks** | Not all templates need header/footer, valid for custom layouts | Intentional for special templates (404, search results without chrome) |
| **functions.php with add_theme_support() in block theme** | Some add_theme_support() calls are still valid (wp-block-styles, responsive-embeds, editor-styles) | Valid - these can't be replaced by theme.json |
| **Pattern file with only static markup (no PHP)** | If pattern doesn't need dynamic values, static HTML is fine | Valid - PHP optional for static patterns |
| **Child theme without functions.php** | Child themes don't need functions.php if only overriding styles/templates | Valid minimal child theme - functions.php is optional |
| **Block theme without patterns/ directory** | Patterns are optional, not all themes need bundled patterns | Valid - themes can rely on WordPress.org pattern directory |
| **Missing viewScript in theme** | Themes typically don't need frontend JavaScript, unlike blocks | Expected - most themes are HTML/CSS only |
| **CSS variables in style.css referencing theme.json** | Correct usage - theme.json generates CSS variables that style.css can reference | Intentional integration between theme.json and style.css |
## Version Compatibility Reference
Quick reference for WordPress version requirements:
| Feature | WordPress Version | Notes |
|---------|-------------------|-------|
| Block themes (FSE) | 5.9+ | Full Site Editing stable release |
| theme.json v1 | 5.8+ | Initial theme.json support |
| theme.json v2 | 5.9+ | Expanded settings and styles options |
| theme.json v3 | 6.6+ | Breaking changes: defaultFontSizes and defaultSpacingSizes defaults |
| useRootPaddingAwareAlignments | 6.1+ | Full-width alignment with root padding |
| Template parts areas | 6.0+ | header, footer, uncategorized areas |
| fontFace support in theme.json | 6.0+ | Local font hosting via theme.json |
| Block theme patterns (patterns/) | 6.3+ | Auto-registration of PHP pattern files |
| Navigation block | 5.9+ | Replaces wp_nav_menu() in block themes |
| Site Editor | 5.9+ | Full Site Editing interface |
| Global Styles | 5.9+ | User customization of theme.json via UI |
| Style variations | 6.0+ | Alternate theme.json files in styles/ |
## Deep-Dive References
For advanced theme development patterns, load these companion reference documents:
| Task | Reference to Load |
|------|-------------------|
| theme.json v3 complete schema, all sections explained (settings, styles, templateParts, customTemplates, patterns), property catalog with valid values, v2→v3 migration notes, common mistakes, WordPress.org requirements | `references/theme-json-guide.md` |
| Template hierarchy for both classic and block themes side-by-side, template parts and areas, conditional tags, get_template_part() for classic, block markup in HTML templates, custom templates registration | `references/template-patterns.md` |
| Full Site Editing comprehensive guide: site editor workflow, global styles UI mapping to theme.json, style variations creation, block patterns in themes (patterns/ directory), navigation configuration, font management, layout system (contentSize, wideSize, root padding) | `references/fse-guide.md` |
| Step-by-step classic-to-block migration: functions.php → theme.json mapping table, template.php → template.html conversion, sidebar widgets → template parts, Customizer → global styles, add_theme_support → theme.json equivalents, incremental hybrid adoption path | `references/classic-to-block-guide.md` |
**Note:** Reference docs provide deep-dive content. This SKILL.md is self-sufficient for standard theme reviews.
**Security crossover:** When encountering security-relevant patterns (template escaping in classic themes, child theme security, sanitization in theme customizer), this skill provides brief reminders but defers to wp-security-review for comprehensive security analysis. For detailed security patterns, use `/wp-sec-review` command.
**Plugin crossover:** When encountering plugin-level patterns (functions.php hooks like after_setup_theme, wp_enqueue_scripts, init for CPT registration), this skill provides brief mentions but defers to wp-plugin-development for plugin architecture depth. For detailed plugin patterns, use `/wp-plugin-review` command.
**Block crossover:** When encountering block development patterns (block patterns registration in themes vs plugins, block markup in templates, block supports defined in theme.json), this skill provides brief context but defers to wp-block-development for block-specific depth. For detailed block patterns, use `/wp-block-review` command.© jorgerosal, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references) in claude-skills/wp-theme-development of jorgerosal/wordpress-skills.
Open the folder on GitHubat commit 8c96442
Wp Theme Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Wp Theme Development this skilljorgerosal/wordpress-skills | 101 | — | ~12k | Automated safety check: Pass | MIT | |
| WooCommerce Code Reviewwoocommerce/woocommerce | 11k | 3 repos | ~1.1k | Automated safety check: Pass | Custom licence | |
| WordPress Code GuardamElnagdy/guard-skills | 1.3k | — | ~2.4k | Automated safety check: Pass | MIT | |
| Wp Performance Reviewelvismdev/claude-wordpress-skills | 235 | 1 repos | ~4.5k | Automated safety check: Pass | MIT | |
| Skill Doli Code ReviewDolibarr/dolibarr | 7.7k | 1 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Wp Interactivity APIAutomattic/agent-skills | 211 | 3 repos | ~1.5k | Automated safety check: Pass | None |
woocommerce/woocommerce
Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.
amElnagdy/guard-skills
Reviews WordPress plugin, theme and block code after an agent writes or edits it, catching missing escaping, nonces, capability checks and unprepared queries.
elvismdev/claude-wordpress-skills
WordPress performance code review and optimization analysis.
Dolibarr/dolibarr
Reviews Dolibarr PHP code for compliance with coding standards and security best practices, and fixes identified issues.
Automattic/agent-skills
A skill your agent uses when building or debugging WordPress Interactivity API features (data-wp- directives, @wordpress/interactivity store/state/actions, block viewScriptModule integration…
woocommerce/woocommerce
Workflow for WooCommerce development: run PHP and JavaScript tests, lint and fix code style on the current branch, and follow guides for i18n and markdown.
jorgerosal/wordpress-skills
WordPress accessibility review for themes, blocks, plugins, and admin interfaces.
jorgerosal/wordpress-skills
WordPress ACF and content modeling review. An agent skill from jorgerosal/wordpress-skills.
jorgerosal/wordpress-skills
WordPress admin UI review and development guidance. An agent skill from jorgerosal/wordpress-skills.
jorgerosal/wordpress-skills
WordPress CI/CD and release engineering review guidance. An agent skill from jorgerosal/wordpress-skills.
jorgerosal/wordpress-skills
Headless WordPress and WPGraphQL review guidance. An agent skill from jorgerosal/wordpress-skills.
jorgerosal/wordpress-skills
WordPress migration and upgrade review. An agent skill from jorgerosal/wordpress-skills.
Categories
WordPress theme code review and block theme development patterns for WordPress 6.6+. Wp Theme Development is an agent skill from jorgerosal/wordpress-skills.6+.
Wp Theme Development fits situations like: reviewing theme code; auditing theme.json schema; checking template hierarchy; validating block templates.
Run `npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a claude-code`. Or copy the skill folder (claude-skills/wp-theme-development in jorgerosal/wordpress-skills) into .claude/skills/wp-theme-development in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a codex`. Or copy the skill folder (claude-skills/wp-theme-development in jorgerosal/wordpress-skills) into .agents/skills/wp-theme-development in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jorgerosal/wordpress-skills --skill wp-theme-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wp-theme-development, .gemini/skills/wp-theme-development, .github/skills/wp-theme-development and .opencode/skills/wp-theme-development in your project.
Going by SKILL.md and its folder, Wp Theme Development needs the command-line tools its instructions call (rg).
SKILL.md names 2 domains. In commands or code: schemas.wp.org and gnu.org; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Wp Theme Development is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 12k tokens (SKILL.md is roughly 48k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 27k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Wp Theme Development: WooCommerce Code Review (woocommerce/woocommerce, 11k stars), WordPress Code Guard (amElnagdy/guard-skills, 1.3k stars), Wp Performance Review (elvismdev/claude-wordpress-skills, 235 stars) and Skill Doli Code Review (Dolibarr/dolibarr, 7.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jorgerosal (a GitHub user) maintains it in jorgerosal/wordpress-skills, which has 101 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on June 7, 2026.
Source: jorgerosal/wordpress-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.