forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-metadata-generate
experience-ui-bundle-metadata-generate
VerifiedUse 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).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.5 KB |
| references/angular-metadata-generate.md | markdown | 2.5 KB |
| references/csp-metadata-format.md | markdown | 12.3 KB |
| references/react-metadata-generate.md | markdown | 1.5 KB |
| scripts/check-api-version.mjsexecutable | script | 1.3 KB |
| scripts/detect-framework.mjsexecutable | script | 3.5 KB |
| scripts/verify-bundle-location.mjsexecutable | script | 5.6 KB |
references/angular-metadata-generate.md
View on GitHub# Angular UI Bundle Scaffold
Reference for the **Angular** 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 angularbasic` to scaffold an Angular 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 angularbasic
```
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
An Angular (TypeScript, standalone components) app under `force-app/main/default/uiBundles/<AppName>/`:
- **Entry HTML:** `src/index.html` (NOT the bundle root), mounting `<app-root>` and carrying a `<base href="/">`.
- **App entry:** `src/main.ts`; `src/app/app.ts` + `src/app/app.html`, `src/app/app.config.ts`, `src/app/app.routes.ts`; pages under `src/app/pages/`.
- **Build:** Angular CLI driven by `angular.json` with the `@angular-builders/custom-esbuild:application` builder. Salesforce integration (API-version substitution, org proxy, Live Preview / `SFDC_ENV` / base-href injection) is wired via the esbuild plugin + `middleware/` — no `vite.config.ts`.
- **Build output:** the builder's `outputPath.browser` is flattened to `dist/`, matching `ui-bundle.json` `outputDir: "dist"` — same as React.
## Default boilerplate to replace
Replace every stock string before shipping — searching for these is the fastest way to find them:
- `<title>MyAngularApp</title>` in `src/index.html` → a real product title.
- Default `<app-root>` welcome/landing markup in `src/app/app.html` and any placeholder page stubs under `src/app/pages/`.
- Placeholder navigation and empty routes (see `experience-ui-bundle-frontend-generate`).
## Notes
- **Dev-server port / CSP:** the Angular bundle's dev server is `sf-angular-serve` (the `package.json` `dev` script, provided by `@salesforce/angular-plugin-ui-bundle`), whose default port is `5173` — the same as React's Vite default — overridable with `SF_UIBUNDLE_PORT`. No Angular-specific CSP Trusted Site change is needed for local dev vs React.
- **Element/binding syntax:** Angular uses `<app-root>` and standalone components with native control flow (`@if` / `@for`) — not JSX. This only matters when authoring pages; the metadata and config files below are framework-neutral.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |