wordpress-pattern-generator
FreeNo executable scriptsNot checkedcreate wordpress block theme pattern files, php pattern headers, starter patterns, block-type patterns and template-usage patterns from briefs, figma handoff…
by lightspeedwp★ 20 GitHub starsAbout this skill
WordPress Pattern Generator
Purpose
Generate WordPress block theme pattern files that align with official pattern behavior and LightSpeed-style consistency.
This skill creates:
- theme pattern PHP files
- starter patterns
- block-type patterns
- template-usage patterns
- hidden implementation-only patterns
It prefers theme /patterns/*.php auto-registration and does not default to manual PHP registration unless the user explicitly needs it.
Trigger Conditions
Use this skill when the request is about:
- creating a new WordPress block theme pattern
- scaffolding a pattern file with the correct metadata header
- turning a brief, Figma handoff, or block outline into a pattern
- building a starter pattern for a page type such as About or Contact
- generating a hidden implementation pattern for a template or template part
Do not use this skill for:
- full template generation
- template part generation
theme.jsoncustom template registration- broad theme validation reviews
Those belong to the relevant specialist skills.
Inputs
Accept any mix of:
- a pattern purpose or name
- theme slug
- block markup notes
- Figma handoff or layout notes
- content constraints
- editor visibility expectations
- intended categories
- intended block types, post types, or template types
- repository conventions or example patterns
If required metadata is incomplete, call on wordpress-asset-parameter-generator behavior first and state any assumptions.
Fast Decision Flow
- Identify the pattern type:
- general inserter pattern
- starter pattern
- block-type pattern
- template-usage pattern
- hidden implementation pattern
- Normalize the metadata.
- Determine path and filename in
/patterns. - Generate the PHP header and block markup body.
- Mark anything that needs validation by
wordpress-block-asset-validator.
Workflow
- Inspect the request and pull out confirmed facts only.
- Decide whether the pattern is user-facing or implementation-only.
- Normalize the metadata:
- title
- namespaced slug
- categories
- description
- viewport width
- inserter value
- keywords
- block types
- post types
- template types
- Draft the file path in
/patterns/{pattern-name}.php. - Generate the standard PHP header.
- Generate the block markup body.
- Return the pattern file plus assumptions and a validation handoff note.
Pattern Rules
- Prefer
/patterns/*.phpauto-registration. - Always use a namespaced slug such as
theme-slug/hero-default. - Prefer WordPress core categories before custom categories.
- Use
Inserter: falsefor hidden implementation-only patterns. - Use
Block Typeswhen the pattern is meant to surface for a specific block context. For a starter page pattern it is mandatory, not optional — see the starter-pattern rule below. - Use
Template Typeswhen the pattern is meant as a starting point for a template context. This is what makes it a starter template pattern, and such a pattern needs noBlock Types. - Use
Post Typeswhen the pattern is intentionally scoped to certain content types. - Starter patterns come in two kinds. A starter page pattern needs
Block Types: core/post-content; a starter template pattern needsTemplate Types. Do not requirecore/post-contentof a template pattern. - Keep the body as valid WordPress block markup suitable for theme patterns.
Starter Patterns
WordPress has two kinds of starter pattern, and they are registered differently.
Starter page patterns
A page pattern appears in the new-post-type picker only when all of the following hold:
Block Typesincludescore/post-content. This is the hard gate: the editor filters the registered patterns down to those carrying that block type before it looks at anything else, so a pattern withPost Types: pagebut noBlock Typesnever appears.Post Typesnames the post types the pattern is offered for. Omitting the field does not mean every post type: the filter accepts an absentpostTypesonly when the current post type ispage, so an omitted field offers the pattern for pages alone.
So a page starter pattern needs only Block Types: core/post-content. Omitting Post Types offers it for pages, which is the same outcome as Post Types: page; naming other post types as well widens it, for example page, wp_template. The core filter is:
( postType === 'page' && ! pattern.postTypes ) ||
( Array.isArray( pattern.postTypes ) && pattern.postTypes.includes( postType ) )
which is why neither field alone makes a non-page pattern appear for that post type.
Starter template patterns
A template pattern appears in the Site Editor when creating a new template. It is keyed on Template Types instead:
Template Typesnames one or more template types, separated by commas (for examplefront-page, home).Block Typesis not required and not consulted. Do not addcore/post-contentto a template pa
Install wordpress-pattern-generator in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the wordpress-pattern-generator skill do?
create wordpress block theme pattern files, php pattern headers, starter patterns, block-type patterns and template-usage patterns from briefs, figma handoff, block markup notes or repository conventions. use when the user asks to generate a wordpress pattern, scaffold a pattern file, create a hidden implementation pattern, or prepare a theme pattern for template or editor use.
How do I install the wordpress-pattern-generator skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the wordpress-pattern-generator skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
by Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
by Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
by Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
by Anthropic