From sf-skills
Orchestrates building a complete Salesforce React UI bundle app end-to-end: scaffolding, features, data access, frontend UI, integrations, and deployment in dependency order.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sf-skills:building-ui-bundle-appThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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)UI Bundle scaffold (sf template generate ui-bundle)
v
Install dependencies (npm install)
v
Bundle metadata (uibundle-meta.xml, ui-bundle.json)
v
CSP Trusted Sites (if external domains needed)
Creates the UI bundle directory structure, meta XML, and optional routing/headers config. All subsequent phases require the scaffold to exist.
Search project code (src/) for existing implementations
v
Install dependencies (npm install)
v
Search, describe, and install features (auth, shadcn, search, navigation, GraphQL)
v
Resolve conflicts (two-pass: --on-conflict error, then --conflict-resolution)
v
Integrate __example__ files into target files, then delete them
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.
Acquire schema (npm run graphql:schema)
v
Look up entity schema (graphql-search.sh, max 2 runs)
v
Generate queries/mutations (use verified field names, @optional on all record fields)
v
Validate and test (npx eslint, ask user before testing mutations)
Sets up the data layer using @salesforce/sdk-data. GraphQL is preferred for record operations; REST for Connect, Apex, or UI API endpoints.
Layout, navigation, header, and footer (appLayout.tsx)
v
Pages (routed views)
v
Components (widgets, forms, tables)
Builds the React UI. References the data layer from Phase 3 and the features from Phase 2. Must replace all boilerplate and placeholder content.
Agentforce chat widget (if requested)
File upload API (if requested)
These are independent and can be executed in parallel if both are needed.
Org authentication
v
Pre-deploy UI bundle build (npm install + npm run build)
v
Deploy metadata
v
Post-deploy configuration (permissions, profiles, named credentials, connected apps, custom settings, flow activation)
v
Import data (if data plan exists)
v
Fetch GraphQL schema and run codegen
*(Re-fetches schema from the deployed org -- required because the remote schema may differ from the local one used in Phase 3)*
v
Final UI bundle build (rebuilds with the deployed schema)
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:
Resolve site properties (siteName, appDevName, etc.)
v
Generate site metadata (Network, CustomSite, DigitalExperience)
v
Deploy site infrastructure
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.
Resolve app properties (appName, appNamespace, appLabel)
v
Generate CustomApplication metadata (applications/*.app-meta.xml)
v
Add <target>CustomApplication</target> to .uibundle-meta.xml
v
Deploy custom application
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
UI Bundle App Build Plan: [App Name]
SCAFFOLDING:
- App name: [PascalCase name]
- Routing: [SPA rewrites, trailing slash config]
- External domains: [domains needing CSP registration]
FEATURES:
- [list of features to install: auth, shadcn, search, navigation, etc.]
DATA ACCESS:
- Objects: [Salesforce objects to query/mutate]
- Queries: [list of GraphQL queries needed]
- REST endpoints: [Apex REST or Connect API calls, if any]
UI:
- Layout: [description of app shell/navigation]
- Pages: [list of pages with routes]
- Components: [key components per page]
- Design direction: [aesthetic/style intent]
INTEGRATIONS (if applicable):
- Agentforce chat: [yes/no, agent ID if known]
- File upload: [yes/no, record linking pattern]
DEPLOYMENT:
- Target org: [org alias if known]
- Hosting target: [Experience Site / Custom Application / none]
SKILL LOAD ORDER:
1. generating-ui-bundle-metadata
2. generating-ui-bundle-features (if features needed)
3. using-ui-bundle-salesforce-data (if data access needed)
4. building-ui-bundle-frontend
5a. implementing-ui-bundle-agentforce-conversation-client (if chat requested)
5b. implementing-ui-bundle-file-upload (if file upload requested)
6. deploying-ui-bundle
7a. generating-ui-bundle-site (if Experience Site requested -- external users)
7b. generating-ui-bundle-custom-app (if Custom Application requested -- internal users)
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:
UI Bundle App Build Complete: [App Name]
PHASES COMPLETED:
[x] Phase 1: Scaffolding -- [app name] UI bundle created
[x] Phase 2: Features -- [list of features installed, or "skipped"]
[x] Phase 3: Data Access -- [list of entities wired up]
[x] Phase 4: UI -- [count] pages, [count] components
[x] Phase 5: Integrations -- [list or "none"]
[x] Phase 6: Deployment -- deployed to [org]
[x] Phase 7: Hosting Target -- [Experience Site URL / Custom Application name / "skipped"]
FILES GENERATED:
[list key files and their paths]
NEXT STEPS:
[any manual steps the user should take]
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.
npx claudepluginhub ccmalcom/sf-skills-plugin --plugin sf-skillsCreates and configures Salesforce Digital Experience Sites to host React UI bundles. Generates Network, CustomSite, and DigitalExperienceConfig metadata. Activates when uiBundles/*/src/ directories exist.
Builds React/Next.js web frontends: components, pages, design systems, state management, typed API clients. Uses structured phases and engagement modes.
Generates React web apps with TinyBase reactive data store for real-time sync. Use when creating new web apps, adding components, or prototyping SPAs with live data.