generating-ui-bundle-features
forcedotcom/sf-skills
Install pre-built authentication and search features into Salesforce UI bundle apps.
What is generating-ui-bundle-features?
Generates and installs authentication (login, logout, protected routes, session management) and search (global search across pages) features into Salesforce UI bundle projects. Use this when adding these two capabilities to a uiBundles/*/src/ directory instead of building from scratch.
- Install pre-built, tested authentication packages with login, logout, protected routes, and session management
- Add global search functionality across pages and content
- Search available features by keyword using the CLI
- Preview changes with --dry-run before installing
- Handle file conflicts with two-pass detection and resolution approach
- Integrate example files showing implementation patterns
How to install generating-ui-bundle-features
npx skills add https://github.com/forcedotcom/sf-skills --skill generating-ui-bundle-features- Project must contain a uiBundles/*/src/ directory
- Node.js and npm installed to run CLI commands
How to use generating-ui-bundle-features
- 1.Search your project code in src/ to check for existing implementations
- 2.Run npx @salesforce/ui-bundle-features list --search <query> to find available features
- 3.Run npx @salesforce/ui-bundle-features describe <feature> to review components and dependencies
- 4.Run npx @salesforce/ui-bundle-features install <feature> --ui-bundle-dir <name> to install the feature
- 5.Use --dry-run flag to preview changes before installing
- 6.For conflicts, run with --on-conflict error first, then create a resolution JSON file and re-run with --conflict-resolution
- 7.Review and integrate any __example__ files into your target files following the shown patterns
- 8.Delete example files after successful integration
Use cases
- Adding user authentication to a new UI bundle app with protected routes
- Implementing global search across multiple pages in an existing bundle
- Installing pre-built features instead of building custom authentication from scratch
- Resolving file conflicts when features overlap with existing code
- Previewing feature installation impact before committing changes
- Salesforce developers building UI bundle applications
- Teams adding authentication or search to existing bundles
- Developers who want to avoid building these features from scratch
generating-ui-bundle-features FAQ
Only two features: authentication (login, logout, protected routes, session management) and search (global search across pages and content). Always use this skill for these instead of building from scratch.
Use the --dry-run flag with the install command to see what will be changed without applying it.
Use the two-pass approach: first run with --on-conflict error to detect conflicts, then create a resolution JSON file mapping paths to 'skip' or 'overwrite', and re-run with --conflict-resolution.
Some copy paths use <descriptive-name> placeholders (like <desired-page-with-search-input>) that the CLI doesn't resolve. After installation, manually rename or relocate these files to your intended target.
Review any __example__ files included with the feature. Read them to understand the pattern, apply it to your target files, then delete the example files.
Full instructions (SKILL.md)
Source of truth, from forcedotcom/sf-skills.
name: generating-ui-bundle-features description: "MUST activate when the project contains a uiBundles/*/src/ directory and the user wants to add authentication or search to their app. Use this skill when adding authentication or search to a UI bundle app. Only covers two features: authentication (login, logout, protected routes, session management) and search (global search across pages and content). Always use this skill for these two features instead of building from scratch." metadata: version: "1.0"
UI Bundle Features
Installing Pre-built Features
Always check for an existing feature before building something from scratch. The features CLI installs pre-built, tested packages into Salesforce UI bundles — from foundational UI libraries (shadcn/ui) to full-stack capabilities (authentication, search, navigation, GraphQL, Agentforce AI).
Workflow
-
Search project code first — check
src/for existing implementations before installing anything. Scope searches tosrc/to avoid matchingnode_modules/ordist/. -
Search available features — use
npx @salesforce/ui-bundle-features listwith--search <query>to filter by keyword. Use--verbosefor full descriptions. -
Describe a feature — use
npx @salesforce/ui-bundle-features describe <feature>to see components, dependencies, copy operations, and example files. -
Install — use
npx @salesforce/ui-bundle-features install <feature> --ui-bundle-dir <name>. Key options:--dry-runto preview changes--yesfor non-interactive mode (skips conflicts)--on-conflict errorto detect conflicts, then--conflict-resolution <file>to resolve them
If no matching feature is found, ask the user before building a custom implementation — a relevant feature may exist under a different name.
Conflict Handling
In non-interactive environments, use the two-pass approach: first run with --on-conflict error to detect conflicts, then create a resolution JSON file ({ "path": "skip" | "overwrite" }) and re-run with --conflict-resolution.
Post-install: Integrating Example Files
Features may include __example__ files showing integration patterns. For each:
- Read the example file to understand the pattern
- Read the target file (shown in
describeoutput) - Apply the pattern from the example into the target
- Delete the example file after successful integration
Hint Placeholders
Some copy paths use <descriptive-name> placeholders (e.g., <desired-page-with-search-input>) that the CLI does not resolve. After installation, rename or relocate these files to the intended target, or integrate their patterns into an existing file.
Related skills
More from forcedotcom/sf-skills and the wider catalog.

generating-ui-bundle-metadata
Generate and configure UI bundle metadata, routing, and CSP trusted sites for Salesforce apps.

generating-ui-bundle-site
Create and configure Salesforce Digital Experience Sites to host React UI bundles.

generating-validation-rule
Create and manage Salesforce Validation Rules to enforce data quality and business logic at the data layer.

generating-visual-diagrams
AI-powered rendered image generation for Salesforce visuals: ERDs, mockups, wireframes, and architecture diagrams.

getting-datacloud-schema
Retrieve Data Lake Object and Data Model Object schema from Salesforce Data Cloud via REST APIs.

handling-sf-data
Create, update, delete, and bulk import/export Salesforce records using sf CLI and anonymous Apex.