generating-ui-bundle-features
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.
Security Assessment
About generating-ui-bundle-features
Generating UI Bundle Features installs pre-built, tested capabilities into Salesforce UI bundles instead of building them from scratch. It activates when a project contains a `uiBundles/*/src/` directory and the user wants to add authentication or search to their app. While the underlying features CLI spans foundational UI libraries (shadcn/ui) through full-stack capabilities (authentication, search, navigation, GraphQL, Agentforce AI), this skill specifically covers two features: authentication (login, logout, protected routes, session management) and search (global search across pages and content). For those two features, it should always be used rather than hand-building an implementation.
The workflow begins by searching the project's own code first — scoped to `src/` to avoid matching node_modules or dist — to check for an existing implementation before installing anything. Available features are discovered with `npx @salesforce/ui-bundle-features list`, optionally filtered by `--search <query>` and expanded with `--verbose`. The `describe <feature>` command reveals a feature's components, dependencies, copy operations, and example files. Installation uses `npx @salesforce/ui-bundle-features install <feature> --ui-bundle-dir <name>`, with options including `--dry-run` to preview changes, `--yes` for non-interactive mode, and conflict controls. If no matching feature is found, the skill directs asking the user before building a custom implementation, since a relevant feature may exist under a different name.
Conflict handling in non-interactive environments uses a two-pass approach: first run with `--on-conflict error` to detect conflicts, then create a resolution JSON file mapping each path to "skip" or "overwrite" and re-run with `--conflict-resolution`. After installation, features may include `__example__` files that demonstrate integration patterns; for each, the agent reads the example, reads the target file shown in the describe output, applies the pattern into the target, and deletes the example file once integration succeeds. Some copy paths also use descriptive-name placeholders that the CLI does not resolve, which must be renamed, relocated, or integrated into an existing file after installation.
FAQ
When does this skill activate?
It activates when the project contains a uiBundles/*/src/ directory and the user wants to add authentication or search to their app. It covers only those two features and should always be used for them instead of building from scratch.
Which features does it cover?
Only two: authentication (login, logout, protected routes, session management) and search (global search across pages and content). The broader features CLI offers more, but this skill is scoped to these two.
How do I find and inspect an available feature?
Use `npx @salesforce/ui-bundle-features list` with `--search <query>` to filter and `--verbose` for full descriptions, then `npx @salesforce/ui-bundle-features describe <feature>` to see its components, dependencies, copy operations, and example files.
How are install conflicts handled in non-interactive environments?
Use a two-pass approach: run with `--on-conflict error` to detect conflicts, then create a resolution JSON file mapping each path to "skip" or "overwrite" and re-run with `--conflict-resolution`. Alternatively `--yes` runs non-interactively and skips conflicts.
What should I do with __example__ files after installing?
For each example, read it to understand the pattern, read the target file shown in the describe output, apply the pattern into the target, then delete the example file after successful integration.
Install generating-ui-bundle-features
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
forcedotcom/sf-skills