Skip to content

forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-metadata-generate

experience-ui-bundle-metadata-generate

Verified

Use this skill when adding a front-end React or Angular UI bundle to an EXISTING SFDX project, or configuring UI bundle metadata and config files. TRIGGER when: adding or scaffolding a new UI bundle — including adding one more or another UI bundle — into a project that already exists; scaffolding a single bundle with the basic template (reactbasic or angularbasic) via 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 entirely from scratch, where the whole SFDX starter project (UI bundle plus Experience Site metadata and toolchain) is generated together in one step (use experience-ui-bundle-project-generate).

references/react-metadata-generate.md

View on GitHub
# React UI Bundle Scaffold

Reference for the **React** path of `experience-ui-bundle-metadata-generate`. Use this to scaffold the bundle, then return to the "After generation" steps in `SKILL.md`.

## Scaffold command

Always pass `--template reactbasic` to scaffold a React/Vite bundle:

```bash
# Run from SFDX project root. The CLI creates the bundle under
# force-app/main/default/uiBundles/<AppName>/ — verify this before continuing.
sf template generate ui-bundle -n CoffeeBoutique --template reactbasic
```

Pass `--output-dir` to generate at a different location. If you do, pass that same path to `verify-bundle-location.mjs` in the verification step.

## What the scaffold produces

A React + Vite (TypeScript) app under `force-app/main/default/uiBundles/<AppName>/`:

- **Entry HTML:** `index.html` at the bundle root, mounting `<div id="root">` and loading `src/app.tsx`.
- **App entry:** `src/app.tsx`; pages under `src/pages/`, components under `src/components/`.
- **Toolchain:** `vite.config.ts`, `package.json`, shadcn/ui primitives, Tailwind, GraphQL client + `codegen.yml`.
- **Build output:** `dist/` (matches `ui-bundle.json` `outputDir: "dist"`).

## Default boilerplate to replace

Replace every stock string before shipping — searching for these is the fastest way to find them:

- `<title>Welcome to React App</title>` in `index.html` → a real product title.
- Any "React App" / "Vite + React" placeholder copy and default hero/landing text.
- Placeholder navigation and empty page stubs (see `experience-ui-bundle-frontend-generate`).
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