Skip to content

forcedotcom/sf-skills / plugins/builder/platform-lightning-widgets/skills/platform-widget-generate

platform-widget-generate

Verified

Use this skill to author a complete HXL WidgetBundle (UEM body + schema.json + -meta.xml). TRIGGER when: user asks for a widget, mosaic, fragment, card, or rich UI surface for any subject, domain, feature, or entity noun; the prompt names only an entity or data shape without invoking Lightning Types, CLTs, or Apex-backed types. DO NOT TRIGGER when: the prompt explicitly says 'Lightning Type', 'CLT', 'Custom Lightning Type', 'Apex-backed type', or references '@apexClassType/...' (use platform-lightning-type-widget-coordinate); authoring a custom-LWC renderer for a Custom Lightning Type (use platform-custom-lightning-type-generate); or editing only an LWC component.

examples/list-with-foreach.json

View on GitHub
{
  "type": "lightning__agentforceWidget",
  "contentBody": {
    "widgetBody": {
      "definition": "tile/widget",
      "children": [
        {
          "definition": "tile/column",
          "attributes": { "gap": "md" },
          "children": [
            {
              "definition": "tile/text",
              "attributes": { "text": "{!$attrs.title}", "variant": "h1" }
            },
            {
              "definition": "tile/column",
              "attributes": { "gap": "sm" },
              "meta": { "forEach": "{!$attrs.products}", "forItem": "$product" },
              "children": [
                {
                  "definition": "tile/row",
                  "attributes": { "gap": "md", "justify": "between", "align": "center" },
                  "children": [
                    {
                      "definition": "tile/column",
                      "attributes": { "gap": "xs" },
                      "children": [
                        {
                          "definition": "tile/text",
                          "attributes": { "text": "{!$product.name}", "variant": "h3" }
                        },
                        {
                          "definition": "tile/text",
                          "attributes": { "text": "{!$product.category}", "variant": "caption", "color": "muted" }
                        }
                      ]
                    },
                    {
                      "definition": "tile/text",
                      "attributes": { "text": "{!$product.price}", "variant": "h4", "color": "primary" }
                    }
                  ]
                },
                {
                  "definition": "tile/row",
                  "attributes": { "gap": "sm", "align": "center" },
                  "meta": { "forEach": "{!$product.features}", "forItem": "$feature" },
                  "children": [
                    {
                      "definition": "tile/icon",
                      "attributes": { "name": "{!$feature.icon}", "size": "sm", "color": "success" }
                    },
                    {
                      "definition": "tile/text",
                      "attributes": { "text": "{!$feature.label}", "variant": "caption", "color": "muted" }
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  }
}
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies 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 colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall