Wordpress block asset validator

From lightspeedwp/.github · View interactive version

Wordpress block asset validator is an AI agent skill from the GitHub repository lightspeedwp/.github. validate wordpress block theme assets, block markup, pattern headers, template names, template part references and custom template registrations against official wordpress rules and project conventions. use when the user asks to check compliance, review generated assets, catch invalid metadata, or v

How to use this skill

Skill file

WordPress Block Asset Validator

Purpose

Validate WordPress block theme assets before they are treated as complete.

This skill reviews:

It focuses on correctness, standards compliance, and low-risk delivery. It does not silently repair broken assets; it reports findings and suggests the smallest safe fix.

Trigger Conditions

Use this skill when the request is about:

Do not use this skill as the main asset generator. If the user needs a final asset built from scratch, route to the relevant specialist skill after validation planning.

Inputs

Accept any mix of:

If the user provides incomplete material, validate what is present and list the unverified areas clearly.

Fast Decision Flow

  1. Identify the asset type:
  1. Inspect confirmed inputs only.
  2. Apply official WordPress rules first.
  3. Apply project conventions where they do not conflict with WordPress behavior.
  4. Return findings ordered by severity.
  5. Provide concrete fixes and any follow-on routing.

Workflow

  1. Determine the exact asset surface being checked.
  2. Confirm the expected path or registration shape.
  3. Validate required structure and metadata.
  4. Check naming consistency and hierarchy alignment.
  5. Flag unsupported or risky patterns.
  6. Return:

Validation Rules

Patterns

Check that:

Template Parts

Check that:

<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

Templates

Check that:

Custom Templates

Check that:

Block Styles

Check that:

Section Styles

Check that:

Output Format

Present results in a compact review structure.

## Findings
- Severity: high | medium | low
- Asset: /patterns/hero-default.php
- Issue: pattern slug is not namespaced
- Why it matters: unnamespaced slugs are not aligned with theme pattern conventions
- Fix: change `Slug: hero-default` to `Slug: theme-slug/hero-default`

## Open questions
- Is this meant to be hidden from the inserter?

## Summary
- Status: fail
- Ready for generator handoff after fixes: yes

If there are no issues, say so clearly and mention any unverified gaps.

Severity Guide

Failure Modes And Escalation

Escalate briefly when:

When blocked, validate the confirmed parts and clearly mark the unknowns instead of overstating confidence.

Test Prompts

Test prompt: broken pattern header

Prompt:

Validate this pattern file. It uses Slug: hero-default, Categories: utility, and should be hidden from the inserter, but the file header does not include Inserter.

Expected behaviour:

Test prompt: custom template alignment

Prompt:

Review this Content Canvas custom template. I have /templates/content-canvas.html and a theme.json entry with name and title, but no postTypes.

Expected behaviour:

Test prompt: block style review

Prompt:

Validate this core/button style output. It registers outline-accent, but the CSS uses hardcoded colors and a generic .button-outline selector.

Expected behaviour:

Test prompt: boundary case

Prompt:

Create a new About page starter pattern and wire it into the theme.

Expected behaviour:

References

_This page brought to you by the 🦄 Magic Automation Unicorns of LightSpeedWP._

Automation Docs

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.