fse-pattern-first-architecture

Enforce pattern-first architecture for WordPress FSE themes via PHP patterns.

16|5|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/PMDevSolutions/Flavian --skill fse-pattern-first-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fse-pattern-first-architecture
Source: https://github.com/PMDevSolutions/Flavian/tree/main/.claude/skills/fse-pattern-first-architecture
Command: npx skills add https://github.com/PMDevSolutions/Flavian --skill fse-pattern-first-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces a pattern-first architecture for WordPress FSE themes, ensuring images are served via PHP patterns rather than inline HTML and preventing PHP code from executing inside .html templates.

Core Features & Use Cases

  • Pattern-first structure with PHP pattern files under patterns and templates that reference them
  • Images wired through reusable PHP patterns rather than inline HTML, improving security and maintainability
  • Auto-triggered when creating FSE templates with images to enforce best practices automatically

Quick Start

Run the validation script to enforce the pattern-first architecture on your FSE theme.

Frequently Asked Questions about fse-pattern-first-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce a pattern-first architecture in WordPress FSE themes?

Pattern-first FSE architecture ensures images are served via reusable PHP pattern files rather than inline HTML, preventing PHP execution inside .html templates. This structure improves security and maintainability by keeping dynamic logic within dedicated pattern files referenced by templates.

What's the best way to load images in WordPress FSE templates without inline HTML?

Load images through reusable PHP pattern files referenced by FSE templates instead of inline HTML. A validation script automatically triggers during template creation to enforce this pattern-first structure, ensuring assets are correctly wired through PHP patterns.

Can I use this pattern-first validation with Figma to WordPress design handoffs?

Yes, this validation applies across the Figma-to-WordPress design handoff workflow. The enforcement hook integrates via scripts/figma-fse/validate-pattern-architecture.sh to ensure FSE templates and PHP pattern references maintain proper architecture from design to implementation.

Why does my WordPress FSE template break when I add PHP code inside an HTML template file?

FSE templates break because pattern-first architecture intentionally prevents PHP code from executing inside .html template files. Move dynamic logic and image loading into reusable PHP pattern files, then reference those patterns from your .html templates to resolve the issue.

Do I need a validation script to maintain pattern-first FSE theme structure?

A validation script is needed to maintain pattern-first FSE theme structure by ensuring images load through PHP patterns and templates reference them correctly. The script auto-triggers when creating FSE templates with images to enforce best practices automatically across the workflow.