| name | wp-scaffold |
| description | Scaffold a WordPress block theme directory structure from a design specification |
| argument-hint | <theme-slug> [design-spec-path] |
| allowed-tools | Read, Write, Edit, Bash, Glob |
WordPress Theme Scaffold
Generate a complete WordPress block theme skeleton from a design specification.
Input
- Theme slug: $ARGUMENTS[0]
- Design spec path: ${ARGUMENTS[1]:-docs/design-spec.json}
Steps
-
Read the design specification (default: docs/design-spec.json)
-
Create theme directory at output/<theme-slug>/ with:
style.css # Theme header
theme.json # Design tokens from spec
functions.php # Enqueue scripts, register patterns
templates/
index.html
page.html
single.html
archive.html
404.html
home.html
parts/
header.html
footer.html
sidebar.html
patterns/
assets/
css/
js/
images/
fonts/
-
Generate theme.json mapping design tokens:
- Colors →
settings.color.palette
- Fonts →
settings.typography.fontFamilies
- Spacing →
settings.spacing.spacingSizes
- Set
version: 3, appearanceTools: true
-
Generate templates using block markup from the component/layout spec
-
Validate the theme structure is complete and valid
Output
Report what was generated and any warnings about missing spec data.