Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计异常

implementing-ui-bundle-agentforce-conversation-client实施 ui 包 agentforce 对话客户端

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

8,020

周安装

341

GitHub Stars

212

下载量

2,810
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:implementing-ui-bundle-agentforce-conversation-client(实施 ui 包 agentforce 对话客户端)
来源仓库:https://github.com/forcedotcom/afv-library
仓库路径:skills/implementing-ui-bundle-agentforce-conversation-client
安装命令:
npx skills add https://github.com/forcedotcom/afv-library --skill implementing-ui-bundle-agentforce-conversation-client
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/forcedotcom/afv-library --skill implementing-ui-bundle-agentforce-conversation-client

简介

实施 ui 包 agentforce 对话客户端技能用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中需要根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级的任务场景。
  • 核心能力包括用户界面设计、视觉规范制定和交互体验优化,支持现代化前端开发。
  • 安装方式:github;安装命令:npx skills add https://github.com/forcedotcom/afv-library --skill implementing-ui-bundle-agentforce-conversation-client。
  • 使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

SKILL.md

Managing Agentforce Conversation Client

HARD CONSTRAINT: NEVER create a custom agent, chatbot, or chat widget component. ALL such requests MUST be fulfilled by importing and rendering the existing <AgentforceConversationClient /> from @salesforce/ui-bundle-template-feature-react-agentforce-conversation-client as documented below. If a requirement is unsupported by this component's props, state the limitation — do not improvise an alternative.

Prerequisites

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.

Cookie settings:

  • Setup → My Domain → Disable "Require first party use of Salesforce cookies"

Trusted domains (required only for local development):

  • Setup → Session Settings → Trusted Domains for Inline Frames → Add your domain

- Local development: localhost:<PORT> (e.g., localhost:3000)

Instructions

Step 1: Check if component already exists

Search for existing usage across all app files (not implementation files):

grep -r "AgentforceConversationClient" --include="*.tsx" --include="*.jsx" --exclude-dir=node_modules

Important: Look for React files that import and USE the component (for example, shared shells, route components, or feature pages). Do NOT open files named AgentforceConversationClient.tsx or AgentforceConversationClient.jsx - those are the component implementation.

If found: Read the file and check the current agentId value.

Agent ID validation rule (deterministic):

  • Valid only if it matches: ^0Xx[a-zA-Z0-9]{15}$
  • Meaning: starts with 0Xx and total length is 18 characters

Decision:

  • If agentId matches ^0Xx[a-zA-Z0-9]{15}$ and user wants to update other props → Go to Step 4 (update props)
  • If agentId is missing, empty, or does NOT match ^0Xx[a-zA-Z0-9]{15}$ → Continue to Step 2 (need real ID)
  • If not found → Continue to Step 2 (add new)

Step 2: Get agent ID

If component doesn't exist or has an invalid placeholder value, ask user for their Salesforce agent ID.

Treat these as placeholder/invalid values:

  • "0Xx..."
  • "Placeholder"
  • "YOUR_AGENT_ID"
  • "<USER_AGENT_ID_18_CHAR_0Xx...>"
  • Any value that does not match ^0Xx[a-zA-Z0-9]{15}$

Skip this step if:

  • Component exists with a real agent ID
  • User only wants to update styling or dimensions

Step 3: Canonical import strategy

Use this import path 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

Only use a local relative import (for example, ./components/AgentforceConversationClient) when the user explicitly asks to use a patched/local component in that app.

Do not infer import path from file discovery alone. Prefer one consistent package import across the codebase.

Step 4: Add or update component

Determine which sub-step applies:

  • Component NOT found in Step 1 → go to 4a (New installation)
  • Component found in Step 1 → go to 4b (Update existing)

4a — New installation

  1. If the user already specified a target file, use that file. Otherwise, ask the user: *"Which file should I add the AgentforceConversationClient to?"* Do NOT proceed until a target file is confirmed.
  2. Read the target file to understand its existing imports and TSX structure.
  3. Add the import at the top of the file, alongside existing imports. Use the canonical package import from Step 3:
import { AgentforceConversationClient } from "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client";
  1. Insert the <AgentforceConversationClient /> TSX into the component's return block. Place it as a sibling of existing content — do NOT wrap or restructure existing TSX. Use the real agentId obtained in Step 2: Example:
<AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
  1. Do NOT add any other code (wrappers, layout components, new functions) unless the user explicitly requests it.

4b — Update existing

  1. Read the file identified in Step 1.
  2. Locate the existing <AgentforceConversationClient... /> TSX element.
  3. Apply only the changes the user requested. Rules:

- Add new props that the user asked for. - Change prop values the user asked to update. - Preserve every prop and value the user did NOT mention — do not remove, reorder, or reformat them. - Never delete the component and recreate it.

  1. If the current agentId is a placeholder (failed validation in Step 1) and a real agent ID was obtained in Step 2, replace the placeholder value:
// Before
<AgentforceConversationClient agentId="Placeholder" />

// After
<AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
  1. If the current agentId is already valid and the user did not ask to change it, leave it as-is.

Step 5: Configure props

Available props (use directly on component):

  • agentId (string, required) - Salesforce agent ID
  • inline (boolean) - true for inline mode, omit for floating
  • width (number | string) - e.g., 420 or "100%"
  • height (number | string) - e.g., 600 or "80vh"
  • headerEnabled (boolean) - Show/hide header
  • styleTokens (object) - For all styling (colors, fonts, spacing)
  • salesforceOrigin (string) - Auto-resolved
  • frontdoorUrl (string) - Auto-resolved
  • agentLabel (string) - header title for agent

Examples:

Floating mode (default):

<AgentforceConversationClient agentId="0Xx..." />

Inline mode with dimensions:

<AgentforceConversationClient agentId="0Xx..." inline width="420px" height="600px" />

Adding or updating agent label:

<AgentforceConversationClient agentId="0Xx..." agentLabel="<dummy-agent-label>" />

Styling rules (mandatory):

  • ALL visual customization (colors, fonts, spacing, borders, radii, shadows) MUST go through the styleTokens prop. There are no exceptions.
  • ONLY use token names listed in the tables below. Do NOT invent custom token names.
  • NEVER apply styling via CSS files, style attributes, className, or wrapper elements. These approaches will not work and will be ignored by the component.
  • If the user requests a visual change that does not map to a token below, inform them that the change is not supported by the current token set.

Container

Token nameUI area themed
fabBackgroundFAB button background color
containerBackgroundChat container background
headerBackgroundHeader background
containerWidthChat container width
chatBorderRadiusChat border radius
layoutMaxWidthLayout max width

Agentforce Header

Token nameUI area themed
headerBlockBackgroundHeader block background
headerBlockBorderBottomWidthHeader border bottom width
headerBlockBorderBottomStyleHeader border bottom style
headerBlockBorderBottomColorHeader border bottom color
headerBlockBorderRadiusHeader corner radius
headerBlockPaddingBlockHeader block padding (vertical)
headerBlockPaddingInlineHeader inline padding (horizontal)
headerBlockMinHeightHeader minimum height
headerBlockBrandingGapHeader branding area gap
headerBlockFontFamilyHeader font family
headerBlockFontWeightHeader title font weight
headerBlockFontSizeHeader title font size
headerBlockLineHeightHeader title line height
headerBlockTextColorHeader text color
headerBlockIconDisplayHeader icon display
headerBlockIconMarginHeader icon margin
headerBlockIconColorHeader icon color
headerBlockIconWidthHeader icon width
headerBlockIconHeightHeader icon height
headerBlockLogoMaxHeightHeader logo max height
headerBlockLogoMaxWidthHeader logo max width
headerBlockLogoMinWidthHeader logo min width
headerBlockButtonHeightHeader action button height
headerBlockButtonWidthHeader action button width
headerBlockButtonPaddingHeader action button padding
headerBlockButtonBorderRadiusHeader action button border radius
headerBlockHoverBackgroundHeader hover background
headerBlockActiveBackgroundHeader active background
headerBlockFocusBorderHeader focus border

Agentforce Welcome Block

Token nameUI area themed
welcomeBlockTextContainerWidthWelcome text container width
welcomeBlockFontFamilyWelcome block font family
welcomeBlockFontSizeWelcome block font size
welcomeBlockFontWeightWelcome block font weight
welcomeBlockLineHeightWelcome block line height
welcomeBlockLetterSpacingWelcome block letter spacing
welcomeBlockTextColorWelcome block text color
welcomeBlockPaddingVerticalWelcome block vertical padding
welcomeBlockPaddingHorizontalWelcome block horizontal padding
welcomeBlockTextAnimationDurationWelcome text animation duration

Agentforce Messages

Token nameUI area themed
messageBlockBorderRadiusMessage block border radius
avatarDisplayAvatar display property (e.g. block, none)
hideMessageActionsMessage actions display (e.g. block, none to hide)
hideCopyActionCopy action button display (e.g. inline-flex, none)
messageBlockPaddingContainerMessage block container padding
messageBlockFontSizeMessage block font size
messageBlockBackgroundColorMessage block background (base)
messageBlockInboundBorderInbound message border
messageBlockOutboundBorderOutbound message border
messageBlockBodyWidthMessage block body width
messageBlockPaddingMessage block padding
messageBlockContainerMarginTopMessage block container top margin
messageBlockLineHeightMessage block line height

Avatar visibility (behavioral config)

Use renderingConfig.showAvatar to control whether avatars are rendered in message rows.

  • showAvatar: true (default) renders avatars.
  • showAvatar: false hides avatars by removing them from the DOM.

Inbound message (agent → customer)

Token nameUI area themed
inboundMessgeTextColorInbound message text color (base)
messageBlockInboundBorderRadiusInbound message border radius
messageBlockInboundBackgroundColorInbound message background
messageBlockInboundTextColorInbound message text color
messageBlockInboundWidthInbound message width
messageBlockInboundTextAlignInbound message text alignment
messageBlockInboundHoverBackgroundColorInbound message hover background

Outbound message (customer → agent)

Token nameUI area themed
messageBlockOutboundBorderRadiusOutbound message border radius
messageBlockOutboundBackgroundColorOutbound message background
messageBlockOutboundTextColorOutbound message text color
messageBlockOutboundWidthOutbound message width
messageBlockOutboundMarginLeftOutbound message left margin
messageBlockOutboundTextAlignOutbound message text alignment

Agentforce Input

Token nameUI area themed
messageInputPaddingMessage input container padding
messageInputFooterBorderColorMessage input footer border color
messageInputBorderRadiusMessage input border radius
messageInputBorderTransitionDurationMessage input border transition duration
messageInputBorderTransitionEasingMessage input border transition easing
messageInputTextColorMessage input text color
messageInputTextBackgroundColorMessage input text background color
messageInputFooterBorderFocusColorMessage input footer focus border color
messageInputFocusShadowMessage input focus shadow
messageInputMaxHeightMessage input max height
messageInputLineHeightMessage input line height
messageInputTextPaddingMessage input text padding
messageInputFontWeightMessage input font weight
messageInputFontSizeMessage input font size
messageInputOverflowYMessage input overflow Y
messageInputScrollbarWidthMessage input scrollbar width
messageInputScrollbarColorMessage input scrollbar color
messageInputActionsWidthMessage input actions width
messageInputActionsPaddingRightMessage input actions right padding
messageInputFooterPlaceholderTextMessage input placeholder text color
messageInputPlaceholderFontWeightPlaceholder font weight
messageInputErrorTextColorMessage input error text color
messageInputActionsGapMessage input actions gap
messageInputActionsPaddingMessage input actions padding
messageInputActionButtonSizeMessage input action button size
messageInputActionButtonRadiusMessage input action button radius
messageInputFooterSendButtonMessage input send button color
messageInputSendButtonDisabledColorMessage input send button disabled color
messageInputActionButtonFocusBorderMessage input action button focus border
messageInputActionButtonActiveIconColorMessage input action button active icon color
messageInputActionButtonActiveBackgroundMessage input action button active background
messageInputSendButtonIconColorMessage input send button icon color
messageInputFooterSendButtonHoverColorMessage input send button hover color
messageInputActionButtonHoverShadowMessage input action button hover shadow
messageInputFilePreviewPaddingMessage input file preview padding
messageInputTextareaMaxHeightMessage input textarea max height
messageInputTextareaWithImageMaxHeightMessage input textarea max height (with image)

Agentforce Error Block

Token nameUI area themed
errorBlockBackgroundError block background color

Styling with styleTokens:

<AgentforceConversationClient
  agentId="0Xx..."
  styleTokens={{
    headerBlockBackground: "#0176d3",
    headerBlockTextColor: "#ffffff",
    messageBlockInboundBackgroundColor: "#4CAF50",
  }}
/>

For complex patterns, consult references/examples.md for:

  • Sidebar containers and responsive sizing
  • Dark theme and advanced theming combinations
  • Inline without header, calculated dimensions
  • Complete host component examples

Common mistakes to avoid: Consult references/constraints.md for:

  • Invalid props (containerStyle, style, className)
  • Invalid styling approaches (CSS files, style tags)
  • What files NOT to edit (implementation files)

Common Issues

If component doesn't appear or authentication fails, see references/troubleshooting.md for:

  • Agent activation and deployment
  • Localhost trusted domains
  • Cookie restriction settings

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.95%
按下载量换算1,010

Claude

28.8%
按下载量换算809

Cursor

18.88%
按下载量换算531

Gemini CLI

9.63%
按下载量换算271

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills