/flavian:fse-pattern-first-architecturefrom Flavian
Enforces pattern-first architecture in WordPress FSE themes: images and dynamic paths go in PHP pattern files, templates reference patterns instead of inline HTML.
Ships in Flavian. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Trigger Keywords: "create FSE theme", "Figma to WordPress", "block theme", "FSE template", "WordPress template with images"
Auto-trigger: When agent creates .html template files with wp:image or wp:cover blocks
NO PHP CODE IN .html TEMPLATE FILES
NO EMPTY IMAGE src ATTRIBUTES
IMAGES → PHP PATTERNS (.php files in patterns/)
TEMPLATES → PATTERN REFERENCES
PHP code does NOT execute in WordPress .html templates. Empty image sources break completely.
themes/mytheme/
├── patterns/ ← PHP files (code executes)
│ ├── hero-section.php ← Full hero with images
│ ├── cta-with-image.php ← CTA section
│ └── features-grid.php ← Grid with icons/images
├── templates/ ← HTML files (static markup)
│ ├── front-page.html ← References patterns
│ ├── page.html ← References patterns
│ └── index.html ← References patterns
└── assets/
└── images/ ← Theme images
├── hero.png
└── cta-bg.jpg
Does section contain images/icons/media?
YES → Create PHP pattern file
NO → Inline in template HTML
Is section reusable across pages?
YES → Create PHP pattern file
NO → Inline in template HTML (unless has images)
Does section need dynamic paths?
YES → Create PHP pattern file
NO → Inline in template HTML
<?php
/**
* Title: Hero Section
* Slug: themename/hero-section
* Categories: banner, featured
* Description: Homepage hero with heading, text, button, and background image
*
* @package ThemeName
*/
?>
<!-- wp:cover {"url":"","dimRatio":0,"overlayColor":"white","minHeight":800,"minHeightUnit":"px"} -->
<div class="wp-block-cover" style="min-height:800px">
<span aria-hidden="true" class="wp-block-cover__background has-white-background-color"></span>
<img class="wp-block-cover__image-background" alt="Hero Background" src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/hero-bg.jpg" data-object-fit="cover"/>
<div class="wp-block-cover__inner-container">
<!-- wp:columns {"verticalAlignment":"center"} -->
<div class="wp-block-columns are-vertically-aligned-center">
<!-- wp:column {"verticalAlignment":"center","width":"50%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:50%">
<!-- wp:heading {"level":1,"fontSize":"5-x-large"} -->
<h1 class="wp-block-heading has-5-x-large-font-size">Your Compelling Headline</h1>
<!-- /wp:heading -->
<!-- wp:paragraph {"fontSize":"medium"} -->
<p class="has-medium-font-size">Description text goes here</p>
<!-- /wp:paragraph -->
<!-- wp:buttons -->
<div class="wp-block-buttons">
<!-- wp:button {"backgroundColor":"primary"} -->
<div class="wp-block-button">
<a class="wp-block-button__link has-primary-background-color" href="#cta">Get Started</a>
</div>
<!-- /wp:button -->
</div>
<!-- /wp:buttons -->
</div>
<!-- /wp:column -->
<!-- wp:column {"verticalAlignment":"center","width":"50%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:50%">
<!-- wp:image {"aspectRatio":"1","scale":"cover","sizeSlug":"large"} -->
<figure class="wp-block-image size-large">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/hero-image.png" alt="Hero Image" style="aspect-ratio:1;object-fit:cover"/>
</figure>
<!-- /wp:image -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
</div>
<!-- /wp:cover -->
<!-- templates/front-page.html -->
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:group {"tagName":"main","layout":{"type":"default"}} -->
<main class="wp-block-group">
<!-- Hero Section -->
<!-- wp:pattern {"slug":"themename/hero-section"} /-->
<!-- Text-only section (inline is fine) -->
<!-- wp:group {"backgroundColor":"white"} -->
<div class="wp-block-group has-white-background-color">
<!-- wp:heading {"textAlign":"center"} -->
<h2 class="wp-block-heading has-text-align-center">About Us</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">We are a company that does things.</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
<!-- CTA with image (use pattern) -->
<!-- wp:pattern {"slug":"themename/cta-section"} /-->
</main>
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
When creating an FSE theme with images:
For each image-containing section:
patterns/[section-name].phpget_template_directory_uri() for image pathsassets/images/For each Figma screen/page:
templates/[template-name].html<!-- wp:pattern {"slug":"..."} /-->scripts/figma-fse/validate-pattern-architecture.shIf you catch yourself:
STOP. You're violating pattern-first architecture.
fse-block-theme-development - theme.json and FSE basicsblock-pattern-creation - Pattern registration detailswordpress-security-hardening - Escaping output in patternsThis skill is enforced by:
scripts/figma-fse/validate-pattern-architecture.sh
Run manually, or invoked by the figma-fse-converter agent during conversion. It is not registered as an automatic PostToolUse hook in .claude/settings.json.
Last Updated: 2026-01-23
Status: ✅ Production Ready
Enforcement: Manual / agent-run via validate-pattern-architecture.sh
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
wordpress, fse, block-theme, php-patterns, theme-architecture
npx claudepluginhub pmdevsolutions/flavian --plugin flavian16 skills in this plugin
/block-pattern-creationUse when creating WordPress block patterns, registering patterns, organizing pattern categories, or building reusable UI components with blocks. Keywords: block patterns, register_block_pattern, pattern category, InnerBlocks, WordPress patterns, reusable blocks/canva-to-fse-autonomous-workflowUse when converting Canva HTML/CSS exports to WordPress FSE block themes. Orchestrates autonomous workflow from CSS token extraction through template generation. Keywords: Canva to WordPress, FSE conversion, HTML export, CSS design tokens, autonomous template generation/create-blog-articleCreate an SEO-optimized blog article for a Claude Code component with AI-generated cover image/figma-to-fse-autonomous-workflowUse when converting Figma designs to WordPress FSE block themes. Orchestrates autonomous workflow from design token extraction through pixel-perfect template generation. Keywords: Figma to WordPress, FSE conversion, design tokens, autonomous template generation, pixel-perfect FSE/fse-block-theme-developmentUse when creating FSE block themes, working with theme.json, creating templates or template parts, or building block patterns. Keywords: FSE, Full Site Editing, block theme, theme.json, templates, patterns, WordPress theme development/indesign-conversionUse when converting an Adobe InDesign document (.idml or PDF) into a WordPress FSE block theme. Covers prerequisites, the parse → map-tokens → generate pipeline, expected outputs, and gotchas (CMYK→sRGB shifts, missing fonts, oversized print images). Keywords: InDesign to WordPress, IDML, IDML to FSE, InDesign PDF, print to web, design tokens from InDesignOther plugins' skills for the same job