/sf-experience:experience-ui-bundle-agentforce-client-generatefrom Salesforce — Experience, LWC & Mobile
Adds, embeds, configures, or removes an Agentforce conversation client (chat widget) in Salesforce UI Bundle projects using React or Angular components.
Ships in Salesforce — Experience, LWC & Mobile. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill is framework-agnostic: it supports both React and Angular UI Bundle apps. The Agentforce client ships as two feature packages that wrap the same Lightning Out glue — pick the one matching the app's framework (detected in Step 0):
| Framework | Feature package | Element | Component symbol |
|---|---|---|---|
| React | @salesforce/ui-bundle-template-feature-react-agentforce-conversation-client | <AgentforceConversationClient /> | AgentforceConversationClient |
| Angular | @salesforce/ui-bundle-template-feature-angular-agentforce-conversation-client | <app-agentforce-conversation-client> | AgentforceConversationClientComponent |
HARD CONSTRAINT: NEVER create a custom agent, chatbot, or chat widget component. ALL such requests MUST be fulfilled by importing and rendering the existing framework-appropriate component (React <AgentforceConversationClient /> or Angular <app-agentforce-conversation-client>) from its feature package as documented below. If a requirement is unsupported by the component's props/inputs, state the limitation — do not improvise an alternative.
Before the component will work, the following Salesforce settings must be configured by the user. ALWAYS call out the prequisites after successfully embedding the agent.
Trusted domains (required only for local development):
localhost:<dev-server-port> — React (Vite) defaults to localhost:5173; the Angular template may use a different port (check the app's dev-server config, e.g. localhost:5174). Add whichever port the app actually runs on.Determine whether the target UI Bundle app is React or Angular before doing anything else — it drives discovery, import, element syntax, and prop binding in every step below.
Run the bundled detector against the app (or uiBundle) root. It performs the detection deterministically and prints exactly one token — react, angular, ambiguous, or unknown:
bash "<skill_dir>/scripts/detect-framework.sh" "<app-or-uiBundle-root>"
The detector combines: an angular.json at/above the root; @angular/core / react in any non-node_modules package.json; and source-file signatures (*.component.ts, app.routes.ts, or @Component-decorated classes for Angular; *.tsx/*.jsx for React).
Act on the result:
react or angular → use that framework. Do NOT ask the user — the detection is deterministic.ambiguous (both frameworks detected) or unknown (neither) → ask the user which framework the app uses before proceeding.Carry the resolved framework through the remaining steps.
Search for existing usage across all app files (not implementation files). Use the grep for the detected framework:
React:
grep -r "AgentforceConversationClient" --include="*.tsx" --include="*.jsx" --exclude-dir=node_modules
Angular:
grep -rn "app-agentforce-conversation-client" --include="*.html" --exclude-dir=node_modules
grep -rn "AgentforceConversationClientComponent" --include="*.ts" --exclude-dir=node_modules
Important: Look for the files that USE the element (for example, shared shells/layouts, route components, or feature pages) — for Angular the <app-agentforce-conversation-client> tag lives in a *.html template and the component is registered in the host's imports: [...]. Do NOT open the component implementation files:
AgentforceConversationClient.tsx / AgentforceConversationClient.jsxconversation.ts, conversation.html, __inherit__conversation.ts, agentforce-embed.service.tsIf multiple files found: Ask the user which component file they are referring to. Do not proceed until clarified.
If found: Read the file and check the current agentId value.
Agent ID validation rule (deterministic):
^0Xx[a-zA-Z0-9]{15}$0Xx and total length is 18 charactersDecision:
agentId matches ^0Xx[a-zA-Z0-9]{15}$ and user wants to update other props → Go to Step 4 (update props)agentId matches ^0Xx[a-zA-Z0-9]{15}$ and user asks to "embed" or "add" the chat client → Inform: "The Agentforce Conversation Client is already embedded in <file> with agent ID <agentId>. Would you like to change the agent or update other props?"
agentId is missing, empty, or does NOT match ^0Xx[a-zA-Z0-9]{15}$ → Continue to Step 2 (need real ID)If user reports an error:
If the user says the component is "not working", "showing an error", or similar — ask them for the specific error message. Then proceed to Step 2 to cross-check the configured agentId against the org.
Verify sf CLI is available:
sf --version
If fails:
sf) is not installed. It's needed to query available agents from your org."npm install -g @salesforce/cli, then continue.^0Xx[a-zA-Z0-9]{15}$), store it, proceed to Step 3.<YOUR_AGENT_ID>.Verify org connectivity:
sf org display --json
If fails:
sf org login web to authenticate."
<YOUR_AGENT_ID>.Note: Even if the user provides their own agentId, the org must be connected for the agent to function at runtime. An agentId without a connected org will not work.
Run the SOQL query defined in references/agent-id-resolution.md.
No records at all:
"No Employee Agents found in this org. Create one in Setup → Agentforce Agents."
Ask user if they want to provide an agent ID manually or skip. If skip, proceed to Step 4 with placeholder <YOUR_AGENT_ID>.
All agents are inactive:
Found Employee Agents but none are active:
- Agentforce Sales Agent (0Xxxx000000001dCAA)
- HR Assistant (0Xxxx0000000002BBB)
To activate: Setup → Agentforce Agents → click the agent name → open in Agent Builder → press Activate. Then re-run this step.
Ask user if they want to provide an agent ID manually or skip. If skip, proceed to Step 4 with placeholder <YOUR_AGENT_ID>.
Has active agents — Path A (fresh install / no existing agentId):
Present only active agents for selection:
Which agent should the chat widget use?
- Property Manager Agent (0Xxxx0000000001CAA)
- HR Assistant (0Xxxx0000000002BBB)
Id for use in Step 4.<YOUR_AGENT_ID> for fresh installs. For existing projects, leave the component as-is.Has active agents — Path B (existing agentId from Step 1, passed format check):
Cross-check the existing agentId against query results:
If user reported an error → surface the agent name even if active, so user can confirm it's the intended one.
If the SOQL query fails, surface the error message from the response directly to the user. Do not guess at the fix — just report what came back. For example:
"The query failed with:
[error message from response]. Check your org permissions or that the API version supports this object."
Use the import for the detected framework.
React — import the component by default in app code:
import { AgentforceConversationClient } from "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client";
If the package is not installed, install it:
npm install @salesforce/ui-bundle-template-feature-react-agentforce-conversation-client
Angular — import the standalone component and register it in the host component's imports array (Angular renders nothing without this registration — there is no React analogue):
import { AgentforceConversationClientComponent } from "@salesforce/ui-bundle-template-feature-angular-agentforce-conversation-client";
@Component({
selector: "app-layout",
imports: [/* existing imports */, AgentforceConversationClientComponent],
templateUrl: "./app-layout.html",
})
export class AppLayoutComponent {}
If the package is not installed, install it:
npm install @salesforce/ui-bundle-template-feature-angular-agentforce-conversation-client
Local/composed imports: Only use a local relative import when the user explicitly asks to use a patched/local component, OR when the app is a composed UI Bundle that already inherits the feature file locally — React composed apps import from ./components/AgentforceConversationClient, and Angular composed apps import AgentforceConversationClientComponent from the inherited feature file (for example ../../../features/agentforce/__inherit__conversation). If the host already imports it that way, match the existing import rather than switching to the package.
Do not infer the import path from file discovery alone. Prefer one consistent import across the codebase.
Determine which sub-step applies:
*.tsx/*.jsx component. Angular: the host component's *.html template — plus its *.ts for import + imports: [] registration.)@Component({ imports: [...] }) array — without this the element renders nothing.agentId from Step 2, or the placeholder <YOUR_AGENT_ID> if the user skipped Step 2.React (JSX):
<AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
Angular (template):
<app-agentforce-conversation-client agentId="0Xx8X00000001AbCDE" />
Angular prop-binding rule (critical): input names are identical to React, but binding syntax differs. A bare attribute is a string, so booleans/numbers/objects MUST use
[prop]binding:
- string →
agentId="0Xx...",width="420px"(plain attribute is fine)- boolean →
[inline]="true",[headerEnabled]="false"(NOT bareinline, which yields the string"")- number →
[width]="420"- object →
[styleTokens]="{ headerBlockBackground: '#0176d3' }"
Verify before finishing (Angular):
[prop] binding — no bare inline/headerEnabled attributes.AgentforceConversationClientComponent is registered in the host component's @Component({ imports: [...] }) array (the element renders nothing without it).<AgentforceConversationClient ... /> for React, <app-agentforce-conversation-client ...> for Angular).agentId is already valid and the user did not ask to change it and Step 2 confirmed it is active, leave it as-is.If the user reports an error after the component has been set up (e.g., "it's not working", "I see an error"), go to Step 2 to validate the configured agentId against the org. Cross-check whether the agent is active, exists, and belongs to the connected org.
Available props/inputs (identical names in both frameworks; only the binding syntax differs — see the Angular rule in Step 4a):
agentId (string, required) - Salesforce agent IDinline (boolean) - true for inline mode, omit for floatingwidth (number | string) - e.g., 420 or "100%"height (number | string) - e.g., 600 or "80vh"headerEnabled (boolean) - Show/hide headerstyleTokens (object) - For all styling (colors, fonts, spacing)salesforceOrigin (string) - Auto-resolvedfrontdoorUrl (string) - Auto-resolvedagentLabel (string) - header title for agentExamples:
Floating mode (default):
// React
<AgentforceConversationClient agentId="0Xx..." />
<!-- Angular -->
<app-agentforce-conversation-client agentId="0Xx..." />
Inline mode with dimensions:
// React
<AgentforceConversationClient agentId="0Xx..." inline width="420px" height="600px" />
<!-- Angular — boolean input needs [ ] binding -->
<app-agentforce-conversation-client agentId="0Xx..." [inline]="true" width="420px" height="600px" />
Adding or updating agent label:
// React
<AgentforceConversationClient agentId="0Xx..." agentLabel="<dummy-agent-label>" />
<!-- Angular -->
<app-agentforce-conversation-client agentId="0Xx..." agentLabel="<dummy-agent-label>" />
Styling rules (mandatory):
styleTokens prop/input. There are no exceptions.style attributes, className/class, or wrapper elements. These approaches will not work and will be ignored by the component.[styleTokens]="{ ... }" binding (an object), not a bare attribute.For the complete list of available style tokens, consult references/style-tokens.md.
For complex patterns, consult references/examples.md for:
Common mistakes to avoid: Consult references/constraints.md for:
If component doesn't appear or authentication fails, see references/troubleshooting.md for:
| File | When to read |
|---|---|
references/agent-id-resolution.md | Step 2 — SOQL query structure, response format, activation path, manual lookup |
references/style-tokens.md | Step 5 — Complete style token reference for all UI areas |
references/examples.md | Step 5 — Layout patterns, sizing, theming combinations, host component examples |
references/constraints.md | Step 4 — Invalid props, invalid styling approaches, files not to edit |
references/troubleshooting.md | Post-setup — Agent activation, trusted domains, cookie settings |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
agentforce, conversation-client, ui-bundle, salesforce, chat-widget
npx claudepluginhub reej-consulting/reej-sf-skills --plugin sf-experience48 skills in this plugin
/commerce-b2b-open-code-components-integrateIntegrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention "integrate open code components", "open source B2B commerce", "add open code components", "forcedotcom/b2b-commerce-open-source-components", or want to add open source commerce components to their store. Copies all components and labels so they become available in Experience Builder./commerce-b2b-open-code-components-replaceReplace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code `site:` component for OOTB definitions. Use when users mention "replace OOTB components", "replace commerce components with open code", "swap OOTB for open source", "replace commerce_builder:", "replace OOTB in site", "replace component in site metadata", "replace component definition", "find open code equivalent", "equivalent open code component", "OOTB to open code mapping", "what is the site component for", components "in this view" or "for a given view", or a specific list of component names — and want to update or only discover mappings in their store metadata./commerce-b2b-store-createInteractive workflow to create Commerce B2B Stores and retrieve storefront metadata. Use when users want to: create B2B Commerce stores, build Commerce storefronts, set up B2B stores from Vibes, retrieve Commerce metadata, deploy Commerce experiences, work with DigitalExperienceBundle for Commerce./commerce-react-storefront-createStand up the commerce-b2b-headless reference React storefront in a Salesforce B2B Commerce org, end to end — discover the org's WebStores, pick one, fill the four org-specific values (WebStore Id, BuyerGroup Id, buyer permission set group, Vite org alias), build + deploy the UI Bundle, assign the site guest user the auth permission set, and hand back the live Experience Cloud storefront URL. Use whenever the user says "create a react storefront in my org", "set up the headless B2B storefront", "deploy commerce-b2b-headless", "stand up a React storefront for <org-alias>", "get me a hosted headless commerce storefront", or points at a cloned commerce-b2b-headless repo and wants it running against their org./experience-accessibility-validateUse this skill to determine whether a Lightning Web Component (LWC) is accessible and meets WCAG accessibility guidelines. TRIGGER when the user asks "is my component accessible?", "does my LWC meet accessibility guidelines?", "is this component WCAG compliant?", "find accessibility problems in this LWC", "is this LWC keyboard accessible?", "does this component work with a screen reader?", "does this component have sufficient color contrast?", "check ARIA usage in this LWC", or "WCAG 2.2 accessibility check". Also TRIGGER when the user wants to fix or improve accessibility (a11y, WCAG, ARIA) in an LWC's HTML, JS, or CSS — semantic markup, focus, keyboard nav, contrast, screen-reader labels, WCAG 2.2 SC. Produces `a11y-review.md` with WCAG-cited findings. DO NOT TRIGGER for general LWC generation (use `experience-lwc-generate`) or SLDS visual/design review not focused on accessibility (use `design-systems-slds-validate`)./experience-afv-analytics-querySystem-of-record for the public Lightning Instrumentation Headless Connect REST API route that retrieves Agentforce Vibes (AFV) metrics, analytics, data, and adoption/usage insights, including token/LOC, weekly active-user, and per-user activity. Supports local result filtering by period (default current), orgType (default All), recordType, modelName (default All), and other explicitly returned row fields after one parameterless API call.3 plugins in 2 repositories ship this exact skill · first indexed Aug 23, 2026
Other plugins' skills for the same job