Back to Skills

implementing-ui-bundle-agentforce-conversation-client

Use this skill when the user asks to add, embed, integrate, configure, style, or remove an agent, chatbot, chat widget, conversation client, or AI assistant in a UI Bundle project. TRIGGER when: project contains a uiBundles/*/src/ directory and the task involves adding or modifying a chat widget, chatbot, or conversational AI; files under uiBundles/*/src/ import AgentforceConversationClient; user asks to add any chat or agent functionality to a page. DO NOT TRIGGER when: user wants to create a c

608stars215forksUpdated 6/25/2026

Security Assessment

Safe(100/100)
Security Score100/100

About implementing-ui-bundle-agentforce-conversation-client

Adds, embeds, configures, styles, or removes an Agentforce conversation client (an agent, chatbot, or chat widget) inside a UI Bundle project. It triggers when the project contains a uiBundles/*/src/ directory and the task involves a chat widget, when files under that directory import AgentforceConversationClient, or when the user asks to add chat or agent functionality to a page. It deliberately does not trigger when the user wants to build a custom agent or chat widget from scratch, or when there is no uiBundles directory. A hard constraint governs the skill: it never creates a custom agent, chatbot, or chat widget component, and all such requests are fulfilled by importing and rendering the existing AgentforceConversationClient from the ui-bundle-template-feature-react-agentforce-conversation-client package; unsupported requirements are stated as limitations rather than improvised.

The workflow first checks whether the component already exists by grepping app files for AgentforceConversationClient while excluding the component implementation files, and reads the current agentId when found. A deterministic validation rule treats an agentId as valid only if it matches the pattern starting with 0Xx and totalling 18 characters. Depending on whether the agentId is valid, missing, or malformed and whether the user wants to embed or update props, the skill branches to update props, change the agent, or resolve a new ID.

Resolving and validating the agent ID uses the Salesforce CLI: it verifies sf is available (offering to install it via npm), verifies org connectivity with sf org display, and runs a SOQL query (defined in references/agent-id-resolution.md) to list Employee Agents. Results are handled for no records, all-inactive agents, fresh installs with active agents, and existing IDs cross-checked against the org, with activation instructions pointing to Setup. The skill never auto-selects an agent, falls back only to SOQL (no GraphQL or Tooling API), and surfaces query errors directly. Prerequisites such as adding the local development domain (localhost on the default Vite port) to Trusted Domains for Inline Frames are always called out, and the canonical import path is used by default in app code.

FAQ

Can this skill build a custom chatbot from scratch?

No. A hard constraint requires every agent, chatbot, or chat widget request to be fulfilled by importing and rendering the existing AgentforceConversationClient component. If a requirement is not supported by its props, the skill states the limitation rather than improvising an alternative.

What makes an agent ID valid?

It must match the deterministic pattern that starts with 0Xx and is exactly 18 characters long. IDs that are missing, empty, or fail this check trigger the agent-ID resolution step.

What is required to query available agents from the org?

The Salesforce CLI (sf) must be installed and an org must be authenticated. The skill verifies sf --version and sf org display --json, offering to install the CLI or run sf org login web, then runs a SOQL query to list Employee Agents.

What local development prerequisite must be configured?

The development domain must be added under Setup, Session Settings, Trusted Domains for Inline Frames, for example localhost on the default Vite dev server port. This entry should be removed before deploying to production.

Does the skill auto-select an agent if only one is found?

No. It always confirms with the user and never auto-selects, even when a single agent exists. It also does not fall back to GraphQL or the Tooling API, using SOQL only, and never activates agents programmatically.

All Files

6 files
references/constraints.md4.2 KB
View
references/examples.md2.6 KB
View
SKILL.md13.4 KB
View
references/agent-id-resolution.md1.1 KB
View
references/style-tokens.md14.4 KB
View
references/troubleshooting.md1.5 KB
View

Install implementing-ui-bundle-agentforce-conversation-client

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill