
Generating Ui Bundle Features
Install pre-built authentication and global search packages into Salesforce UI bundle apps via @salesforce/ui-bundle-features instead of coding login, sessions, and search from scratch.
Overview
Generating UI Bundle Features is an agent skill for the Build phase that installs Salesforce UI bundle authentication and global search via the ui-bundle-features CLI instead of custom implementations.
Install
npx skills add https://github.com/forcedotcom/afv-library --skill generating-ui-bundle-featuresWhat is this skill?
- Hard gate: activate when uiBundles/*/src/ exists and user wants authentication or search
- Covers authentication (login, logout, protected routes, session management) and global search only
- Workflow: search src/ first, then npx @salesforce/ui-bundle-features list, describe, install
- CLI supports --search, --verbose, --ui-bundle-dir, and dependency inspection before install
- Explicit rule: always use this skill for those two features instead of building from scratch
- Covers exactly 2 mandated features: authentication and search
- 4-step CLI workflow: search src, list, describe, install
Adoption & trust: 1.3k installs on skills.sh; 513 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have a uiBundles app and need login or site-wide search but do not know which pre-built Salesforce feature package to install or how to run the CLI safely.
Who is it for?
Salesforce UI bundle projects under uiBundles/*/src/ that need standard auth/session flows or global search quickly.
Skip if: Greenfield apps without a uiBundles src tree, features outside auth/search, or teams that must ignore the mandated CLI path.
When should I use this skill?
Project contains uiBundles/*/src/ and user wants authentication or search; MUST activate per skill description.
What do I get? / Deliverables
Authentication and/or search are installed from tested packages into your bundle with dependencies and file copies applied per feature describe output—then wire CSP if external origins are added.
- Installed auth and/or search feature files in bundle
- Updated src/ per feature copy operations
Recommended Skills
Journey fit
Build is when uiBundles/*/src/ apps gain production features; this skill mandates the supported install path for auth and search. Integrations covers session management, protected routes, and cross-page search wiring into Salesforce UI bundle infrastructure.
How it compares
Use instead of hand-rolling auth or search in src/ when AFV pre-built features already cover those capabilities.
Common Questions / FAQ
Who is generating-ui-bundle-features for?
Solo builders shipping Salesforce UI bundle apps who want CLI-driven installation of authentication and search features.
When should I use generating-ui-bundle-features?
During Build/integrations when your repo has uiBundles/*/src/ and you are adding login, logout, protected routes, session handling, or global search—after checking src/ for existing code.
Is generating-ui-bundle-features safe to install?
Auth touches sessions and routes; review the Security Audits panel on this Prism page and read describe output before install, especially for network-facing dependencies.
Workflow Chain
Then invoke: generating ui bundle metadata
SKILL.md
READMESKILL.md - Generating Ui Bundle Features
# 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 1. **Search project code first** — check `src/` for existing implementations before installing anything. Scope searches to `src/` to avoid matching `node_modules/` or `dist/`. 2. **Search available features** — use `npx @salesforce/ui-bundle-features list` with `--search <query>` to filter by keyword. Use `--verbose` for full descriptions. 3. **Describe a feature** — use `npx @salesforce/ui-bundle-features describe <feature>` to see components, dependencies, copy operations, and example files. 4. **Install** — use `npx @salesforce/ui-bundle-features install <feature> --ui-bundle-dir <name>`. Key options: - `--dry-run` to preview changes - `--yes` for non-interactive mode (skips conflicts) - `--on-conflict error` to 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: 1. Read the example file to understand the pattern 2. Read the target file (shown in `describe` output) 3. Apply the pattern from the example into the target 4. 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.