automattic/wordpress-agent-skills/wordpress-block-theming
Claude Code and agent skill by automattic/wordpress-agent-skills
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
WordPress Full Site Editing (FSE) theme architecture. Use when generating theme.json, block templates, template parts, patterns, and functions.php for WordPress block themes.
Install
npx vskill@latest install automattic/wordpress-agent-skills/wordpress-block-themingSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
WordPress Block Theming Skill
Comprehensive knowledge for building WordPress block themes using Full Site Editing (FSE) architecture.
Absolute Rules
- NO EMOJIS: Never use emojis anywhere in generated content - not in headings, paragraphs, button text, or any other text. This applies to all templates, patterns, and content.
Theme Architecture
Directory Structure
theme.json Configuration
The theme.json file is the central configuration for block themes. It defines:
Schema and Version
Settings
Define available options for the editor:
Styles
Define default styles for the site and blocks:
Typography
- Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
- Font size scale: Keep sizes grounded and usable. Body: 1rem. Headings: scale modestly (h1 ≤ 2.5–3rem). Use
clamp()for responsive display text, but cap at ~3.5rem max. Avoid "massive"/"gigantic" sizes above 4rem—they rarely improve design and often degrade it. A good 6-step scale: 0.875rem / 1rem / 1.25rem / 1.75rem / 2.25rem / clamp(2.5rem, 4vw, 3.5rem). - Line height: Body text: 1.5–1.65. Headings: 1.1–1.3. Never go below 1.0 for any text. Apply via
styles.typography.lineHeightandstyles.elements.heading.typography.lineHeightin theme.json.
Block Templates
Templates use WordPress block markup (HTML comments with JSON attributes).
Template Structure
Template Parts
Header Requirements
- Constrained layout group with site-appropriate background
- Flex row:
site-title(level:0 — renders<p>not<h1>) +navigation - Appropriate padding using spacing presets
Footer Requirements
- Constrained layout group, matching or complementing header style
- Content varies by site type (copyright, social links, contact info, etc.)
- Include footer margin reset in style.css
Block Patterns
Patterns are PHP files that register reusable block content.
Pattern Registration
functions.php
Keep functions.php minimal. Primary uses:
Google Fonts Enqueuing
IMPORTANT: Always use enqueue_block_assets hook (not wp_enqueue_scripts) to ensure fonts load in BOTH the front-end AND block editor.
Security in Generated Code
- When
functions.phpoutputs any user-derived value, use WordPress escaping functions: - HTML context:
esc_html() - Attribute context:
esc_attr() - URL context:
esc_url() - Never use
eval(),create_function(),shell_exec(),exec(), orsystem()in generated theme code - Static block themes with hardcoded content (the default) do not need escaping — WordPress core blocks handle this. Escaping matters only if generating PHP that renders dynamic data.
style.css
The style.css file contains theme metadata and custom CSS. Important Always bring across custom CSS from the design into style.css that is not achievable via theme.json, especially for layout and composition techniques that are critical to the design's aesthetics such as animation/motion.
Animation & Motion in Block Themes
Animation brings life to block themes, but WordPress block markup requires a specific pattern to connect CSS animations to blocks.
The className Pattern
Add animation classes to blocks via the className JSON attribute. WordPress renders this as a class on the wrapper div:
This works on any block — groups, columns, headings, paragraphs, buttons, images:
Animation Classes in style.css
Generate and adapt these classes (these are examples only, do not limit yourself to these) in each theme's style.css:
Entrance animations:
Staggered children — delays applied via nth-child:
Interactive transitions:
Continuous ambient motion:
Scroll-Triggered Reveals via functions.php
The most impactful animation pattern — sections revealing as the user scrolls — requires a small IntersectionObserver script. Add this to functions.php:
Note: wp_add_inline_script requires an existing registered script handle. Since block themes may not always have a script registered, a more reliable approach is to output the script directly:
Then in style.css, pair with CSS that starts elements hidden and animates them when .is-visible is added:
Use className: "animate-on-scroll" on section-level Group blocks:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude-cowork/wp-site-creator/skills/wordpress-block-theming/SKILL.md
Popularity
- Repository stars
- 44
- Repository forks
- 5
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/automattic/wordpress-agent-skills/wordpress-block-theming)