$npx -y skills add forcedotcom/sf-skills --skill experience-ui-bundle-features-generateMUST 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,
| 1 | # UI Bundle Features |
| 2 | |
| 3 | ## Installing Pre-built Features |
| 4 | |
| 5 | 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). |
| 6 | |
| 7 | ### Workflow |
| 8 | |
| 9 | 1. **Search project code first** — check `src/` for existing implementations before installing anything. Scope searches to `src/` to avoid matching `node_modules/` or `dist/`. |
| 10 | |
| 11 | 2. **Search available features** — use `npx @salesforce/ui-bundle-features list` with `--search <query>` to filter by keyword. Use `--verbose` for full descriptions. |
| 12 | |
| 13 | 3. **Describe a feature** — use `npx @salesforce/ui-bundle-features describe <feature>` to see components, dependencies, copy operations, and example files. |
| 14 | |
| 15 | 4. **Install** — use `npx @salesforce/ui-bundle-features install <feature> --ui-bundle-dir <name>`. Key options: |
| 16 | - `--dry-run` to preview changes |
| 17 | - `--yes` for non-interactive mode (skips conflicts) |
| 18 | - `--on-conflict error` to detect conflicts, then `--conflict-resolution <file>` to resolve them |
| 19 | |
| 20 | If no matching feature is found, ask the user before building a custom implementation — a relevant feature may exist under a different name. |
| 21 | |
| 22 | ### Conflict Handling |
| 23 | |
| 24 | 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`. |
| 25 | |
| 26 | ### Post-install: Integrating Example Files |
| 27 | |
| 28 | Features may include `__example__` files showing integration patterns. For each: |
| 29 | |
| 30 | 1. Read the example file to understand the pattern |
| 31 | 2. Read the target file (shown in `describe` output) |
| 32 | 3. Apply the pattern from the example into the target |
| 33 | 4. Delete the example file after successful integration |
| 34 | |
| 35 | ### Hint Placeholders |
| 36 | |
| 37 | 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. |