mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-04 14:25:31 +08:00
fix: improve ui-bundle skill descriptions to reduce false triggers and improve activation
- Add MUST activate + file-pattern triggers to all 9 ui-bundle skills - Remove overly specific examples that waste context tokens - Scope features skill to authentication and search only - Add boundary language between orchestrator and frontend skills - Update metadata skill to use sf template generate ui-bundle --template reactbasic
This commit is contained in:
parent
322362080a
commit
5f7d8da1c2
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: building-ui-bundle-app
|
||||
description: "Orchestrator for multi-step Salesforce React UI bundle work. Use this skill when the task requires more than one ui-bundle skill — e.g. scaffolding + frontend, scaffolding + features + deployment, or any combination of generating-ui-bundle-metadata, generating-ui-bundle-features, using-ui-bundle-salesforce-data, building-ui-bundle-frontend, implementing-ui-bundle-agentforce-conversation-client, implementing-ui-bundle-file-upload, deploying-ui-bundle, or generating-ui-bundle-site. Coordinates phase ordering and dependency management. Do NOT use for Lightning Experience apps with custom objects (use generating-lightning-app). Triggers on: build a React app, build me an app on Salesforce, full-stack UI bundle app, create a web app on Salesforce, scaffold and deploy ui-bundle, ui-bundle app end to end."
|
||||
description: "MUST activate when the prompt says create, build, construct, or generate a new app, site, or page from scratch — even if the prompt also describes visual styling. MUST also activate when the task spans more than one ui-bundle skill. This is the orchestrator that coordinates scaffolding, features, data access, frontend UI, integrations, and deployment in the correct dependency order. Without it, phases execute out of order and the app breaks. Do NOT use for Lightning Experience apps with custom objects (use generating-lightning-app). Do NOT use for single-concern edits to an existing page (use building-ui-bundle-frontend)."
|
||||
metadata:
|
||||
version: "1.0"
|
||||
related-skills: generating-ui-bundle-metadata, generating-ui-bundle-features, using-ui-bundle-salesforce-data, building-ui-bundle-frontend, implementing-ui-bundle-agentforce-conversation-client, implementing-ui-bundle-file-upload, deploying-ui-bundle, generating-experience-react-site
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: building-ui-bundle-frontend
|
||||
description: "Build and modify React UI for Salesforce UI bundles — pages, components, layout, navigation, and headers/footers. Use whenever creating or editing TSX/JSX files or making visual/layout changes. Triggers on: add page, add component, header, footer, navigation, layout, styling, Tailwind, shadcn, React component, appLayout."
|
||||
description: "MUST activate before editing ANY file under uiBundles/*/src/ for visual or UI changes to an EXISTING app — pages, components, sections, layout, styling, colors, fonts, navigation, animations, or any look-and-feel change. Activate when the project contains appLayout.tsx, routes.tsx, src/pages/, src/components/, or global.css. This skill contains critical project-specific conventions (appLayout.tsx shell, shadcn/ui components, Tailwind CSS, Salesforce base-path routing, module restrictions) that override general React knowledge. Without this skill, generated code will use wrong imports, break routing, or ignore project structure. Do NOT use when creating a new app from scratch (use building-ui-bundle-app instead)."
|
||||
---
|
||||
|
||||
# UI Bundle UI
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: deploying-ui-bundle
|
||||
description: "Deploy a Salesforce UI bundle to an org — the full deployment sequence including org authentication, pre-deploy build, metadata deployment, permission set assignment, data import, GraphQL schema fetch, and codegen. Use whenever the user wants to deploy, push to org, assign permission sets, import data, fetch GraphQL schema, run codegen, or set up an org after development. Triggers on: deploy, push to org, deploy metadata, assign permission set, import data, schema fetch, codegen, org auth, authenticate org, build and deploy, post-deploy, org setup."
|
||||
description: "MUST activate when the project contains a uiBundles/ directory or sfdx-project.json and the task involves deploying, pushing to an org, or post-deploy setup. Covers the full deployment sequence: org authentication, pre-deploy build, metadata deployment, permission set assignment, data import, GraphQL schema fetch, and codegen. Activate when files like *.uibundle-meta.xml or sfdx-project.json exist and the user mentions deploying, pushing, org setup, or post-deploy tasks."
|
||||
---
|
||||
|
||||
# Deploying a UI Bundle
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: generating-ui-bundle-features
|
||||
description: "Search and install pre-built features into Salesforce React UI bundles — authentication, shadcn, search, navigation, GraphQL, Agentforce AI, and more. Use whenever searching for or installing features. Always check for an existing feature before building from scratch. Triggers on: install feature, add authentication, add shadcn, add feature, search features, list features."
|
||||
description: "MUST activate when the project contains a uiBundles/ directory and the user wants to add authentication or search to their React app. Only covers two features: authentication (login, logout, protected routes, session management) and search (global search across pages and content). Always use this skill for these two features instead of building from scratch."
|
||||
---
|
||||
|
||||
# UI Bundle Features
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: generating-ui-bundle-metadata
|
||||
description: "Scaffold new Salesforce UI bundles with sf template generate ui-bundle and configure ui-bundle.json (routing, headers, outputDir) and CSP Trusted Sites. Use when running sf template generate ui-bundle, editing ui-bundle.json routing/headers/outputDir, creating or modifying .uibundle-meta.xml files, or registering external domains as CSP Trusted Sites. Triggers on: sf template generate ui-bundle, ui-bundle.json, uibundle-meta.xml, outputDir, routing rewrites, routing redirects, routing fallback, trailingSlash, CSP trusted site, cspTrustedSite, external domain CSP."
|
||||
description: "MUST activate when scaffolding a new UI bundle or React app, or when editing ui-bundle.json, .uibundle-meta.xml, or CSP trusted site files. Scaffold with sf template generate ui-bundle --template reactbasic and configure ui-bundle.json (routing, headers, outputDir) and CSP Trusted Sites. Activate when the task involves files matching *.uibundle-meta.xml, ui-bundle.json, or cspTrustedSites/*.cspTrustedSite-meta.xml."
|
||||
---
|
||||
|
||||
# UI Bundle Metadata
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: generating-ui-bundle-site
|
||||
description: "Use this skill when users need to create or configure a Salesforce Digital Experience Site specifically for hosting a React UI bundle. Trigger when users mention creating an Experience site for a React app, setting up a React site on Salesforce, configuring Network/CustomSite/DigitalExperience metadata for a UI bundle, or deploying site infrastructure for a React application. Also trigger when users mention site URL path prefixes, app namespaces, appDevName, guest access configuration, DigitalExperienceConfig, DigitalExperienceBundle, or sfdc_cms__site content types in the context of React apps. Always use this skill for any React UI bundle site creation or site infrastructure configuration work, even if the user just says \"create a site for my React app\" or \"set up the site for my UI bundle.\""
|
||||
description: "MUST activate when the project contains a uiBundles/ directory and the task involves creating or configuring site infrastructure. Create or configure a Salesforce Digital Experience Site for hosting a React UI bundle. Activate when files matching digitalExperiences/, networks/, customSite/, or DigitalExperienceBundle exist and need modification, or when the user wants to publish, host, or configure guest access for their React app."
|
||||
---
|
||||
|
||||
# Digital Experience Site for React UI Bundles
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: implementing-ui-bundle-agentforce-conversation-client
|
||||
description: 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 React component. Covers styling (colors, fonts, spacing, borders), layout (inline vs floating, width, height, dimensions), and props (agentId, agentLabel, headerEnabled, showHeaderIcon, showAvatar, styleTokens). Also matches references to specific agents (e.g. travel agent, HR agent, support agent, employee agent). Never create a custom agent, chatbot, or chat widget component.
|
||||
description: "MUST activate when the project contains a uiBundles/*/src/ directory and the task involves adding or modifying a chat widget, chatbot, or conversational AI. 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. Covers styling (colors, fonts, spacing, borders), layout (inline vs floating, width, height, dimensions), and props (agentId, agentLabel, headerEnabled, showHeaderIcon, showAvatar, styleTokens). Activate when files under uiBundles/*/src/ import AgentforceConversationClient or when adding any chat or agent functionality to a page. Never create a custom agent, chatbot, or chat widget component."
|
||||
metadata:
|
||||
author: ACC Components
|
||||
version: 1.0.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: implementing-ui-bundle-file-upload
|
||||
description: "Add file upload functionality to React UI bundles with progress tracking and Salesforce ContentVersion integration. Use when the user wants to upload files, attach documents, handle file input, create file dropzones, track upload progress, or link files to Salesforce records. This feature provides programmatic APIs ONLY — no components or hooks are exported. Build your own custom UI using the upload() API. ALWAYS use this feature instead of building file upload from scratch with FormData or XHR."
|
||||
description: "MUST activate when the project contains a uiBundles/ directory and the task involves uploading, attaching, or dropping files. Add file upload functionality to React UI bundles with progress tracking and Salesforce ContentVersion integration. This feature provides programmatic APIs ONLY — build custom UI using the upload() API. ALWAYS use this instead of building file upload from scratch with FormData or XHR."
|
||||
---
|
||||
|
||||
# File Upload API (workflow)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: using-ui-bundle-salesforce-data
|
||||
description: "Salesforce data access for reading, writing, and querying records via REST, GraphQL, Apex, or Platform SDK. Use when the user wants to fetch, search, filter, sort, display, create, update, delete, or attach files to Salesforce records (standard objects like Accounts, Contacts, Opportunities, Cases, Quotes, or any custom object) in a UI bundle or UI component (React, Angular, Vue, etc.); call Chatter, Connect, or Apex REST APIs; or invoke AuraEnabled Apex methods from an external app. Does not apply to authentication/OAuth setup, schema changes (adding fields, relationships), Bulk/Tooling/Metadata API usage, declarative automation (Flows, Process Builder), general LWC/Apex coding guidance without a specific data operation, or Salesforce admin/configuration tasks."
|
||||
description: "MUST activate when the project contains a uiBundles/ directory and the task involves ANY Salesforce record operation — reading, creating, updating, or deleting. This includes forms that submit to Salesforce, pages that display Salesforce records, and any code that touches Salesforce objects or custom objects. Activate when files under uiBundles/*/src/ import from @salesforce/sdk-data, or when *.graphql files or codegen.yml exist. This skill owns all Salesforce data access patterns in React UI bundles. Does not apply to authentication/OAuth setup, schema changes, Bulk/Tooling/Metadata API, or declarative automation."
|
||||
---
|
||||
|
||||
# Salesforce Data Access
|
||||
|
||||
Loading…
Reference in New Issue
Block a user