afv-library/skills/generating-ui-bundle-features/SKILL.md
k-j-kim 77108bae20
fix: tighten ui-bundle skill descriptions to reduce false triggers @W-21800526@ (#162)
* fix: tighten skill descriptions to reduce false triggers

- generating-ui-bundle-metadata: remove generic triggers (metadata, new app,
  meta XML, configuration), update command to sf template generate ui-bundle,
  add --template reactbasic flag
- building-ui-bundle-app: reframe as orchestrator for multi-skill ui-bundle
  work, distinguish from generating-lightning-app

* fix: improve ui-bundle skill descriptions to reduce false triggers and improve activation

- Add MUST activate + file-pattern triggers to all 9 ui-bundle skills
- Remove overly specific examples that waste context tokens
- Scope features skill to authentication and search only
- Add boundary language between orchestrator and frontend skills
- Update metadata skill to use sf template generate ui-bundle --template reactbasic

* fix: standardize uiBundles/*/src/ directory trigger across all ui-bundle skills

* fix: remove React references from skill descriptions for framework agnosticism

* fix: standardize uiBundles/*/src/ trigger in agentforce and data skills

* fix: add 'Use this skill when' trigger context to all ui-bundle skill descriptions

* fix: require mobile-responsive UI in building-ui-bundle-frontend skill
2026-04-03 09:22:32 +05:30

2.6 KiB

name description
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.

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.