Wordpress asset parameter generator

From lightspeedwp/.github · View interactive version

Wordpress asset parameter generator is an AI agent skill from the GitHub repository lightspeedwp/.github. normalize and generate wordpress block theme asset parameters, metadata headers, theme.json entries and starter values for patterns, template parts, templates and custom templates. use when the user asks to prepare asset parameters, fill required metadata, standardize headers, or scaffold block them

How to use this skill

Skill file

WordPress Asset Parameter Generator

Purpose

Generate and normalize the parameters needed to create WordPress block theme assets consistently.

This skill prepares structured inputs for:

It does not generate final production asset files unless the user explicitly asks for starter scaffolds.

Trigger Conditions

Use this skill when the request is about:

Do not use this skill as the final generator for full templates, template parts, or patterns when a specialist asset skill is more appropriate.

Inputs

Accept any mix of:

If one or two fields are missing, use safe defaults and state assumptions. Ask one focused question only when a missing value materially changes the output.

Fast Decision Flow

  1. Identify the asset type:
  1. Extract any confirmed values from the prompt or source files.
  2. Apply WordPress rules for that asset type.
  3. Fill missing required parameters with safe defaults or explicit blanks only where the team convention requires them.
  4. Return structured parameters plus notes for the downstream generator or validator.

Workflow

  1. Inspect the source material and capture only confirmed facts.
  2. Determine which asset-specific parameter set is needed.
  3. Normalize names:
  1. Apply asset rules:
  1. Produce one of these outputs:
  1. Flag anything that should be validated by wordpress-block-asset-validator.

Asset Rules

Patterns

Template Parts

Templates

Custom Templates

Output Formats

Return outputs in compact, reusable forms.

Pattern Parameter Object

{
  "assetType": "pattern",
  "filePath": "/patterns/hero-default.php",
  "title": "Hero Default",
  "slug": "theme-slug/hero-default",
  "categories": ["banner"],
  "description": "",
  "viewportWidth": "",
  "inserter": true,
  "keywords": [],
  "blockTypes": [],
  "postTypes": [],
  "templateTypes": []
}

Pattern Header Scaffold

<?php
/**
 * Title: Hero Default
 * Slug: theme-slug/hero-default
 * Categories: banner
 * Description:
 * Viewport Width:
 * Inserter: true
 * Keywords:
 * Block Types:
 * Post Types:
 * Template Types:
 */
?>

Custom Template Fragment

{
  "customTemplates": [
    {
      "name": "content-canvas",
      "title": "Content Canvas",
      "postTypes": ["page", "post"]
    }
  ]
}

Validation Handoff

Send the result to wordpress-block-asset-validator when:

Failure Modes And Escalation

Escalate briefly when:

In those cases, state the conflict, make the smallest safe assumption if possible, and mark the field for confirmation.

Test Prompts

Test prompt: pattern metadata from brief

Prompt:

Prepare the parameters for a hidden CTA implementation pattern for the lsx theme. It should live in the patterns folder, not show in the inserter, and be usable in a page template.

Expected behaviour:

Test prompt: custom template from rough request

Prompt:

I need a Content Canvas custom template for pages and posts with header, footer, and editable content. Give me the parameters and the theme.json fragment.

Expected behaviour:

Test prompt: boundary case

Prompt:

Build the final footer template part HTML and commit it to the repo.

Expected behaviour:

References

_Built by 🧱 LightSpeedWP with ☕, 🚀, and open-source spirit!_

Contributors

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.