Experience Ui Bundle Features Generate

作者 forcedotcome5164d94d751无许可证1K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

MUST activate when the project contains a uiBundles/*/src/ directory and the user wants to add a pre-built feature — such as authentication (login, logout, protected routes, session management) or search (global search across pages and content) — instead of building it from scratch. Always run list first to see the current feature catalog, since it can include more than authentication and search. Always use this skill for installing pre-built features rather than hand-building them. DO NOT TRIGGER for Agentforce conversational client or file-upload features — use experience-ui-bundle-agentforce-client-generate and experience-ui-bundle-file-upload-generate respectively.

AI 生成的概览

通过 CLI 将身份验证、搜索等预构建 Salesforce UI 捆绑功能安装到 React UI 捆绑包中。

功能
该技能指导代理使用 @salesforce/ui-bundle-features CLI 将预构建功能安装到 Salesforce UI 捆绑包中。流程包括确认捆绑包基于 React、列出并描述可用功能、执行带冲突处理的安装、整合示例文件、挂载开箱即用组件,以及处理安装后遗留的占位路径。它还会提示身份验证功能所需的组织端前置条件以及已知的注销限制。
适用场景
当项目包含 uiBundles/*/src/ 目录,且用户希望添加身份验证或搜索等预构建功能而不是从零构建时使用。它不适用于 Agentforce 对话客户端或文件上传功能,这些由其他技能处理。
运行要求
需要 Node.js 及 npx、npm(>=7.0.0),需要网络访问以获取 @salesforce/ui-bundle-features 包,并需要一个 npm run build 可正常运行的 React UI 捆绑包。它附带可执行脚本 scripts/verify-react-bundle.sh 和一个参考架构文件。身份验证功能还需要启用 Experience Cloud(Customer Community 或 Customer Community Plus 许可证)以及 Salesforce Sites。

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 and search are the most commonly used features today; run list --verbose for the full current catalog, since it can grow over time.

Ownership note: Agentforce AI conversation clients and file-upload are owned by separate skills (experience-ui-bundle-agentforce-client-generate, experience-ui-bundle-file-upload-generate). If the catalog also lists an Agentforce or file-upload entry, do not install it from both places — confirm with the user which delivery path they want, and never install the same capability twice in one bundle.

Package name: @salesforce/ui-bundle-features is the canonical package name. Some older templates/samples still reference the deprecated @salesforce/ui-bundle-features-experimental name — never use the -experimental suffix. If a command fails to resolve, confirm the published version with npm view @salesforce/ui-bundle-features version before assuming the package name is wrong.

Workflow

  1. Confirm this is a React UI bundle — this CLI copies into src/features/ and expects npm run build to work. Non-React bundles are not supported and will fail late in the install.

    Run scripts/verify-react-bundle.sh. If it exits non-zero, stop — the bundle is not React-based and this skill cannot proceed.

  2. Search project code first — check src/ for existing implementations before installing anything. Scope searches to src/ to avoid matching node_modules/ or dist/.

  3. Search available features — use npx @salesforce/ui-bundle-features list with --search <query> to filter by keyword. Use --verbose for full descriptions.

  4. Describe a feature — MANDATORY before wiring. Run npx @salesforce/ui-bundle-features describe <feature> and read the feature's README via npm view <package> readme (using the Package: name from that output) before wiring it. The README is the contract: it tells you how the feature is meant to be wired — including any drop-in entry component and the file each integration example belongs in. Cross-check against the copied-in source under describe's Copy Operations destination — that source (and its JSDoc) is the version-matched truth for what's actually installed. Do not wire from assumptions about file names or component APIs. Skipping this is the most common reason a feature installs successfully but never actually runs.

  5. 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

    Install features before doing custom frontend/layout work in this bundle — features may rewrite appLayout.tsx/routes.tsx, and installing after hand-built layout changes risks collisions.

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:

  1. Run install with --on-conflict error to detect conflicts without applying them.
  2. Before writing the resolution file, read references/conflict-resolution-schema.json for the allowed keys and enum values.
  3. Write a resolution file at <ui-bundle-dir>/conflict-resolution.json (path is relative to the UI bundle directory being installed into, not the repo root). Key it by the exact paths the CLI printed as conflicts in pass 1, verbatim:
    json
    {  "src/appLayout.tsx": "overwrite",  "src/routes.tsx": "skip"}
    Any conflicting path not listed in this file defaults to skip — the CLI will not overwrite a file you didn't explicitly mark overwrite.
  4. Re-run install with --conflict-resolution <path-to-that-file>.

Post-install: Integrating Example Files

Features may include example files under an __examples__/ directory (plural) showing integration patterns. These are often full, working pages with concrete names (e.g. AccountSearch.tsx), not bare placeholder templates. For each:

  1. Read the example file to understand the pattern — treat it as a working reference implementation, not necessarily a stub.
  2. Read the target file (shown in describe output).
  3. Apply the pattern from the example into the target.
  4. CRITICAL — verify before deleting:
    bash
    # Verify the build passes with the integrated patternnpm run build || {  echo "ERROR: Build failed after integration - do NOT delete __examples__/"  exit 1}
    # Verify the pattern from the example is actually present in the target# (adjust grep pattern to match a key symbol/import/component from the example)# Example: for SearchInput pattern integrated into AccountSearch.tsxgrep -q "SearchInput\|useSearch" src/pages/*.tsx src/components/*.tsx 2>/dev/null || {  echo "ERROR: Pattern from example not found in target files - integration incomplete"  echo "Do NOT delete __examples__/ until the pattern is confirmed present"  exit 1}
    # Only delete after both checks passrm -rf __examples__/

If either check fails, do NOT delete __examples__/ — the integration is incomplete. Fix the integration first, then re-run the verification.

Post-install: Mount the OOTB component, don't hand-roll a parallel one

When a feature ships an integration point, the UI must use it rather than a parallel hand-rolled version. For features that ship an entry component, mount it — e.g. for search, mount the feature's <Search> on the search-results page; do not author a bespoke results page that queries data directly (a custom SearchResults.tsx against seed data or a raw GraphQL call bypasses the installed, tested feature, so the deployed sObject/CMS search never runs). The only exception is when the user explicitly opts out and asks for a custom one — confirm that intent, don't infer it.

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. This is separate from the __examples__/ convention above — a single copy path can use either mechanism.

Auth Feature: Org-Side Prerequisites

Installing the authentication feature only copies files — it does not configure the org. Before telling the user auth is done, flag that these org-side steps still need to happen (outside this skill's scope, but required for the feature to actually work):

  • Digital Experiences (Experience Cloud) must be enabled, with Customer Community / Customer Community Plus licenses assigned to the relevant users, and Salesforce Sites enabled.
  • The community and guest profiles need explicit Apex class access granted for the auth utility, login/registration, and password-reset classes — the CLI does not grant this automatically.
  • Guest-profile sharing rules / org-wide defaults for any objects the auth flow touches.
  • Known limitation: logout has a documented CSRF-handling gap (tracked as W-21253864) — call this out to the user rather than presenting logout as fully solved.

CRITICAL: Resolve <sfdxRoot> After Every Install

The CLI may copy files under a literal <sfdxRoot> folder — an unresolved placeholder for this project's Salesforce DX metadata root (from sfdx-project.json's packageDirectories[].path, e.g. force-app/main/default). Files left there are undeployable.

After every install:

bash
find uiBundles/<AppName> -type d -regex '.*/<[^/]+>$'

If found, move each file to <metadata-root>/<same-relative-subpath> (keep -meta.xml sidecars attached) and delete the emptied placeholder dir(s).

Verification:

  • Re-run find uiBundles/<AppName> -type d -regex '.*/<[^/]+>$' — output must be empty before proceeding.

来源与署名

来源:forcedotcom/sf-skills位于plugins/builder/experience-react/skills/experience-ui-bundle-features-generate提交e5164d9

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 forcedotcom/sf-skills 的技能

Service Itsm Teams Itservice Configure

forcedotcom

Configure the "Set Up Salesforce IT Service" checklist for Microsoft Teams Employee Service (ITSM) — the employee side, covering app enablement, marketplace install guidance, user access assignment, and Digital Experience Site selection. Use this for: 'turn on Salesforce IT Service', 'set up IT Service on Teams', 'assign Teams for Employee permission set', 'give employees access to Teams for Employee Service', 'manage user access for Teams ITSM', 'grant users the permission sets needed for Teams Employee Service', 'select a digital experience site for Teams', 'install Salesforce IT Service app on Teams', or any request to complete the IT Service half of the Teams ITSM Go page checklist (including the Manage User Access step). DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Desk/fulfiller half of the checklist (service-itsm-teams-itdesk-configure).

待分类1K昨天更新

Service Itsm Teams Coordinate

forcedotcom

End-to-end autopilot orchestrator for setting up Microsoft Teams integration in Salesforce Service Cloud ITSM — runs the whole flow (enable the Teams for Employee Service Go feature, register the Microsoft Entra app, populate Named Credentials, configure the IT Desk and IT Service checklists, turn on Swarming, and optionally embed the Agentforce agent) in one continuous pass, stopping only at the points a human must act. Use when the user asks to set up Microsoft Teams for ITSM end to end, 'set up teams for it service', 'do the whole teams itsm setup', 'configure microsoft teams for employee service', or wants a guided Teams ITSM walkthrough. Delegates each stage to a specialized child skill while driving the sequence itself. DO NOT TRIGGER when the user asks to enable Teams alone, configure just the IT Desk or IT Service checklist alone, or enable Swarming alone — delegate directly to the specific child skill in those cases.

待分类1K昨天更新

Service Itsm Teams Itdesk Configure

forcedotcom

Configure the "Set Up Salesforce IT Desk" checklist for Microsoft Teams Employee Service (ITSM) — the fulfiller/agent side, covering app enablement, marketplace install guidance, user access assignment, and Swarming collaboration-tool setup. Use this for: 'turn on Salesforce IT Desk', 'set up IT Desk on Teams', 'assign Teams for IT Desk permission set', 'set Teams as collaboration tool for swarming', 'install Salesforce IT Desk app on Teams', or any request to complete the IT Desk half of the Teams ITSM Go page checklist. DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Service/employee half of the checklist (service-itsm-teams-itservice-configure).

待分类1K昨天更新

Service Itsm Teams Debug

forcedotcom

通过针对 Salesforce 组织运行通过/失败配置检查清单,诊断 Microsoft Teams 员工服务(ITSM)配置故障。

DevOps & Cloud1K昨天更新

Service Itsm Teams Employee Agent Configure

forcedotcom

Configure the embedded Agentforce Employee Agent so it replies inside the Microsoft Teams ITSM custom client ('Salesforce Employee Assist' / 'Ask AI Agent'). Use this for: 'set up employee agent in Teams', 'embed Agentforce agent in Teams', 'make the IT Service Employee Agent reply in Teams', 'Teams Ask AI Agent not responding', 'agent joins then leaves without replying', 'configure MIAW deployment for Teams employee agent', 'Teams embedded messaging agent setup'. Builds the whole stack headlessly (zero Setup-UI clicks): the Web messaging channel with User Verification ON, the Enhanced Chat User Verification Key Set (JWKS_URL) it requires, the Teams_AgentForce custom-client deployment, the routing flow to the agent, and the Agent Access permission set that lets the portal user reach the agent. DO NOT TRIGGER for enabling the Teams feature Salesforce Go page toggle (service-itsm-teams-configure) or for configuring notification preferences.

待分类1K昨天更新

Service Itsm Swarming Configure

forcedotcom

通过 Connect API 调用启用 Salesforce Swarming ITSM 功能,并将协作工具设为 Teams。

DevOps & Cloud1K昨天更新