Skip to content
experience-ui-bundle-frontend-generate logo

UI Bundle UI

experience-ui-bundle-frontend-generate

MUST activate before editing ANY file under uiBundles/*/src/ (or the bundle's index.html) for visual or UI changes to an EXISTING app — pages, components, sections, layout, styling, colors, fonts, navigation, animations, branding, or any look-and-feel change. Use this skill when modifying pages, components, layout, styling, navigation, or branding in an existing UI bundle app. Activate when the project contains appLayout.tsx, routes.tsx, src/pages/, src/components/, src/styles/global.css, or the bundle's index.html. This skill contains critical project-specific conventions (appLayout.tsx shell, shadcn/ui components, Tailwind CSS, Salesforce base-path routing, module restrictions) that override general knowledge. Without this skill, generated code will use wrong imports, break routing, or ignore project structure. Do NOT use when creating a new app from scratch or the bundle has not been scaffolded yet (use experience-ui-bundle-app-coordinate instead).

forcedotcom/sf-skills5.2Kinstalls1.1Kstars

SKILL.md

Full skill instructions

UI Bundle UI

Resolve the Bundle Directory

MUST run scripts/​resolve-ui-bundle.sh [project-root] before applying any rule below or writing any file — an ad-hoc find/ls is not a substitute; it does not enforce the exit-code gate below. It reads sfdx-project.json's packageDirectories[0].path (does not assume force-app — the source path is configurable) and looks under <sourceDir>/​main/​default/​uiBundles/:

  • Exit 0, bundle path printed to stdout: exactly one bundle directory found — that is the bundle directory. Use that exact directory name; never substitute a different name (e.g. a generic "AcmePortal" example from a prompt template) for the one actually printed.
  • Exit 2, candidates printed to stderr: multiple uiBundles/​* subdirectories exist — do not guess, and do not write to any of them, or to a bundle name not in the printed list. Ask the user which app/​bundle they mean before editing or running any command.
  • Exit 1: sfdx-project.json missing/​invalid, or no bundle directory found at all.

Run all npm/​lint/​build/​dev commands from inside the resolved bundle directory, never from the project root.

Preconditions

Before applying any rule below, confirm this is an existing, scaffolded UI bundle: MUST run scripts/​check-preconditions.sh <bundle-dir> with the directory resolve-ui-bundle.sh printed.

  • Single-bundle (exit 0) case: run it once, on that bundle.
  • Multi-bundle (exit 2) case: do not run it yet — first ask the user which app/​bundle they mean, per the Resolve step above. Once the user names the bundle, run check-preconditions.sh on that one bundle only. Never run it against multiple candidates speculatively before the user has chosen — that means touching/​inspecting bundles the user didn't ask about.
  • Exit 0: the bundle has src/​appLayout.tsx, src/​routes.tsx, and src/​components/​ui/ — proceed.
  • Exit 1, missing pieces listed: this is a fresh SFDX project, a non-UI-bundle React project, or a partially-scaffolded bundle — stop. Do not fall back to generic React knowledge (e.g. react-router-dom, a hardcoded basename, or raw HTML), and do not hand-write appLayout.tsx/routes.tsx/​a page/​a component to "fill in" the missing scaffold, even for a casual, vague, or urgent-sounding request ("just change the header", "make the background blue"). Tell the user the bundle isn't scaffolded yet and direct them to experience-ui-bundle-app-coordinate (or experience-ui-bundle-metadata-generate) to scaffold it first. If, after the user names their intended bundle, that one turns out to be unscaffolded, stop and redirect for it — do not silently switch to scaffolding a different candidate instead.

Never invent, assume, or fall back to a bundle name that doesn't appear in the actual <sourceDir>/​main/​default/​uiBundles/ listing on disk — including a name that only appears as example/​template text elsewhere (a prompt, a directive, prior conversation). If what's on disk doesn't match that example, disk wins.

Identify the Task

Determine which category the request falls into:

CategoryExamplesImplementation Guide
PageNew routed page (contacts, dashboard, settings)references/​page.md
Header / FooterSite-wide nav bar, footer, branding, renaming the appreferences/​header-footer.md
ComponentWidget, card, table, form, dialogreferences/​component.md

A request to rename/​rebrand the app (e.g. "call it X everywhere a user would see it") is a Header / Footer task even though it doesn't mention "header" by name — it always touches at least two files: src/​appLayout.tsx (header/​nav brand text) AND index.html's <title> (browser tab title). Treat these as one atomic change; a rename that only updates one of the two is incomplete.


Pre-built Features (Check Before Hand-Building)

Some capabilities ship as pre-built, tested feature packages. The catalog evolves and is not something you can know from memory — never decide from the request wording alone whether a capability "is" or "isn't" a feature. Before hand-writing any non-trivial capability (anything beyond a plain page, component, or styling change) in this skill:

  1. Consult the authoritative catalog. Invoke experience-ui-bundle-features-generate, which runs list to show the current set of installable features. Do not rely on a hardcoded or remembered list — this skill deliberately names none, because any names it listed would go stale.
  2. Detect whether a matching feature is already installed in the bundle — inspect package.json dependencies and existing src/ files. If present, do not reinstall or re-implement it — but you must still adopt it: invoke experience-ui-bundle-features-generate to describe it (which reads the feature's README — the adoption contract), wire it into the app, and, if the feature ships config (e.g. a config.json), set that for this app's data and use case. Installed-but-unconfigured is not done.
  3. If a matching feature exists in the catalog but isn't installed, let experience-ui-bundle-features-generate install the tested package. Do not build it from scratch here.
  4. Only hand-build a capability that has no matching catalog feature.

When this skill runs as a phase of experience-ui-bundle-app-coordinate, a matching feature is often already present — installed by an earlier phase, or shipped by the template. Already-present is not a reason to skip: step 2 still requires adopting and configuring that feature for this app. Only the install/​re-implement work is ever skipped — never the wiring and configuration.


Layout and Navigation

appLayout.tsx is the source of truth for navigation and layout. Every page shares this shell.

When making any change that affects navigation, header, footer, sidebar, theme, or layout:

  1. Edit src/​appLayout.tsx — the layout used by routes.tsx
  2. Replace all default/​template nav items and labels with app-specific links and names
  3. Replace placeholder app name everywhere: header, nav brand, footer, <title> in index.html

index.html lives at the bundle root (not under src/), but it is still in scope for this skill whenever branding or the app name changes — the leftover <title>React App</​title> / Vite + React boilerplate is a common ship-blocker that npm run lint/npm run build never catches.

Before finishing, confirm: Did I update appLayout.tsx with real nav items and branding? Then run scripts/​verify-rules.sh to check for residual boilerplate (see Verification below).

WhatWhere
Layout, nav, brandingsrc/​appLayout.tsx
Document titleindex.html (bundle root, outside src/ — still in scope for branding)
Root page contentComponent at root route in routes.tsx

React and TypeScript Standards

Routing

Use a single router package. With createBrowserRouter / RouterProvider, all imports must come from react-router (not react-router-dom).

If the app uses a client-side router (React Router, Remix Router, Vue Router, etc.), always derive basename / basepath / base from the document's <base href> tag at runtime. Never hardcode the basename:

const basename = document.querySelector('base')
  ? new URL(document.querySelector('base').href).pathname.replace(/\/​$/, '')
  : '/';
const router = createBrowserRouter(routes, { basename });

Component Library and Styling

  • shadcn/​ui for components: import { Button } from '@/​components/​ui/​button';
  • Tailwind CSS utility classes

URL and Path Handling

Apps run behind dynamic base paths. Router navigation (<Link to>, navigate()) uses absolute paths (/​x). Non-router attributes (<img src>) use dot-relative (./​x). Prefer Vite import for static assets.

TypeScript

  • Never use any — use proper types, generics, or unknown with type guards
  • Event handlers: (event: React.FormEvent<HTMLFormElement>): void
  • State: useState<User | null>(null) — always provide the type parameter
  • No unsafe assertions (obj as User) — use type guards instead

Module Restrictions

React UI bundles must not import Salesforce platform modules like lightning/​* or @wire (LWC-only). Before writing any data-access code (GraphQL, REST, SDK initialization, or a hook that fetches data), you MUST invoke the experience-ui-bundle-salesforce-data-access skill first. Do not write fetch/axios calls or invent a different data API inline in this skill — this applies even if the clarifying-question answer only implies data fetching in passing.


Design Thinking

The rules in this section and "Frontend Aesthetics" below are creative direction, not hard constraints — they cannot be lint- or build-checked and are judged by review, not automation. Two hard, checkable exceptions: never default to Inter/​Roboto/​Arial/​Space Grotesk/​system fonts, and mobile responsiveness (Tailwind breakpoints, 44px touch targets) is a MUST, not a style preference.

Before coding, commit to a bold aesthetic direction:

  • Purpose: What problem does this interface solve? Who uses it?
  • Tone: Pick a clear direction — brutally minimal, maximalist, retro-futuristic, organic, luxury, playful, editorial, brutalist, art deco, soft/​pastel, industrial. Use these as inspiration but design one true to the context.
  • Differentiation: What makes this unforgettable? What's the one thing someone will remember?

Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work — the key is intentionality, not intensity.


Frontend Aesthetics

  • Typography: Choose distinctive, characterful fonts. Pair a display font with a refined body font. Never default to Inter, Roboto, Arial, Space Grotesk, or system fonts.

  • Color: Commit to a cohesive palette using CSS variables. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Avoid cliched purple gradients on white.

  • Motion: Focus on high-impact moments — one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise. Prefer CSS-only solutions; use Motion library for React when available.

  • Spatial Composition: Unexpected layouts — asymmetry, overlap, diagonal flow, grid-breaking elements. Generous negative space OR controlled density.

  • Backgrounds & Depth: Create atmosphere rather than defaulting to solid colors. Gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, grain overlays.

  • Mobile Responsiveness: All generated UI MUST be mobile-responsive. Use Tailwind responsive prefixes (sm:, md:, lg:) to adapt layouts across breakpoints. Stack columns on small screens, use flexible grids, and ensure touch targets are at least 44px. Test that navigation, typography, and spacing work on mobile viewports.

Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate animations and effects. Minimalist designs need restraint, precision, and careful spacing/​typography. No two designs should look the same — vary themes, fonts, and aesthetics across generations.


Clarifying Questions

Ask one question at a time and stop when you have enough context.

For a Page

  1. Name and purpose?
  2. URL path?
  3. Should it appear in navigation?
  4. Access control? (public, authenticated via PrivateRoute, or unauthenticated via AuthenticationRoute)
  5. Content sections? (list, form, table, detail view)
  6. Data fetching needs?

For a Header / Footer

  1. Header, footer, or both?
  2. Contents? (logo, nav links, user avatar, copyright, social icons)
  3. Sticky header?
  4. Color scheme or style direction?

For a Component

  1. What should it do?
  2. Which page does it belong to?
  3. Shared/​reusable or specific to one feature?
  4. Data or props needed?
  5. Internal state? (loading, toggle, form state)
  6. Specific shadcn components to use?

Verification

Before completing, run all of the following from the resolved UI bundle directory (see "Resolve the Bundle Directory" above):

  1. npm run lint — must result in 0 errors.
  2. npm run build — must succeed.
  3. npm run dev (or the project's dev-server script) — confirm the app starts cleanly so the change is verified at runtime, not just at build time.

lint/build alone do not catch the highest-risk rules in this skill — a wrong react-router-dom import, a hardcoded basename, an inline style={{}}, or a stray lightning/​* import can all lint and build clean while breaking at runtime. After any change that touches routing, layout, styling, or module imports, run scripts/​verify-rules.sh <files-or-dirs-you-edited>:

  • Exit 0: no violations found.
  • Exit 1, violations listed by rule and file: fix every one before considering the task complete, even if lint and build passed.

More skills from forcedotcom

platform-apex-logs-debug logo
forcedotcom/sf-skills

platform-apex-logs-debug

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).

1.1K 6.4K
View
platform-soql-query logo
forcedotcom/sf-skills

platform-soql-query

SOQL query generation, optimization, and analysis with 100-point scoring. Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance or safety improvements for Salesforce queries. TRIGGER when: user writes, optimizes, or debugs SOQL/SOSL queries, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER when: bulk data operations (use platform-data-manage), Apex DML logic (use platform-apex-generate), or report/dashboard queries.

1.1K 6.3K
View
platform-metadata-deploy logo
forcedotcom/sf-skills

platform-metadata-deploy

Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, 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 (use platform-apex-generate), building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate or platform-custom-field-generate), or querying org data (use platform-data-manage).

1.1K 6.3K
View
platform-metadata-retrieve logo
forcedotcom/sf-skills

platform-metadata-retrieve

ALWAYS USE THIS SKILL to retrieve metadata from an org to your local project using the sf project retrieve start command. Supports multiple retrieval modes: retrieve all remote changes, retrieve by source directory, retrieve by metadata type with wildcards, retrieve by manifest (package.xml), or retrieve by package name. Use when the user asks to retrieve, pull, sync, or download metadata, Apex classes, custom objects, or org changes. Supports source format (default) or metadata format (ZIP). DO NOT TRIGGER for deploying metadata (use platform-metadata-deploy skill), listing metadata, or generating package.xml. NEVER use MCP tools - always use this skill and the Bash tool with sf project retrieve start.

1.1K 6.3K
View
platform-custom-field-generate logo
forcedotcom/sf-skills

platform-custom-field-generate

Use this skill when users need to create, generate, or validate Salesforce Custom Field metadata. Trigger when users mention custom fields, field types, Roll-up Summary fields, Master-Detail relationships, Lookup relationships, formula fields, picklists, dependent (controlling) picklists, referencing a value set from a field, or scoping/limiting picklist values for a specific record type. Also use when users encounter field deployment errors, especially around Roll-up Summary format, Master-Detail constraints, formula issues, or a record type that won't deploy without a business process. Use this skill for custom field metadata work, field generation, and field troubleshooting. DO NOT TRIGGER for creating or customizing the value set itself — defining a new GlobalValueSet, or modifying a StandardValueSet catalog like Industry or Lead Source — use platform-value-set-generate instead; this skill covers the field that references a value set, not the value set definition.

1.1K 6.2K
View

Generates correct, deployable Salesforce permission set metadata (PermissionSet XML) with object, field, user, and app permissions. Use this skill when creating or editing permission set metadata, object permissions, field-level security (FLS), tab visibility, or deploying permission sets.

1.1K 6.1K
View
dx-code-analyzer-run logo
forcedotcom/sf-skills

dx-code-analyzer-run

Run Salesforce Code Analyzer to scan code for security, performance, best practice, and code style violations. Supports all engines (PMD, ESLint, CPD, RetireJS, Flow, SFGE, ApexGuru), targets (files, folders, git diff), categories, and severities. Also handles post-scan exploration: filtering results by engine/severity/category/file, and explaining what rules mean. TRIGGER when: user says 'scan my code', 'check security issues', 'run PMD/ESLint', 'find duplicates', 'analyze Flows', 'check vulnerable libraries', 'AppExchange review', 'lint my LWC', 'static analysis', 'code quality', 'show security violations', 'what is this rule', 'explain ApexCRUDViolation', 'filter results', or mentions engines/file types (.cls, .trigger, .js, .flow-meta.xml). Use this skill for scanning, exploring results, and listing rules. DO NOT TRIGGER when: user asks only about installation/configuration (use dx-code-analyzer-configure), or wants to create a custom rule (use dx-code-analyzer-custom-rule-create).

1.1K 6.1K
View
automation-flow-generate logo
forcedotcom/sf-skills

automation-flow-generate

Generate Salesforce Flows using the MCP tool execute_metadata_action. Use when the user asks to create, build, or generate a flow — including Screen, Autolaunched, Record-Triggered (before/after-save), Scheduled. Also trigger for flow-like requests such as "when a record is created", "trigger daily at", "send an email when", "update the field when", "automate", "workflow", or "flow XML/metadata". This is the only skill for Salesforce Flow generation.

1.1K 6K
View
platform-custom-object-generate logo
forcedotcom/sf-skills

platform-custom-object-generate

Use this skill when users need to create, generate, or validate Salesforce Custom Object metadata. Trigger when users mention custom objects, creating objects, object metadata, .object files, sharing models, name fields, or validation rules on objects. Also use when users say things like "create a custom object", "generate object metadata", "set up an object for...", or when they're troubleshooting object deployment errors especially around sharing models and Master-Detail relationships. Always use this skill for any custom object metadata work, including enriching and keeping the object's description current whenever its fields or validation rules change. Do NOT use this skill for non-Custom-Object metadata (Apex, Flows, LWC, Permission Sets, Custom Metadata Types) or for standard Salesforce objects.

1.1K 6K
View
platform-data-manage logo
forcedotcom/sf-skills

platform-data-manage

Salesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use platform-soql-query), Apex test execution (use platform-apex-test-run), or metadata deployment (use platform-metadata-deploy).

1.1K 5.9K
View
experience-lwc-generate logo
forcedotcom/sf-skills

experience-lwc-generate

Lightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use platform-apex-generate), Aura components, or Visualforce.

1.1K 5.9K
View
design-systems-slds-apply logo
forcedotcom/sf-skills

design-systems-slds-apply

Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between Lightning Base Components and SLDS Blueprints, applying styling hooks for theming, using utility classes for layout and spacing, or selecting icons. Triggers include "build a modal", "create a form", "data table", "SLDS styling", "style with hooks", "add an icon".

1.1K 5.8K
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View