@salesforce/afv-skills 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/package.json +5 -4
  2. package/skills/building-webapp-data-visualization/SKILL.md +72 -0
  3. package/skills/building-webapp-data-visualization/implementation/bar-line-chart.md +316 -0
  4. package/skills/building-webapp-data-visualization/implementation/dashboard-layout.md +189 -0
  5. package/skills/building-webapp-data-visualization/implementation/donut-chart.md +181 -0
  6. package/skills/building-webapp-data-visualization/implementation/stat-card.md +150 -0
  7. package/skills/building-webapp-react-components/SKILL.md +96 -0
  8. package/skills/building-webapp-react-components/implementation/component.md +78 -0
  9. package/skills/building-webapp-react-components/implementation/header-footer.md +132 -0
  10. package/skills/building-webapp-react-components/implementation/page.md +93 -0
  11. package/skills/configuring-webapp-csp-trusted-sites/SKILL.md +90 -0
  12. package/skills/configuring-webapp-csp-trusted-sites/implementation/metadata-format.md +281 -0
  13. package/skills/configuring-webapp-metadata/SKILL.md +158 -0
  14. package/skills/creating-webapp/SKILL.md +140 -0
  15. package/skills/deploying-webapp-to-salesforce/SKILL.md +226 -0
  16. package/skills/{salesforce-custom-application → generating-custom-application}/SKILL.md +2 -3
  17. package/skills/{salesforce-custom-field → generating-custom-field}/SKILL.md +2 -2
  18. package/skills/{salesforce-custom-lightning-type → generating-custom-lightning-type}/SKILL.md +37 -3
  19. package/skills/{salesforce-custom-object → generating-custom-object}/SKILL.md +2 -2
  20. package/skills/{salesforce-custom-tab → generating-custom-tab}/SKILL.md +2 -2
  21. package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/SKILL.md +2 -2
  22. package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/docs/handle-ui-components.md +1 -1
  23. package/skills/generating-experience-react-site/SKILL.md +67 -0
  24. package/skills/generating-experience-react-site/docs/configure-metadata-custom-site.md +41 -0
  25. package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience-bundle.md +17 -0
  26. package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience-config.md +21 -0
  27. package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience.md +38 -0
  28. package/skills/generating-experience-react-site/docs/configure-metadata-network.md +72 -0
  29. package/skills/{salesforce-flexipage → generating-flexipage}/SKILL.md +87 -10
  30. package/skills/{salesforce-flow → generating-flow}/SKILL.md +2 -2
  31. package/skills/{salesforce-fragment → generating-fragment}/SKILL.md +2 -2
  32. package/skills/generating-lightning-app/SKILL.md +423 -0
  33. package/skills/{salesforce-list-view → generating-list-view}/SKILL.md +2 -2
  34. package/skills/{generate-permission-set → generating-permission-set}/SKILL.md +2 -2
  35. package/skills/{salesforce-validation-rule → generating-validation-rule}/SKILL.md +2 -2
  36. package/skills/implementing-webapp-file-upload/SKILL.md +396 -0
  37. package/skills/installing-webapp-features/SKILL.md +210 -0
  38. package/skills/managing-webapp-agentforce-conversation-client/SKILL.md +186 -0
  39. package/skills/managing-webapp-agentforce-conversation-client/references/constraints.md +134 -0
  40. package/skills/managing-webapp-agentforce-conversation-client/references/examples.md +132 -0
  41. package/skills/managing-webapp-agentforce-conversation-client/references/style-tokens.md +101 -0
  42. package/skills/managing-webapp-agentforce-conversation-client/references/troubleshooting.md +57 -0
  43. package/skills/switching-org/SKILL.md +28 -0
  44. package/skills/trigger-refactor-pipeline/SKILL.md +1 -1
  45. package/skills/using-webapp-salesforce-data/SKILL.md +363 -0
  46. package/skills/using-webapp-salesforce-data/graphql-search.sh +139 -0
  47. package/skills/salesforce-lightning-app-build/SKILL.md +0 -346
  48. package/skills/salesforce-web-app-creating-records/SKILL.md +0 -84
  49. package/skills/salesforce-web-app-feature/SKILL.md +0 -70
  50. package/skills/salesforce-web-app-list-and-create-records/SKILL.md +0 -36
  51. package/skills/salesforce-web-application/SKILL.md +0 -34
  52. /package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/docs/bootstrap-template-byo-lwr.md +0 -0
  53. /package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/docs/configure-content-brandingSet.md +0 -0
  54. /package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/docs/configure-content-route.md +0 -0
  55. /package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/docs/configure-content-themeLayout.md +0 -0
  56. /package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/docs/configure-content-view.md +0 -0
  57. /package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/docs/configure-guest-sharing-rules.md +0 -0
  58. /package/skills/{salesforce-experience-lwr-site → generating-experience-lwr-site}/docs/handle-component-and-region-ids.md +0 -0
@@ -0,0 +1,17 @@
1
+ # Configure Metadata: DigitalExperienceBundle
2
+
3
+ ## Purpose
4
+ This configuration file creates a **net-new, default** DigitalExperienceBundle metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing DigitalExperienceBundle record. Use this template only when provisioning a brand-new React site.
5
+
6
+ ## File Location
7
+ ```
8
+ digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml
9
+ ```
10
+
11
+ ## Default Template
12
+ ```xml
13
+ <?xml version="1.0" encoding="UTF-8"?>
14
+ <DigitalExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
15
+ <label>{siteName}1</label>
16
+ </DigitalExperienceBundle>
17
+ ```
@@ -0,0 +1,21 @@
1
+ # Configure Metadata: DigitalExperienceConfig
2
+
3
+ ## Purpose
4
+ This configuration file creates a **net-new, default** DigitalExperienceConfig metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing DigitalExperienceConfig record. Use this template only when provisioning a brand-new React site.
5
+
6
+ ## File Location
7
+ ```
8
+ digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml
9
+ ```
10
+
11
+ ## Default Template
12
+ ```xml
13
+ <?xml version="1.0" encoding="UTF-8"?>
14
+ <DigitalExperienceConfig xmlns="http://soap.sforce.com/2006/04/metadata">
15
+ <label>{siteName}</label>
16
+ <site>
17
+ <urlPathPrefix>{siteUrlPathPrefix}</urlPathPrefix>
18
+ </site>
19
+ <space>site/{siteName}1</space>
20
+ </DigitalExperienceConfig>
21
+ ```
@@ -0,0 +1,38 @@
1
+ # Configure Metadata: DigitalExperience (sfdc_cms__site)
2
+
3
+ ## Purpose
4
+ These configuration files create **net-new, default** DigitalExperience content records (`sfdc_cms__site` type) for a Digital Experience React Site. They are not intended to edit or modify existing DigitalExperience content. Use these templates only when provisioning a brand-new React site.
5
+
6
+ The `appContainer: true` and `appSpace` fields in `content.json` are what make this a React site rather than a standard LWR site. The `appSpace` value follows the format `{namespace}__{developerName}` and must match a deployed `WebApplication` metadata record.
7
+
8
+ ## File Location
9
+ The DigitalExperience directory contains only `_meta.json` and `content.json`. Do not create any directories other than `sfdc_cms__site` inside the bundle.
10
+
11
+ ```
12
+ digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/_meta.json
13
+ digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/content.json
14
+ ```
15
+
16
+ ## Default Templates
17
+ ### `_meta.json`
18
+ ```json
19
+ {
20
+ "apiName": "{siteName}1",
21
+ "path": "",
22
+ "type": "sfdc_cms__site"
23
+ }
24
+ ```
25
+
26
+ ### `content.json`
27
+ ```json
28
+ {
29
+ "type": "sfdc_cms__site",
30
+ "title": "{siteName}",
31
+ "urlName": "{siteUrlPathPrefix}",
32
+ "contentBody": {
33
+ "authenticationType": "AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED",
34
+ "appContainer": true,
35
+ "appSpace": "{appNamespace}__{appDevName}"
36
+ }
37
+ }
38
+ ```
@@ -0,0 +1,72 @@
1
+ # Configure Metadata: Network
2
+
3
+ ## Purpose
4
+ This configuration file creates a **net-new, default** Network metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing Network record. Use this template only when provisioning a brand-new React site.
5
+
6
+ ## File Location
7
+ ```
8
+ networks/{siteName}.network-meta.xml
9
+ ```
10
+
11
+ ## Default Template
12
+ ```xml
13
+ <?xml version="1.0" encoding="UTF-8"?>
14
+ <Network xmlns="http://soap.sforce.com/2006/04/metadata">
15
+ <allowInternalUserLogin>false</allowInternalUserLogin>
16
+ <allowMembersToFlag>false</allowMembersToFlag>
17
+ <changePasswordTemplate>unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
18
+ <disableReputationRecordConversations>true</disableReputationRecordConversations>
19
+ <emailSenderAddress>admin@company.com</emailSenderAddress>
20
+ <emailSenderName>{siteName}</emailSenderName>
21
+ <embeddedLoginEnabled>false</embeddedLoginEnabled>
22
+ <enableApexCDNCaching>true</enableApexCDNCaching>
23
+ <enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
24
+ <enableDirectMessages>true</enableDirectMessages>
25
+ <enableExpFriendlyUrlsAsDefault>false</enableExpFriendlyUrlsAsDefault>
26
+ <enableExperienceBundleBasedSnaOverrideEnabled>true</enableExperienceBundleBasedSnaOverrideEnabled>
27
+ <enableGuestChatter>{enableGuestAccess}</enableGuestChatter>
28
+ <enableGuestFileAccess>false</enableGuestFileAccess>
29
+ <enableGuestMemberVisibility>false</enableGuestMemberVisibility>
30
+ <enableImageOptimizationCDN>true</enableImageOptimizationCDN>
31
+ <enableInvitation>false</enableInvitation>
32
+ <enableKnowledgeable>false</enableKnowledgeable>
33
+ <enableLWRExperienceConnectedApp>false</enableLWRExperienceConnectedApp>
34
+ <enableMemberVisibility>false</enableMemberVisibility>
35
+ <enableNicknameDisplay>true</enableNicknameDisplay>
36
+ <enablePrivateMessages>false</enablePrivateMessages>
37
+ <enableReputation>false</enableReputation>
38
+ <enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
39
+ <enableSiteAsContainer>true</enableSiteAsContainer>
40
+ <enableTalkingAboutStats>true</enableTalkingAboutStats>
41
+ <enableTopicAssignmentRules>true</enableTopicAssignmentRules>
42
+ <enableTopicSuggestions>false</enableTopicSuggestions>
43
+ <enableUpDownVote>false</enableUpDownVote>
44
+ <forgotPasswordTemplate>unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
45
+ <gatherCustomerSentimentData>false</gatherCustomerSentimentData>
46
+ <headlessForgotPasswordTemplate>unfiled$public/CommunityHeadlessForgotPasswordTemplate</headlessForgotPasswordTemplate>
47
+ <headlessRegistrationTemplate>unfiled$public/CommunityHeadlessRegistrationTemplate</headlessRegistrationTemplate>
48
+ <networkMemberGroups>
49
+ <profile>admin</profile>
50
+ </networkMemberGroups>
51
+ <networkPageOverrides>
52
+ <changePasswordPageOverrideSetting>Standard</changePasswordPageOverrideSetting>
53
+ <forgotPasswordPageOverrideSetting>Designer</forgotPasswordPageOverrideSetting>
54
+ <homePageOverrideSetting>Designer</homePageOverrideSetting>
55
+ <loginPageOverrideSetting>Designer</loginPageOverrideSetting>
56
+ <selfRegProfilePageOverrideSetting>Designer</selfRegProfilePageOverrideSetting>
57
+ </networkPageOverrides>
58
+ <newSenderAddress>admin@company.com</newSenderAddress>
59
+ <picassoSite>{siteName}1</picassoSite>
60
+ <selfRegistration>false</selfRegistration>
61
+ <sendWelcomeEmail>true</sendWelcomeEmail>
62
+ <site>{siteName}</site>
63
+ <siteArchiveStatus>NotArchived</siteArchiveStatus>
64
+ <status>Live</status>
65
+ <tabs>
66
+ <defaultTab>home</defaultTab>
67
+ <standardTab>Chatter</standardTab>
68
+ </tabs>
69
+ <urlPathPrefix>{siteUrlPathPrefix}vforcesite</urlPathPrefix>
70
+ <welcomeTemplate>unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
71
+ </Network>
72
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: salesforce-flexipage
3
- description: Use this skill when users need to create, generate, modify, or validate Salesforce Lightning pages (FlexiPages). Trigger when users mention RecordPage, AppPage, HomePage, Lightning pages, page layouts, adding components to pages, or page customization. Also use when users say things like "create a Lightning page", "add a component to a page", "customize the record page", "generate a FlexiPage", or when they're working with FlexiPage XML files and need help with components, regions, or deployment errors. Always use this skill for any FlexiPage-related work, even if they just mention "page" in the context of Salesforce.
2
+ name: generating-flexipage
3
+ description: "Use this skill when users need to create, generate, modify, or validate Salesforce Lightning pages (FlexiPages). Trigger when users mention RecordPage, AppPage, HomePage, Lightning pages, page layouts, adding components to pages, or page customization. Also use when users say things like \"create a Lightning page\", \"add a component to a page\", \"customize the record page\", \"generate a FlexiPage\", or when they're working with FlexiPage XML files and need help with components, regions, or deployment errors. Always use this skill for any FlexiPage-related work, even if they just mention \"page\" in the context of Salesforce."
4
4
  ---
5
5
 
6
6
  ## When to Use This Skill
@@ -149,6 +149,68 @@ Every fieldInstance requires:
149
149
  - Must have `fieldInstanceProperties` with `uiBehavior`
150
150
  - Use `Record.{Field}` format
151
151
 
152
+ ### 5. Unique Identifiers and Region Names (CRITICAL - PREVENTS DUPLICATE ERRORS)
153
+
154
+ **EVERY identifier and region/facet name MUST be unique across the entire FlexiPage file.**
155
+
156
+ **Critical Rules:**
157
+ - ❌ **NEVER create two `<flexiPageRegions>` blocks with the same `<name>`**
158
+ - ✅ **If multiple components belong to same facet, combine them in ONE region with multiple `<itemInstances>`**
159
+ - ❌ **NEVER reuse the same `<identifier>` value**
160
+ - ✅ **Always read entire file first and extract ALL existing identifiers and names**
161
+
162
+ **Wrong - This WILL FAIL with duplicate name error:**
163
+ ```xml
164
+ <!-- First field section in detail tab -->
165
+ <flexiPageRegions>
166
+ <itemInstances>
167
+ <componentInstance>
168
+ <identifier>flexipage_property_details_fieldSection</identifier>
169
+ ...
170
+ </componentInstance>
171
+ </itemInstances>
172
+ <name>detailTabContent</name> <!-- ❌ DUPLICATE NAME -->
173
+ <type>Facet</type>
174
+ </flexiPageRegions>
175
+
176
+ <!-- Second field section in detail tab -->
177
+ <flexiPageRegions>
178
+ <itemInstances>
179
+ <componentInstance>
180
+ <identifier>flexipage_pricing_fieldSection</identifier>
181
+ ...
182
+ </componentInstance>
183
+ </itemInstances>
184
+ <name>detailTabContent</name> <!-- ❌ DUPLICATE NAME - DEPLOYMENT FAILS -->
185
+ <type>Facet</type>
186
+ </flexiPageRegions>
187
+ ```
188
+
189
+ **Correct - Combine itemInstances in ONE region:**
190
+ ```xml
191
+ <!-- Both field sections in same detail tab facet -->
192
+ <flexiPageRegions>
193
+ <itemInstances>
194
+ <componentInstance>
195
+ <identifier>flexipage_property_details_fieldSection</identifier>
196
+ ...
197
+ </componentInstance>
198
+ </itemInstances>
199
+ <itemInstances>
200
+ <componentInstance>
201
+ <identifier>flexipage_pricing_fieldSection</identifier>
202
+ ...
203
+ </componentInstance>
204
+ </itemInstances>
205
+ <name>detailTabContent</name> <!-- ✅ ONE REGION, MULTIPLE COMPONENTS -->
206
+ <type>Facet</type>
207
+ </flexiPageRegions>
208
+ ```
209
+
210
+ **When to combine vs separate:**
211
+ - **Combine**: Components that logically belong to same tab/section (e.g., multiple field sections in detail tab)
212
+ - **Separate**: Components that belong to different tabs/sections (e.g., `detailTabContent` vs `relatedTabContent`)
213
+
152
214
  ---
153
215
 
154
216
  ## Common Deployment Errors
@@ -178,7 +240,7 @@ Every fieldInstance requires:
178
240
  **Fix:** Use "Volunteer_Record_Page" not "Volunteer__c_Record_Page"
179
241
 
180
242
  ### "Region specifies mode that parent doesn't support"
181
- **Cause:** Added `<mode>` tag to region
243
+ **Cause:** Added `<mode>` tag to region
182
244
  **Fix:** Remove `<mode>` tags - they're not needed for standard regions
183
245
 
184
246
  ---
@@ -211,21 +273,28 @@ When user provides an existing FlexiPage file path:
211
273
 
212
274
  1. **Read the file** using native file I/O
213
275
  2. **Parse XML** to extract:
214
- - Existing component identifiers
276
+ - **ALL existing component identifiers** (search for all `<identifier>` tags)
277
+ - **ALL existing region/facet names** (search for all `<name>` tags in `<flexiPageRegions>`)
215
278
  - Available regions (parse from file, don't assume names)
216
279
  - Existing facets
217
- 3. **Generate component XML** (apply all rules from "Critical XML Rules" section)
218
- 4. **Insert** into appropriate region
219
- 5. **Write** modified XML back to file
220
- 6. **Deploy**: `sf project deploy start --source-dir force-app/...`
280
+ 3. **Verify uniqueness** - ensure your new identifiers and names don't conflict with ANY existing ones
281
+ 4. **Check if target facet exists** - if adding to a named facet like `detailTabContent` that already exists:
282
+ - **Add new `<itemInstances>` to existing region** (don't create duplicate region)
283
+ - **Insert before the closing `</flexiPageRegions>` tag of that region**
284
+ 5. **Generate component XML** (apply all rules from "Critical XML Rules" section)
285
+ 6. **Insert** into appropriate region or add itemInstances to existing facet
286
+ 7. **Write** modified XML back to file
287
+ 8. **Deploy**: `sf project deploy start --source-dir force-app/...`
221
288
 
222
289
  ---
223
290
 
224
291
  ### Generating Unique Identifiers
225
292
 
226
- **Algorithm**:
293
+ **CRITICAL: Before generating ANY new identifier or facet name, follow the rules in section 5 of "Critical XML Rules" above.**
294
+
295
+ **Identifier Generation Algorithm**:
227
296
  ```
228
- 1. Extract all existing <identifier> values from XML
297
+ 1. Extract ALL existing <identifier> AND <name> values from XML
229
298
  2. Generate base name: {componentType}_{context}
230
299
  Examples: "relatedList_contacts", "richText_header", "tabs_main"
231
300
  3. Find first available number:
@@ -253,6 +322,11 @@ When user provides an existing FlexiPage file path:
253
322
  - Example: `Facet-66d5a4b3-bf14-4665-ba75-1ceaa71b2cde`
254
323
  - Use for field section columns, nested containers, anonymous slots
255
324
 
325
+ **When adding components to existing files:**
326
+ - Check if target facet name already exists
327
+ - If exists: Add new `<itemInstances>` to that existing region (see section 5 above for details)
328
+ - If doesn't exist: Create new region with unique name
329
+
256
330
  ---
257
331
 
258
332
  ### Region Selection
@@ -401,6 +475,9 @@ Identifier Pattern: flexipage_richText or flexipage_richText_{sequence}
401
475
 
402
476
  Before deploying:
403
477
  - [ ] Used CLI to bootstrap (don't start from scratch)
478
+ - [ ] **ALL identifiers are unique** - no duplicate `<identifier>` values anywhere in file
479
+ - [ ] **ALL region/facet names are unique** - no duplicate `<name>` values in `<flexiPageRegions>`
480
+ - [ ] **Multiple components in same facet are combined** - ONE region with multiple `<itemInstances>`, NOT separate regions with same name
404
481
  - [ ] All field references use `Record.{Field}` format
405
482
  - [ ] Each fieldInstance has `fieldInstanceProperties` with `uiBehavior`
406
483
  - [ ] Each fieldInstance in own `<itemInstances>` wrapper
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: salesforce-flow
3
- description: Generate Salesforce Flows using the MCP tool execute_metadata_action. Use when the user asks to create, build, or generate a flow — including Screen, Autolaunched, Record-Triggered (before/after-save), Scheduled. Also trigger for flow-like requests such as "when a record is created", "trigger daily at", "send an email when", "update the field when", "automate", "workflow", or "flow XML/metadata". This is the only skill for Salesforce Flow generation.
2
+ name: generating-flow
3
+ description: "Generate Salesforce Flows using the MCP tool execute_metadata_action. Use when the user asks to create, build, or generate a flow — including Screen, Autolaunched, Record-Triggered (before/after-save), Scheduled. Also trigger for flow-like requests such as \"when a record is created\", \"trigger daily at\", \"send an email when\", \"update the field when\", \"automate\", \"workflow\", or \"flow XML/metadata\". This is the only skill for Salesforce Flow generation."
4
4
  ---
5
5
 
6
6
  ## Goal
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: salesforce-fragment
3
- description: Use this skill when users need to create or edit Salesforce Fragments (reusable UI pieces). Trigger when users mention fragments, UEM blocks, reusable UI templates, structured rendering across Slack/Mobile/LEX, or block-based layouts. Also use when users want to create unified experience components. Always use this skill for any fragment work.
2
+ name: generating-fragment
3
+ description: "Use this skill when users need to create or edit Salesforce Fragments (reusable UI pieces). Trigger when users mention fragments, UEM blocks, reusable UI templates, structured rendering across Slack/Mobile/LEX, or block-based layouts. Also use when users want to create unified experience components. Always use this skill for any fragment work."
4
4
  ---
5
5
 
6
6
  ## When to Use This Skill