
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).
- Installs
- 3.7K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/forcedotcom/sf-skills --skill building-ui-bundle-app- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads building-ui-bundle-app automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Building a UI Bundle App
Overview
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.
When to Use This Skill
Use when:
- User requests a "React app", "UI bundle", "web app", or "full-stack app" on Salesforce
- User says "build an app", "create an application" and the context implies a non-LWC based frontend (e.g. React)
- The work produces a complete UI bundle with scaffolding, features, data access, and UI -- not a single component in isolation
Examples that should trigger this skill:
- "Build a React app for managing customer cases with Salesforce data"
- "Create a UI bundle for an employee directory with search and navigation"
- "I need a full-stack React app with authentication, data tables, and file uploads"
- "Build a coffee shop ordering app on Salesforce"
Do NOT use when:
- Creating a single page or component (use
building-ui-bundle-frontend) - Only installing a feature (use
generating-ui-bundle-features) - Only setting up data access (use
using-ui-bundle-salesforce-data) - Only deploying an existing app (use
deploying-ui-bundle) - Building a Lightning Experience app with custom objects and metadata (use
generating-lightning-app) - Troubleshooting or debugging an existing UI bundle
Dependency Graph & Build Order
Phase 1: Scaffolding (Foundation)
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.
Phase 2: Features (Optional)
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.
Phase 3: Data Access (Backend Wiring)
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.
Phase 4: UI (Frontend)
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.
Phase 5: Integrations (Optional)
Agentforce chat widget (if requested)
File upload API (if requested)
These are independent and can be executed in parallel if both are needed.
Phase 6: Deployment
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.
Phase 7: Hosting Target
Choose one of the following based on the app's audience:
Phase 7a: Experience Site (External)
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.
Phase 7b: Custom Application (Internal)
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.
Execution Workflow
STEP 1: Requirements Analysis & Planning
Actions:
- Parse the user's natural language request
- Identify the app name and purpose
- Extract pages and navigation structure
- Identify data entities and Salesforce objects needed
- Detect feature requirements (authentication, search, file upload, chat)
- Determine if an Experience Site is needed
- Identify external domains for CSP registration
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)
STEP 2: Per-Phase Execution
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
-
- Load skill: Invoke
generating-ui-bundle-metadata
- Load skill: Invoke
-
- Execute: Run
sf template generate ui-bundle, install dependencies (npm install), configure meta XML, ui-bundle.json, and CSP trusted sites
- Execute: Run
-
- Verify: Confirm directory structure and metadata files exist
-
- Checkpoint: UI bundle scaffold is ready -- proceed to Phase 2
Phase 2 -- Features (skip if no pre-built features needed)
-
- Load skill: Invoke
generating-ui-bundle-features
- Load skill: Invoke
-
- Execute: Install dependencies, search and install features, integrate example files
-
- Verify: Run
npm run buildto confirm features integrate cleanly
- Verify: Run
-
- Checkpoint: Features installed -- proceed to Phase 3
Phase 3 -- Data Access (skip if no Salesforce data needed)
-
- Load skill: Invoke
using-ui-bundle-salesforce-data
- Load skill: Invoke
-
- Execute: Fetch schema, look up entities, generate queries/mutations, wire into components
-
- Verify: Run
npx eslinton files with GraphQL queries
- Verify: Run
-
- Checkpoint: Data layer ready -- proceed to Phase 4
Phase 4 -- UI
-
- Load skill: Invoke
building-ui-bundle-frontend
- Load skill: Invoke
-
- Execute: Build layout, pages, components, navigation. Replace all boilerplate.
-
- Verify: Run lint and build -- 0 errors required
-
- Checkpoint: UI complete -- proceed to Phase 5
Phase 5 -- Integrations (skip if not requested)
-
- Load skill(s): Invoke
implementing-ui-bundle-agentforce-conversation-client(5a) and/orimplementing-ui-bundle-file-upload(5b). If both are needed, they are independent and can be executed in parallel.
- Load skill(s): Invoke
-
- Execute: Follow each skill's workflow to add the integration
-
- Verify: Run lint and build
-
- Checkpoint: Integrations complete -- proceed to Phase 6
Phase 6 -- Deployment
-
- Load skill: Invoke
deploying-ui-bundle
- Load skill: Invoke
-
- Execute: Follow the 7-step deployment sequence (auth, build, deploy, permissions, data, schema, final build)
-
- Verify: Confirm deployment succeeds and app is accessible
-
- Checkpoint: App deployed -- proceed to Phase 7 if needed
Phase 7a -- Experience Site (skip if not requested or if Custom Application chosen)
-
- Load skill: Invoke
generating-ui-bundle-site
- Load skill: Invoke
-
- Execute: Resolve properties, generate site metadata, deploy
-
- Verify: Confirm site URL is accessible
-
- Checkpoint: Site live -- build complete
Phase 7b -- Custom Application (skip if not requested or if Experience Site chosen)
-
- Load skill: Invoke
generating-ui-bundle-custom-app
- Load skill: Invoke
-
- Execute: Resolve app properties, generate CustomApplication metadata, add CustomApplication target to meta XML
-
- Verify: Confirm app appears in App Launcher
-
- Checkpoint: App registered -- build complete
STEP 3: Final Summary
After 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]
Validation
Before presenting the build as complete, verify:
- Scaffold exists: UI bundle directory with valid meta XML and ui-bundle.json
- Dependencies installed:
node_modules/exists andpackage.jsonhas expected packages - Build passes:
npm run buildproducesdist/with no errors - Lint passes:
npx eslint src/reports 0 errors - No boilerplate: All placeholder text, default titles, and template content has been replaced
- Navigation works:
appLayout.tsxhas real nav items matching created pages - Data layer wired: Components use
@salesforce/sdk-data(if data access phase was executed) - CSP registered: All external domains have CSP Trusted Site metadata (if applicable)
Error Handling
Category 1: Stop and Ask User
- App purpose is too vague to determine pages or data needs
- User wants features that conflict (e.g., "no authentication" + "show user-specific data")
- Target org is unknown and deployment is requested
Category 2: Log Warning, Continue
- A feature install has minor conflicts (resolve and continue)
- Optional integration setup encounters non-blocking issues
- Build has non-error warnings
Best Practices
1. Always Follow Phase Order
Never build UI before installing features. Never deploy before building. Dependencies are strict.
2. Replace All Boilerplate
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.
3. Design with Intent
Follow the design thinking and frontend aesthetics guidance from building-ui-bundle-frontend. Every app should have a clear visual direction -- not generic defaults.
FAQ
What does the building-ui-bundle-app skill do?
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).
How do I install building-ui-bundle-app?
Run npx skills add https://github.com/forcedotcom/sf-skills --skill building-ui-bundle-app in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/building-ui-bundle-app/ (personal) or .claude/skills/building-ui-bundle-app/ (project).
Which AI agents can use building-ui-bundle-app?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is building-ui-bundle-app safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains building-ui-bundle-app?
It is published by forcedotcom in forcedotcom/sf-skills. It has 3,671 recorded installs.
More from forcedotcom/sf-skills
platform-apex-generate
forcedotcom/sf-skills
Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex.
platform-apex-test-generate
forcedotcom/sf-skills
Use to generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking, assertions, and disciplined test-fix loops. Use when creating Apex test classes (for triggers, services, controllers, batch jobs, queueables, and callouts), improving coverage, debugging or fixing failing Apex tests, or running test/coverage analysis. Triggers on Test.cls files, sf apex run test, coverage reports. Do NOT trigger for production Apex (use platform-apex-generate) or Jest/LWC tests.
platform-apex-test-run
forcedotcom/sf-skills
Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user runs Apex tests, checks code coverage, fixes failing tests, or touches Test.cls / Test.cls files. DO NOT TRIGGER when writing Apex production code (use platform-apex-generate), Agentforce agent testing (use agentforce-test), or Jest/LWC tests (use experience-lwc-generate).
platform-apex-logs-debug
forcedotcom/sf-skills
Salesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use platform-apex-test-run), generating or fixing Apex code (use platform-apex-generate), or Agentforce session tracing (use agentforce-observe).
platform-soql-query
forcedotcom/sf-skills
Use when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan/selectivity analysis, and performance or safety improvements. TRIGGER when the user writes, optimizes, or debugs SOQL/SOSL, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER for bulk data operations (use platform-data-manage), Apex DML logic (use platform-apex-generate), or report/dashboard queries.
platform-metadata-deploy
forcedotcom/sf-skills
Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, validates a deploy or does a dry-run, deploys to a Production org, quick-deploys a validated job ID, ships/promotes to prod, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex code, building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate), deleting metadata from an org (use platform-destructive-deploy), or querying org data (use platform-data-manage).
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance 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.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.