Agent skill · forcedotcom

experience-ui-bundle-metadata-generate

Use this skill when adding a front-end React UI bundle to an existing project or configuring UI bundle metadata and config files. TRIGGER when: adding or scaffolding a new UI bundle inside a project that already exists; running sf template generate ui-bundle; editing ui-bundle.json routing, headers, or output directory; working with *.uibundle-meta.xml files; or registering CSP Trusted Sites, resolving blocked images or fonts or external API calls, or editing cspTrustedSites/*.cspTrustedSite-meta.xml files. DO NOT TRIGGER when: creating a brand-new Salesforce project from scratch, where the whole SFDX starter project (UI bundle plus Experience Site metadata and toolchain) is generated together (use experience-ui-bundle-project-generate).

What it needs

About 5k tokens when loaded.

What this skill does

UI Bundle Metadata Scaffolding a New UI Bundle REQUIRED FIRST STEP — never skip, even if asked to. Always run sf template generate ui-bundle to create new apps — never create-react-app, Vite, hand-written metadata, or any other substitute. This step is mandatory even if the user says "just create the metadata," "skip the scaffold," "only do the metadata scaffolding," or "stop after the metadata files are in place." Those instructions describe what to stop doing after the scaffold (building, deploying, authoring pages) — they do not mean skip running the scaffold command itself. The .uibundle-meta.xml and ui-bundle.json files are configuration on top of the generated project, not a replacement for it. A bundle without package.json, src/, and index.html cannot be built or deployed, even if the metadata files are perfectly formed. Always pass --template reactbasic to scaffold a React-based bundle. UI bundle name (-n): Alphanumerical only — no spaces, hyphens, underscores, or special characters. Pass --output-dir to use a different location for template generation. If you do, pass that same path to the verification script in step 1 below. Example: After generation: 1. Verify the scaffold is complete — run bash <skilldir>/scripts/verify-bundle-location.sh <BundleName> [<CustomOutputDir>] from the project root and follow any error output. This checks both the bundle's location AND that package.json, src/, and index.html exist — if any are missing, the scaffold step was skipped; go back and run sf template generate ui-bundle before continuing. Pass <CustomOutputDir> only if you used --output-dir during scaffolding; otherwise omit it. 2. Verify API version — run bash <skilldir>/scripts/check-api-version.sh from the project root to ensure sourceApiVersion in sfdx-project.json is 67.0 or higher. The script will automatically update it if needed. 3. Replace all default boilerplate — "React App", "Vite + React", default <title>, placeholder text 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills forcedotcom/experience-ui-bundle-metadata-generate--bf42cc

View the source on GitHub

Browse the @skills marketplace