Wordpress block style generator

From lightspeedwp/.github · View interactive version

Wordpress block style generator is an AI agent skill from the GitHub repository lightspeedwp/.github. create wordpress block styles, block style registrations, style variation definitions and supporting css or theme.json guidance for individual blocks. use when the user asks to define a reusable style for a specific block, register a named block style, or generate block-level styling rules that fit

How to use this skill

Skill file

WordPress Block Style Generator

Purpose

Generate reusable WordPress block styles for individual blocks using the lightest practical implementation approach.

This skill creates:

It prefers native WordPress styling mechanisms first and uses custom classes only where they materially help.

Trigger Conditions

Use this skill when the request is about:

Do not use this skill for:

Those belong to the relevant specialist skills.

Inputs

Accept any mix of:

If naming or implementation direction is unclear, use wordpress-asset-parameter-generator behavior first and state assumptions.

Fast Decision Flow

  1. Identify the target block and style purpose.
  2. Decide the lightest fitting implementation:
  1. Normalize the style name and any class naming.
  2. Generate the registration and styling output.
  3. Mark anything that should be reviewed by wordpress-block-asset-validator.

Workflow

  1. Inspect the request and capture confirmed facts.
  2. Identify the target block and intended editor-facing style label.
  3. Normalize:
  1. Prefer native block-style handling before custom complexity.
  2. Generate:
  1. Return assumptions and validation notes.

Block Style Rules

Output Format

By default, return:

  1. the target block
  2. the block style name and slug
  3. registration guidance
  4. CSS or theme.json guidance
  5. assumptions
  6. validation notes

Example output shape:

## Target block
`core/button`

## Style definition
- Name: Outline Accent
- Slug: outline-accent

## Registration guidance

register_block_style(

'core/button',

array(

'name' => 'outline-accent',

'label' => 'Outline Accent',

)

);


## CSS guidance

.is-style-outline-accent .wp-block-button__link {

border: 2px solid var(--wp--preset--color--accent);

background: transparent;

color: var(--wp--preset--color--accent);

}


## Assumptions
- Accent color is already available as a theme preset.

## Validation notes
- Confirm the chosen block target and preset names.
- Run validator review before commit.

Safe Defaults

Failure Modes And Escalation

Escalate briefly when:

In those cases, ask at most one focused question or return a safe scaffold with explicit assumptions.

Test Prompts

Test prompt: button style

Prompt:

Create a reusable Accent Outline style for core/button in a block theme. Prefer presets over hardcoded colors.

Expected behaviour:

Test prompt: quote variation

Prompt:

Build a Quiet Pull Quote style for core/quote with softer borders and lighter text treatment.

Expected behaviour:

Test prompt: boundary case

Prompt:

Define the styling system for full-width hero sections across the whole site.

Expected behaviour:

References

_Maintained with ❤️ by the 🚀 LightSpeedWP Automation Team_

Org Profile

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.