Skip to content

forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-agentforce-client-generate

experience-ui-bundle-agentforce-client-generate

Verified

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 (React or Angular). 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 in React `.tsx`/`.jsx` files, or use the app-agentforce-conversation-client element in Angular `.html` templates and AgentforceConversationClientComponent in `.component.ts` files; user asks to add any chat or agent functionality to a page. DO NOT TRIGGER when: user wants to create a custom agent, chatbot, or chat widget component from scratch; the project has no uiBundles directory.

FileKindSize
SKILL.mdskill md18.7 KB
references/agent-id-resolution.mdmarkdown1.1 KB
references/constraints.mdmarkdown5.4 KB
references/examples.mdmarkdown5.1 KB
references/style-tokens.mdmarkdown14.7 KB
references/troubleshooting.mdmarkdown2.1 KB
scripts/detect-framework.shexecutablescript2.0 KB

scripts/detect-framework.sh

View on GitHub
#!/usr/bin/env bash
#
# detect-framework.sh — deterministic UI Bundle framework detector.
#
# Usage: bash detect-framework.sh [ROOT]
#   ROOT  app or uiBundle root to inspect (default: current directory)
#
# Prints exactly one of the following tokens to stdout, nothing else:
#   react      — React signals only
#   angular    — Angular signals only
#   ambiguous  — both React and Angular signals present
#   unknown    — neither framework detected
#
# Step 0 of the skill calls this and only asks the user which framework to use
# when the result is `ambiguous` or `unknown`.

set -u

ROOT="${1:-.}"
angular=0
react=0

# Resolve ROOT to an absolute path when possible (for the angular.json walk-up).
abs_root="$(cd "$ROOT" 2>/dev/null && pwd || true)"

# 1) angular.json at or above ROOT → Angular workspace.
dir="$abs_root"
while [ -n "$dir" ]; do
  [ -f "$dir/angular.json" ] && angular=1
  [ "$dir" = "/" ] && break
  dir="$(dirname "$dir")"
done

# 2) package.json dependencies (excluding node_modules).
while IFS= read -r pkg; do
  [ -z "$pkg" ] && continue
  grep -q '"@angular/core"' "$pkg" 2>/dev/null && angular=1
  grep -Eq '"react"[[:space:]]*:' "$pkg" 2>/dev/null && react=1
done <<EOF
$(find "$ROOT" -type d -name node_modules -prune -o -type f -name package.json -print 2>/dev/null)
EOF

# 3) Source-file signatures (excluding node_modules).
has_file() {
  find "$ROOT" -type d -name node_modules -prune -o -type f -name "$1" -print 2>/dev/null | grep -q .
}

# Angular: component files, routing module, or @Component-decorated classes.
has_file '*.component.ts' && angular=1
has_file 'app.routes.ts' && angular=1
if grep -rls --exclude-dir=node_modules --include='*.ts' '@Component' "$ROOT" 2>/dev/null | grep -q .; then
  angular=1
fi

# React: JSX/TSX source files.
has_file '*.tsx' && react=1
has_file '*.jsx' && react=1

if [ "$angular" -eq 1 ] && [ "$react" -eq 1 ]; then
  echo ambiguous
elif [ "$angular" -eq 1 ]; then
  echo angular
elif [ "$react" -eq 1 ]; then
  echo react
else
  echo unknown
fi
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 197kUpdated Claude CodeCodexVerifiedInstall