platform-widget-generate
Installation
SKILL.md
Generating a Widget Bundle
Author a complete WidgetBundle: a UEM tree (tile/widget), a JSON Schema describing the widget's input contract, and the .uiwidget-meta.xml that registers the bundle.
When to Use This Skill
Use when the user asks for a widget, mosaic, fragment, or card-style rich UI surface. Do not use this skill for custom-LWC renderers or for renderer.json files inside a Custom Lightning Type bundle — those belong to platform-custom-lightning-type-generate.
Inputs
widgetName(required) —camelCaseidentifier; becomes the directory name underuiWidgets/.- A shape — what data the widget renders. The widget cannot be generated without it. The shape arrives one of two ways, in priority order:
lightningTypeSchema—{ path, apexClassFqn }for an existing Apex-backed Lightning Type. The FQN takes one of two forms: outer-class (<namespace>__<ClassName>) where the outer class is the payload, or inner-class (<namespace>__<ClassName>$<InnerClass>) where the named inner class is the payload. Passed in by theplatform-lightning-type-widget-coordinateorchestrator. When present, derive perreferences/schema-from-lightning-type.md.- Extracted from the user's prompt — when no
lightningTypeSchemais passed, infer the shape directly from what the user wrote: a pasted JSON payload, an enumerated field list ("id as string, total as number"), or descriptive prose. The output is the same ordered list of{ name, type, required }either way.
If neither source yields a shape, STOP and ask the user before proceeding.