npx skills add ...
npx skills add forcedotcom/sf-skills --skill building-ui-bundle-app
MUST activate when the user wants to build, create, or generate a React application, React app, web application, single-page application (SPA), or frontend application — even if no project files exist yet. MUST also activate when the project contains a uiBundles/*/src/ directory or sfdx-project.json and the prompt says create, build, construct, or generate a new app, site, or page from scratch — even if the prompt also describes visual styling. MUST also activate when the task spans more than one ui-bundle skill. Use this skill when building a complete app end-to-end. Do NOT use for Lightning Experience apps with custom objects (use generating-lightning-app). Do NOT use for single-concern edits to an existing page (use building-ui-bundle-frontend).
npx skills add forcedotcom/sf-skills --skill building-ui-bundle-app
Build a complete, deployable Salesforce React UI bundle application from a natural language description by orchestrating specialized UI bundle skills in correct dependency order. Each skill MUST be explicitly loaded before executing its phase.
Use when:
Examples that should trigger this skill:
Do NOT use when:
building-ui-bundle-frontend)generating-ui-bundle-features)using-ui-bundle-salesforce-data)deploying-ui-bundle)generating-lightning-app)Creates the UI bundle directory structure, meta XML, and optional routing/headers config. All subsequent phases require the scaffold to exist.
Installs pre-built, tested feature packages. Skip if the app requires no pre-built features. Always check for an existing feature before building from scratch. Features provide the foundation that UI components build on top of.
Sets up the data layer using @salesforce/sdk-data. GraphQL is preferred for record operations; REST for Connect, Apex, or UI API endpoints.
Builds the React UI. References the data layer from Phase 3 and the features from Phase 2. Must replace all boilerplate and placeholder content.
These are independent and can be executed in parallel if both are needed.
Follows the canonical 7-step deployment sequence. Must deploy metadata before fetching schema. Must assign permissions before schema fetch.
Choose one of the following based on the app's audience:
Creates the Digital Experience site that hosts the UI bundle. Use when the user wants a public-facing or authenticated site URL for external users.
Creates a Custom Application entry in the Lightning App Launcher. Use when the app is for internal users accessing it within Lightning Experience.
Actions:
Output: Build Plan
Execute each phase sequentially. Complete all steps within a phase before moving to the next. For each phase:
| Step | What to do | Why |
|---|---|---|
| 1. Load skill | Invoke the skill (e.g., via the Skill tool) for this phase | Gives you the current rules, patterns, constraints, and implementation guides |
| 2. Execute | Follow the loaded skill's workflow to generate code/config | The skill defines HOW to do the work correctly |
| 3. Verify | Run lint and build from the UI bundle directory | Catch errors before moving to the next phase |
| 4. Checkpoint | Confirm phase completion before proceeding | Ensures dependencies are satisfied for the next phase |
Do NOT skip step 1 (loading the skill). Even if you remember the skill's content, skills evolve. Always load the current version.
Phase 1 -- Scaffolding
generating-ui-bundle-metadatasf template generate ui-bundle, install dependencies (npm install), configure meta XML, ui-bundle.json, and CSP trusted sitesPhase 2 -- Features (skip if no pre-built features needed)
generating-ui-bundle-featuresnpm run build to confirm features integrate cleanlyPhase 3 -- Data Access (skip if no Salesforce data needed)
using-ui-bundle-salesforce-datanpx eslint on files with GraphQL queriesPhase 4 -- UI
building-ui-bundle-frontendPhase 5 -- Integrations (skip if not requested)
implementing-ui-bundle-agentforce-conversation-client (5a) and/or implementing-ui-bundle-file-upload (5b). If both are needed, they are independent and can be executed in parallel.Phase 6 -- Deployment
deploying-ui-bundlePhase 7a -- Experience Site (skip if not requested or if Custom Application chosen)
generating-ui-bundle-sitePhase 7b -- Custom Application (skip if not requested or if Experience Site chosen)
generating-ui-bundle-custom-appAfter all phases complete, present a build summary:
Before presenting the build as complete, verify:
node_modules/ exists and package.json has expected packagesnpm run build produces dist/ with no errorsnpx eslint src/ reports 0 errorsappLayout.tsx has real nav items matching created pages@salesforce/sdk-data (if data access phase was executed)Never build UI before installing features. Never deploy before building. Dependencies are strict.
Every generated app must feel purpose-built. Replace "React App" titles, "Vite + React" placeholders, and all default content with real app-specific text and branding.
Follow the design thinking and frontend aesthetics guidance from building-ui-bundle-frontend. Every app should have a clear visual direction -- not generic defaults.