@salesforce/afv-skills 1.33.0 → 1.35.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 (146) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-architecture-analyze/SKILL.md +8 -0
  3. package/skills/agentforce-bot-upgrade/SKILL.md +0 -2
  4. package/skills/agentforce-d360-analyze/SKILL.md +8 -0
  5. package/skills/agentforce-observe/SKILL.md +3 -0
  6. package/skills/agentforce-test/SKILL.md +3 -0
  7. package/skills/automation-flow-generate/SKILL.md +1 -0
  8. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +239 -0
  9. package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +21 -0
  10. package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +90 -0
  11. package/skills/automation-sandbox-post-copy-config-generate/examples/sample_sop_excerpt.md +31 -0
  12. package/skills/automation-sandbox-post-copy-config-generate/examples/sample_sop_to_config.json +50 -0
  13. package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +76 -0
  14. package/skills/automation-sandbox-post-copy-config-generate/references/sop_parsing_patterns.md +157 -0
  15. package/skills/automation-sandbox-post-copy-config-generate/references/source_format_handling.md +230 -0
  16. package/skills/commerce-b2b-open-code-components-integrate/SKILL.md +8 -0
  17. package/skills/commerce-b2b-open-code-components-replace/SKILL.md +2 -0
  18. package/skills/commerce-b2b-store-create/SKILL.md +4 -1
  19. package/skills/data360-activate/SKILL.md +12 -0
  20. package/skills/data360-code-extension-generate/SKILL.md +6 -6
  21. package/skills/data360-connect/SKILL.md +11 -0
  22. package/skills/data360-harmonize/SKILL.md +11 -0
  23. package/skills/data360-orchestrate/SKILL.md +30 -0
  24. package/skills/data360-prepare/SKILL.md +14 -0
  25. package/skills/data360-query/SKILL.md +10 -0
  26. package/skills/data360-schema-get/SKILL.md +7 -0
  27. package/skills/data360-segment/SKILL.md +11 -0
  28. package/skills/design-systems-slds-validate/SKILL.md +8 -0
  29. package/skills/design-systems-slds2-migrate/SKILL.md +3 -0
  30. package/skills/dx-apexguru-scan/SKILL.md +403 -0
  31. package/skills/dx-apexguru-scan/examples/README.md +54 -0
  32. package/skills/dx-apexguru-scan/examples/sample-decoded-summary.json +176 -0
  33. package/skills/dx-apexguru-scan/examples/sample-full-no-runtime-response.json +26 -0
  34. package/skills/dx-apexguru-scan/examples/sample-succeeded-response.json +15 -0
  35. package/skills/dx-apexguru-scan/references/api-reference.md +81 -0
  36. package/skills/dx-apexguru-scan/references/authentication.md +134 -0
  37. package/skills/dx-apexguru-scan/references/error-handling.md +56 -0
  38. package/skills/dx-apexguru-scan/references/violation-catalog.md +28 -0
  39. package/skills/dx-apexguru-scan/scripts/build-zip.sh +87 -0
  40. package/skills/dx-apexguru-scan/scripts/decode-report.js +389 -0
  41. package/skills/dx-apexguru-scan/scripts/resolve-token.sh +151 -0
  42. package/skills/dx-apexguru-scan/scripts/run-scan.sh +153 -0
  43. package/skills/dx-apexguru-scan/scripts/scan.sh +96 -0
  44. package/skills/dx-apexguru-scan/scripts/validate-token.js +121 -0
  45. package/skills/dx-app-analytics-query/SKILL.md +5 -0
  46. package/skills/dx-code-analyzer-configure/SKILL.md +5 -5
  47. package/skills/dx-code-analyzer-custom-rule-create/SKILL.md +3 -1
  48. package/skills/dx-code-analyzer-run/SKILL.md +10 -2
  49. package/skills/dx-devops-pipeline-manage/SKILL.md +263 -0
  50. package/skills/dx-devops-pipeline-manage/examples/common-workflows.md +177 -0
  51. package/skills/dx-devops-pipeline-manage/references/cli-commands.md +298 -0
  52. package/skills/dx-devops-pipeline-manage/references/parsing-patterns.md +134 -0
  53. package/skills/dx-devops-pipeline-manage/scripts/check-activation-ready.sh +34 -0
  54. package/skills/dx-devops-pipeline-manage/scripts/validate-org-type.sh +17 -0
  55. package/skills/dx-devops-pipeline-manage/scripts/verify-operation.sh +82 -0
  56. package/skills/dx-devops-promote/SKILL.md +214 -0
  57. package/skills/dx-devops-promote/examples/promotion-workflows.md +212 -0
  58. package/skills/dx-devops-promote/references/cli-commands.md +303 -0
  59. package/skills/dx-devops-test-failures-analyze/SKILL.md +8 -0
  60. package/skills/dx-devops-test-pipeline-configure/SKILL.md +7 -0
  61. package/skills/dx-devops-test-suite-assignments-configure/SKILL.md +9 -0
  62. package/skills/dx-devops-test-suite-run/SKILL.md +8 -0
  63. package/skills/dx-org-switch/SKILL.md +3 -0
  64. package/skills/experience-lwc-base-components-integrate/SKILL.md +176 -0
  65. package/skills/experience-lwc-base-components-integrate/references/lbc-expert-guidance.md +127 -0
  66. package/skills/experience-lwc-base-components-integrate/references/lightning-component-index.md +179 -0
  67. package/skills/experience-lwc-base-components-integrate/references/lightning-components.md +5429 -0
  68. package/skills/experience-lwc-base-components-integrate/scripts/extract-component-docs.sh +61 -0
  69. package/skills/experience-lwc-generate/SKILL.md +18 -0
  70. package/skills/experience-lwc-rtl-validate/SKILL.md +149 -0
  71. package/skills/experience-lwc-rtl-validate/references/rtl-expert.md +892 -0
  72. package/skills/experience-lwc-rtl-validate/scripts/scan-rtl-css.sh +206 -0
  73. package/skills/experience-lwc-typescript-migrate/SKILL.md +207 -0
  74. package/skills/experience-lwc-typescript-migrate/assets/dts-template.ts +15 -0
  75. package/skills/experience-lwc-typescript-migrate/assets/type-patterns.ts +44 -0
  76. package/skills/experience-lwc-typescript-migrate/scripts/find-consumers.sh +128 -0
  77. package/skills/experience-lwr-site-generate/SKILL.md +1 -1
  78. package/skills/experience-ui-bundle-agentforce-client-generate/SKILL.md +5 -2
  79. package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +1 -1
  80. package/skills/experience-ui-bundle-file-upload-generate/SKILL.md +5 -0
  81. package/skills/experience-ui-bundle-localize/SKILL.md +323 -0
  82. package/skills/experience-ui-bundle-localize/references/gotchas.md +249 -0
  83. package/skills/experience-ui-bundle-localize/references/i18n-setup.md +169 -0
  84. package/skills/experience-ui-bundle-localize/references/interpolation.md +311 -0
  85. package/skills/experience-ui-bundle-localize/references/label-xml.md +282 -0
  86. package/skills/experience-ui-bundle-localize/references/verifying.md +219 -0
  87. package/skills/experience-ui-bundle-localize/scripts/check-i18n-wired.sh +195 -0
  88. package/skills/experience-ui-bundle-localize/scripts/check-manifest-registered.sh +100 -0
  89. package/skills/experience-ui-bundle-localize/scripts/check-org-api-version.sh +40 -0
  90. package/skills/experience-ui-bundle-localize/scripts/detect-bundle-type.sh +57 -0
  91. package/skills/experience-ui-bundle-metadata-generate/SKILL.md +1 -1
  92. package/skills/experience-ui-bundle-project-generate/SKILL.md +4 -4
  93. package/skills/experience-ui-bundle-salesforce-data-access/SKILL.md +11 -0
  94. package/skills/external-diagram-mermaid-generate/SKILL.md +21 -0
  95. package/skills/integration-connectivity-generate/SKILL.md +17 -0
  96. package/skills/integration-eventing-cdc-configure/SKILL.md +9 -0
  97. package/skills/integration-eventing-subscription-configure/SKILL.md +7 -0
  98. package/skills/mobile-apps-create/SKILL.md +5 -0
  99. package/skills/mobile-platform-native-capabilities-integrate/SKILL.md +3 -0
  100. package/skills/mobile-platform-offline-validate/SKILL.md +9 -0
  101. package/skills/omnistudio-callable-apex-generate/SKILL.md +14 -0
  102. package/skills/omnistudio-datamapper-generate/SKILL.md +13 -0
  103. package/skills/omnistudio-datapacks-deploy/SKILL.md +18 -0
  104. package/skills/omnistudio-dependencies-analyze/SKILL.md +12 -0
  105. package/skills/omnistudio-epc-catalog-generate/SKILL.md +15 -0
  106. package/skills/omnistudio-flexcard-generate/SKILL.md +11 -0
  107. package/skills/omnistudio-integration-procedure-generate/SKILL.md +11 -0
  108. package/skills/omnistudio-omniscript-generate/SKILL.md +9 -0
  109. package/skills/platform-agentexchange-partner-offers-configure/SKILL.md +8 -0
  110. package/skills/platform-agentsetup-categories-fetch/SKILL.md +3 -0
  111. package/skills/platform-apex-generate/SKILL.md +5 -0
  112. package/skills/platform-apex-logs-debug/SKILL.md +12 -0
  113. package/skills/platform-apex-test-generate/SKILL.md +5 -0
  114. package/skills/platform-apex-test-run/SKILL.md +14 -0
  115. package/skills/platform-custom-application-generate/SKILL.md +1 -0
  116. package/skills/platform-custom-field-generate/SKILL.md +1 -1
  117. package/skills/platform-custom-lightning-type-generate/SKILL.md +3 -0
  118. package/skills/platform-custom-lightning-type-generate/assets/primitive-types-and-constraints.md +1 -1
  119. package/skills/platform-custom-tab-generate/SKILL.md +1 -0
  120. package/skills/platform-data-manage/SKILL.md +15 -0
  121. package/skills/platform-dataspace-access-configure/SKILL.md +2 -2
  122. package/skills/platform-flexipage-generate/SKILL.md +3 -0
  123. package/skills/platform-lightning-app-coordinate/SKILL.md +18 -1
  124. package/skills/platform-mcp-tool-widget-coordinate/SKILL.md +250 -0
  125. package/skills/platform-mcp-tool-widget-coordinate/examples/action-name-source-prompt.md +74 -0
  126. package/skills/platform-mcp-tool-widget-coordinate/examples/apex-invocable-source-prompt.md +90 -0
  127. package/skills/platform-mcp-tool-widget-coordinate/examples/nested-object-source-prompt.md +191 -0
  128. package/skills/platform-mcp-tool-widget-coordinate/examples/pasted-tool-output-prompt.md +85 -0
  129. package/skills/platform-mcp-tool-widget-coordinate/references/build-plan-format.md +74 -0
  130. package/skills/platform-mcp-tool-widget-coordinate/references/mcp-tool-output-discovery.md +184 -0
  131. package/skills/platform-mcp-tool-widget-coordinate/references/two-clt-modeling.md +128 -0
  132. package/skills/platform-mcp-tool-widget-coordinate/references/validation-gates.md +181 -0
  133. package/skills/platform-metadata-api-context-get/SKILL.md +6 -2
  134. package/skills/platform-metadata-retrieve/SKILL.md +5 -0
  135. package/skills/platform-models-api-configure/SKILL.md +10 -0
  136. package/skills/platform-permission-set-generate/SKILL.md +1 -2
  137. package/skills/platform-policy-rule-generate/SKILL.md +2 -0
  138. package/skills/platform-report-generate/SKILL.md +1 -1
  139. package/skills/platform-sharing-rules-generate/SKILL.md +1 -1
  140. package/skills/platform-soql-query/SKILL.md +13 -0
  141. package/skills/platform-tracing-agentforce-configure/SKILL.md +5 -1
  142. package/skills/platform-tracing-configure/SKILL.md +4 -1
  143. package/skills/platform-trust-archive-manage/SKILL.md +3 -0
  144. package/skills/platform-validation-rule-generate/SKILL.md +1 -0
  145. package/skills/platform-widget-generate/SKILL.md +2 -1
  146. package/skills/sales-agentforce-pipeline-management-configure/SKILL.md +3 -1
@@ -2,6 +2,18 @@
2
2
  name: omnistudio-dependencies-analyze
3
3
  description: "Cross-cutting OmniStudio analysis skill for namespace detection, dependency visualization, and impact analysis across OmniScripts, FlexCards, Integration Procedures, and Data Mappers. TRIGGER when: user asks about OmniStudio dependencies, wants namespace detection (Core vs vlocity_cmt vs vlocity_ins), needs impact analysis, requests dependency graphs or Mermaid diagrams, or asks which components are affected by a change. DO NOT TRIGGER when: authoring OmniScripts (use omnistudio-omniscript-generate), building FlexCards (use omnistudio-flexcard-generate), creating Integration Procedures (use omnistudio-integration-procedure-generate), or configuring Data Mappers (use omnistudio-datamapper-generate)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["sf"]
7
+ semver: ">=2.0.0"
8
+ relatedSkills:
9
+ - "external-diagram-mermaid-generate"
10
+ - "omnistudio-datamapper-generate"
11
+ - "omnistudio-flexcard-generate"
12
+ - "omnistudio-integration-procedure-generate"
13
+ - "omnistudio-omniscript-generate"
14
+ - "platform-custom-field-generate"
15
+ - "platform-custom-object-generate"
16
+ - "platform-metadata-deploy"
5
17
  version: "1.0"
6
18
  ---
7
19
 
@@ -2,7 +2,22 @@
2
2
  name: omnistudio-epc-catalog-generate
3
3
  description: "Salesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use omnistudio-omniscript-generate, omnistudio-flexcard-generate, or omnistudio-integration-procedure-generate), implementing Apex business logic (use platform-apex-generate), or troubleshooting deployment pipelines (use platform-metadata-deploy)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["sf"]
7
+ semver: ">=2.0.0"
8
+ relatedSkills:
9
+ - "omnistudio-callable-apex-generate"
10
+ - "omnistudio-dependencies-analyze"
11
+ - "omnistudio-flexcard-generate"
12
+ - "omnistudio-integration-procedure-generate"
13
+ - "omnistudio-omniscript-generate"
14
+ - "platform-apex-generate"
15
+ - "platform-custom-field-generate"
16
+ - "platform-custom-object-generate"
17
+ - "platform-metadata-deploy"
18
+ - "platform-soql-query"
5
19
  version: "1.0"
20
+ minApiVersion: "60.0"
6
21
  ---
7
22
 
8
23
  # omnistudio-epc-catalog-generate: CME EPC Product and Offer Modeling
@@ -2,7 +2,18 @@
2
2
  name: omnistudio-flexcard-generate
3
3
  description: "OmniStudio FlexCard creation and validation with 130-point scoring. Use when building at-a-glance UI cards, configuring data source bindings to Integration Procedures, or reviewing existing FlexCard definitions for accessibility and performance. TRIGGER when: user creates FlexCards, configures data sources, designs card layouts, or asks about OmniUiCard metadata. DO NOT TRIGGER when: building OmniScripts (use omnistudio-omniscript-generate), creating Integration Procedures (use omnistudio-integration-procedure-generate), or analyzing dependencies (use omnistudio-dependencies-analyze)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["sf"]
7
+ semver: ">=2.0.0"
8
+ relatedSkills:
9
+ - "experience-lwc-generate"
10
+ - "omnistudio-datamapper-generate"
11
+ - "omnistudio-dependencies-analyze"
12
+ - "omnistudio-integration-procedure-generate"
13
+ - "omnistudio-omniscript-generate"
14
+ - "platform-metadata-deploy"
5
15
  version: "1.0"
16
+ minApiVersion: "60.0"
6
17
  ---
7
18
 
8
19
  # omnistudio-flexcard-generate: OmniStudio FlexCard Creation and Validation
@@ -2,7 +2,18 @@
2
2
  name: omnistudio-integration-procedure-generate
3
3
  description: "OmniStudio Integration Procedure creation and validation with 110-point scoring. Use this skill when building server-side process orchestrations that combine Data Mapper actions, Apex Remote Actions, HTTP callouts, and conditional logic. TRIGGER when: user creates Integration Procedures, adds Data Mapper steps, configures Remote Actions, or reviews existing IP configurations. DO NOT TRIGGER when: building OmniScripts (use omnistudio-omniscript-generate), creating Data Mappers directly (use omnistudio-datamapper-generate), or analyzing cross-component dependencies (use omnistudio-dependencies-analyze)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["sf"]
7
+ semver: ">=2.0.0"
8
+ relatedSkills:
9
+ - "omnistudio-datamapper-generate"
10
+ - "omnistudio-dependencies-analyze"
11
+ - "omnistudio-flexcard-generate"
12
+ - "omnistudio-omniscript-generate"
13
+ - "platform-apex-generate"
14
+ - "platform-metadata-deploy"
5
15
  version: "1.0"
16
+ minApiVersion: "60.0"
6
17
  ---
7
18
 
8
19
  # omnistudio-integration-procedure-generate: OmniStudio Integration Procedure Creation and Validation
@@ -2,6 +2,15 @@
2
2
  name: omnistudio-omniscript-generate
3
3
  description: "OmniStudio OmniScript creation and validation with 120-point scoring. Use when building guided digital experiences, multi-step forms, or interactive processes that orchestrate Integration Procedures and Data Mappers. TRIGGER when: user creates OmniScripts, designs step flows, configures element types, or reviews existing OmniScript configurations. DO NOT TRIGGER when: building FlexCards (use omnistudio-flexcard-generate), creating Integration Procedures directly (use omnistudio-integration-procedure-generate), or analyzing dependencies (use omnistudio-dependencies-analyze)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["sf"]
7
+ semver: ">=2.0.0"
8
+ relatedSkills:
9
+ - "omnistudio-datamapper-generate"
10
+ - "omnistudio-dependencies-analyze"
11
+ - "omnistudio-flexcard-generate"
12
+ - "omnistudio-integration-procedure-generate"
13
+ - "platform-metadata-deploy"
5
14
  version: "1.0"
6
15
  ---
7
16
 
@@ -2,6 +2,14 @@
2
2
  name: platform-agentexchange-partner-offers-configure
3
3
  description: "Enable or disable the org preference that controls whether a Salesforce org can receive partner offers from the Transactable Marketplace. Use this skill when the user wants to turn partner offer reception on or off for an org. TRIGGER when: user asks to enable or disable partner offers, configure TransactableMarketplaceReceivePartnerOffers, configure enableTransactableMarketplaceReceivePartnerOffers, set up marketplace partner offer reception, toggle the TM partner offers setting, edit a TransactableMarketplacePrivateOffer.settings file, or configure org preferences related to transactable marketplace. DO NOT TRIGGER when: user needs to create or manage the partner offer records themselves, configure marketplace listing settings, or work with SfdcPartnerOffer objects (use platform-metadata-deploy or platform-apex-generate instead)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["jq"]
7
+ semver: ">=1.6.0"
8
+ - tool: ["sf"]
9
+ semver: ">=2.0.0"
10
+ relatedSkills:
11
+ - "platform-apex-generate"
12
+ - "platform-metadata-deploy"
5
13
  version: "1.0"
6
14
  minApiVersion: "67.0"
7
15
  ---
@@ -3,6 +3,9 @@ name: platform-agentsetup-categories-fetch
3
3
  description: "Fetch agentic setup prompt categories from a connected Salesforce org using the Connect API. Use this skill to call GET /agenticsetup/categories and return the list of prompt categories, optionally with their nested prompts. TRIGGER when: user asks to get, fetch, list, or show agentic setup categories, prompt categories, setup copilot categories, prompt library categories, available setup prompts, Agentforce prompt library, or copilot prompts. DO NOT TRIGGER when: user wants to create new categories, work with non-categories endpoints, or generate OpenAPI specs."
4
4
  allowed-tools: Bash Read
5
5
  metadata:
6
+ cliTools:
7
+ - tool: ["sf"]
8
+ semver: ">=2.0.0"
6
9
  version: "1.0"
7
10
  minApiVersion: "67.0"
8
11
  ---
@@ -2,6 +2,11 @@
2
2
  name: platform-apex-generate
3
3
  description: "Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["sf"]
7
+ semver: ">=2.0.0"
8
+ relatedSkills:
9
+ - "platform-apex-test-generate"
5
10
  version: "1.0"
6
11
  minApiVersion: "66.0"
7
12
  ---
@@ -2,6 +2,18 @@
2
2
  name: platform-apex-logs-debug
3
3
  description: "Salesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use platform-apex-test-run), generating or fixing Apex code (use platform-apex-generate), or Agentforce session tracing (use agentforce-observe)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["jq"]
7
+ semver: ">=1.6.0"
8
+ - tool: ["sf"]
9
+ semver: ">=2.0.0"
10
+ relatedSkills:
11
+ - "agentforce-observe"
12
+ - "platform-apex-generate"
13
+ - "platform-apex-test-run"
14
+ - "platform-data-manage"
15
+ - "platform-metadata-deploy"
16
+ - "platform-soql-query"
5
17
  version: "1.1"
6
18
  ---
7
19
 
@@ -3,6 +3,11 @@ name: platform-apex-test-generate
3
3
  description: "Generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking strategies, assertion best practices, and disciplined test-fix loops. Use this skill when creating new Apex test classes, improving test coverage, debugging and fixing failing Apex tests, running test execution and coverage analysis, or implementing testing patterns for triggers, services, controllers, batch jobs, queueables, and integrations. Triggers on *Test.cls, *_Test.cls files, sf apex run test workflows, coverage reports, test-fix loops. Do NOT trigger for production Apex code (use platform-apex-generate) or Jest/LWC tests."
4
4
  metadata:
5
5
  version: "1.0"
6
+ relatedSkills:
7
+ - "platform-apex-generate"
8
+ cliTools:
9
+ - tool: ["sf"]
10
+ semver: ">=2.0.0"
6
11
  ---
7
12
 
8
13
  # Generating Apex Tests
@@ -2,6 +2,20 @@
2
2
  name: platform-apex-test-run
3
3
  description: "Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user needs to run Apex tests, check code coverage, fix failing tests, or work with *Test.cls / *_Test.cls files. TRIGGER when: user runs Apex tests, checks code coverage, fixes failing tests, or touches *Test.cls / *_Test.cls files. DO NOT TRIGGER when: writing Apex production code (use platform-apex-generate), Agentforce agent testing (use agentforce-test), or Jest/LWC tests (use experience-lwc-generate)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["jq"]
7
+ semver: ">=1.6.0"
8
+ - tool: ["python3"]
9
+ semver: ">=3.10.0"
10
+ - tool: ["sf"]
11
+ semver: ">=2.0.0"
12
+ relatedSkills:
13
+ - "agentforce-test"
14
+ - "experience-lwc-generate"
15
+ - "platform-apex-generate"
16
+ - "platform-apex-logs-debug"
17
+ - "platform-data-manage"
18
+ - "platform-metadata-deploy"
5
19
  version: "1.1"
6
20
  ---
7
21
 
@@ -3,6 +3,7 @@ name: platform-custom-application-generate
3
3
  description: "Use this skill when users need to create or configure tab-based Salesforce Custom Applications with navigation, branding, and action overrides. Trigger when users mention custom apps, application metadata, app navigation, or organizing tabs into applications. Use when users want to create app containers for tabs and pages. Do NOT use when the goal is hosting a React UI bundle in the App Launcher — use experience-ui-bundle-custom-app-generate for that case."
4
4
  metadata:
5
5
  version: "1.0"
6
+ minApiVersion: "60.0"
6
7
  ---
7
8
 
8
9
  ## When to Use This Skill
@@ -3,7 +3,7 @@ name: platform-custom-field-generate
3
3
  description: "Use this skill when users need to create, generate, or validate Salesforce Custom Field metadata. Trigger when users mention custom fields, field types, Roll-up Summary fields, Master-Detail relationships, Lookup relationships, formula fields, picklists, dependent (controlling) picklists, referencing a value set from a field, or scoping/limiting picklist values for a specific record type. Also use when users encounter field deployment errors, especially around Roll-up Summary format, Master-Detail constraints, formula issues, or a record type that won't deploy without a business process. Use this skill for custom field metadata work, field generation, and field troubleshooting. DO NOT TRIGGER for creating or customizing the value set itself — defining a new GlobalValueSet, or modifying a StandardValueSet catalog like Industry or Lead Source — use platform-value-set-generate instead; this skill covers the field that references a value set, not the value set definition."
4
4
  metadata:
5
5
  version: "1.0"
6
- minApiVersion: "51.0"
6
+ minApiVersion: "60.0"
7
7
  relatedSkills: ["platform-value-set-generate", "platform-validation-rule-generate"]
8
8
  ---
9
9
 
@@ -6,6 +6,7 @@ metadata:
6
6
  minApiVersion: "60.0"
7
7
  relatedSkills:
8
8
  - "platform-lightning-type-widget-coordinate"
9
+ - "platform-mcp-tool-widget-coordinate"
9
10
  - "platform-widget-generate"
10
11
  ---
11
12
 
@@ -57,6 +58,7 @@ Custom Lightning Types (CLTs) are JSON Schema-based type definitions used by the
57
58
  - **Apex class CLTs are minimal**:
58
59
  - Include **only** `title`, `description` (optional), and `lightning:type` set to `@apexClassType/...`.
59
60
  - Do **not** add `type`, `properties`, `required`, or `unevaluatedProperties`.
61
+ - **Custom LWC renderers/editors on an Apex class CLT MUST NOT use `attributes` in the root override — this overrides any prompt wording to the contrary.** Since the schema has no `properties` block, there is nothing for `{!$attrs.<name>}` to resolve against — `unevaluatedProperties: false` will reject any attribute key (e.g. `"You can't add the flightId property ... because the unevaluatedProperties keyword value is set to false"`). Use `"componentOverrides": { "$": { "definition": "c/<yourComponent>" } }` with **no `attributes` key** at all. **If the user's prompt explicitly asks for attribute mappings to specific fields (e.g. "with attribute mappings for fieldA, fieldB") on an Apex-class CLT renderer/editor, do NOT comply literally** — omit `attributes` from the root override anyway, and say so in your response (e.g. "Note: attribute mappings were omitted because the backing type is an Apex-class CLT, which has no `properties` block to bind against").
60
62
  - **No shell metacharacters that trigger the Vibes safe-shell filter.** In any Bash tool call emitted by this skill, do NOT use command substitution (`$(…)` or backticks), process substitution (`<(…)`, `>(…)`), brace expansion (`{a,b,c}` or `{1..N}`), or `eval` / `exec`. Vibes forces manual approval on these patterns even under Bypass mode and stalls the eval. Emit separate commands (`mkdir -p a && mkdir -p b`) or print each value with its own command and reason about the output rather than capturing it in a shell variable.
61
63
 
62
64
  ## Additional CLT Metaschema Validations
@@ -158,6 +160,7 @@ When you need the full list of supported primitive `lightning:type` identifiers,
158
160
  | `additionalProperties` error on layout attributes | Adding `label` or other attributes to `lightning/propertyLayout` | Only use `property` attribute in `lightning/propertyLayout`. Remove `label`, `title`, or any other attributes |
159
161
  | Invalid target configuration for custom LWC | Custom LWC component's `-meta.xml` missing required target (`lightning__AgentforceInput` or `lightning__AgentforceOutput`) | Add correct target to LWC's `-meta.xml`: use `lightning__AgentforceInput` for editors, `lightning__AgentforceOutput` for renderers |
160
162
  | Attribute mapping doesn't exist in type schema | Using `{!$attrs.propertyName}` where `propertyName` is not defined in schema | Ensure all attribute mappings reference actual properties in your type schema's `properties` section |
163
+ | `unevaluatedProperties` error on custom LWC renderer for an Apex class CLT | Root override `attributes` mapping used on an Apex class CLT, which has no `properties` block to validate against | Remove `attributes` entirely from the root override; use `"componentOverrides": { "$": { "definition": "c/<component>" } }` only |
161
164
  | `additionalProperties` error with deprecated keys | Using `propertyRenderers` or `view` in editor/renderer config | Replace deprecated `propertyRenderers` with `componentOverrides` and `view` with `layout` |
162
165
  | Type mismatch in component attributes | Passing wrong type for component attribute (e.g., integer instead of string) | Ensure attribute values match the expected type defined by the component |
163
166
 
@@ -38,4 +38,4 @@ When strict validation is enabled (`unevaluatedProperties: false`), keep each pr
38
38
  - `const`, `enum`
39
39
  - `lightning:textIndexed`, `lightning:supportsPersonalization`, `lightning:localizable`
40
40
  - `lightning:uiOptions`, `lightning:allowedUrlSchemes`
41
- - `lightning:tags` (metaschema restricts values; currently `flow` is the only known allowed tag)
41
+ - `lightning:tags` (metaschema restricts values; known allowed tags are `flow` and `mcp` — use `mcp` on object-based CLTs that model an MCP-tool envelope/response, per `platform-mcp-tool-widget-coordinate`)
@@ -3,6 +3,7 @@ name: platform-custom-tab-generate
3
3
  description: "Use this skill when users need to create or configure Salesforce Custom Tabs. Trigger when users mention tabs, navigation tabs, object tabs, web tabs, Visualforce tabs, Lightning component tabs, app page tabs, or tab configuration. Also use when users want to add navigation to custom objects, create tabs for external content, or set up Lightning page tabs. Always use this skill for any custom tab work."
4
4
  metadata:
5
5
  version: "1.0"
6
+ minApiVersion: "60.0"
6
7
  ---
7
8
 
8
9
  ## When to Use This Skill
@@ -2,6 +2,21 @@
2
2
  name: platform-data-manage
3
3
  description: "Salesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use platform-soql-query), Apex test execution (use platform-apex-test-run), or metadata deployment (use platform-metadata-deploy)."
4
4
  metadata:
5
+ cliTools:
6
+ - tool: ["jq"]
7
+ semver: ">=1.6.0"
8
+ - tool: ["python3"]
9
+ semver: ">=3.8.0"
10
+ - tool: ["sf"]
11
+ semver: ">=2.0.0"
12
+ relatedSkills:
13
+ - "automation-flow-generate"
14
+ - "platform-apex-generate"
15
+ - "platform-apex-test-run"
16
+ - "platform-custom-field-generate"
17
+ - "platform-custom-object-generate"
18
+ - "platform-metadata-deploy"
19
+ - "platform-soql-query"
5
20
  version: "1.1"
6
21
  ---
7
22
 
@@ -5,10 +5,10 @@ metadata:
5
5
  version: "1.0"
6
6
  minApiVersion: "67.0"
7
7
  cliTools:
8
+ - tool: ["jq"]
9
+ semver: ">=1.6.0"
8
10
  - tool: ["sf"]
9
11
  semver: ">=2.0.0"
10
- - tool: ["jq"]
11
- semver: ">=1.6"
12
12
  ---
13
13
 
14
14
  # platform-dataspace-access-configure
@@ -4,7 +4,10 @@ description: "Use this skill when users need to create, generate, modify, or val
4
4
  allowed-tools: Bash Read Write
5
5
  metadata:
6
6
  version: "1.1"
7
+ minApiVersion: "60.0"
7
8
  cliTools:
9
+ - tool: ["python3"]
10
+ semver: ">=3.10.0"
8
11
  - tool: ["sf"]
9
12
  semver: ">=2.126.4"
10
13
  ---
@@ -3,7 +3,24 @@ name: platform-lightning-app-coordinate
3
3
  description: "Build complete Salesforce Lightning Experience applications from natural language descriptions. Use this skill when a user requests a \"complete app\", \"Lightning app\", \"business solution\", \"management system\", or describes a scenario requiring multiple interconnected Salesforce components (objects, fields, pages, tabs, security). Orchestrates all required metadata types in proper dependency order to produce a deployable application."
4
4
  metadata:
5
5
  version: "1.0"
6
- related-skills: platform-custom-object-generate, platform-custom-field-generate, platform-custom-tab-generate, platform-flexipage-generate, platform-custom-application-generate, automation-flow-generate, platform-validation-rule-generate, platform-list-view-generate, platform-permission-set-generate
6
+ minApiVersion: "60.0"
7
+ relatedSkills:
8
+ - "automation-flow-generate"
9
+ - "platform-custom-application-generate"
10
+ - "platform-custom-field-generate"
11
+ - "platform-custom-object-generate"
12
+ - "platform-custom-tab-generate"
13
+ - "platform-flexipage-generate"
14
+ - "platform-list-view-generate"
15
+ - "platform-permission-set-generate"
16
+ - "platform-validation-rule-generate"
17
+ mcpTools:
18
+ salesforce-api-context:
19
+ tools: ["get_metadata_type_sections", "get_metadata_type_context", "get_metadata_type_fields", "get_metadata_type_fields_properties", "search_metadata_types"]
20
+ semver: ">=1.0.0"
21
+ metadata-experts:
22
+ tools: ["execute_metadata_action"]
23
+ semver: ">=1.0.0"
7
24
  ---
8
25
 
9
26
  # Generating Lightning App
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: platform-mcp-tool-widget-coordinate
3
+ description: "Orchestrate object-based Lightning Type + HXL widget generation to render the output of a custom MCP server tool backed by an Apex Invocable Action. TRIGGER only when the prompt EXPLICITLY involves rendering an MCP tool result: user says 'MCP server', 'MCP tool', 'custom MCP server', references a tool 'output schema' / 'tool output' / 'outputValues' envelope, names an 'invocable action' backing an MCP tool, or asks to build a widget or rich UI rendition for the output of an Apex-invocable-backed MCP tool. DO NOT TRIGGER when: customizing an Apex-backed agent action output (use platform-lightning-type-widget-coordinate), authoring only a Custom Lightning Type (use platform-custom-lightning-type-generate), authoring only an Apex class (use platform-apex-generate), or building a standalone widget with no Lightning Type or MCP tool involved (use platform-widget-generate)."
4
+ metadata:
5
+ version: "1.0"
6
+ minApiVersion: "68.0"
7
+ relatedSkills:
8
+ - "platform-apex-generate"
9
+ - "platform-custom-lightning-type-generate"
10
+ - "platform-lightning-type-widget-coordinate"
11
+ - "platform-widget-generate"
12
+ cliTools:
13
+ - tool: ["jq"]
14
+ semver: ">=1.6.0"
15
+ - tool: ["sf"]
16
+ semver: ">=2.0.0"
17
+ ---
18
+
19
+ # Rendering a Custom MCP Tool Output With a Widget
20
+
21
+ Coordinate **two object-based Custom Lightning Types (CLTs)** and an **HXL widget** to render the output of a custom MCP server tool whose implementation is an Apex `@InvocableMethod`. This skill never authors content directly — it loads and invokes leaf skills in dependency order, gates progress on user approval, and runs validation gates before reporting completion.
22
+
23
+ ## Scope
24
+
25
+ Custom MCP server tools backed by an Apex Invocable Action only. The MCP tool returns the platform's **invocable-action result envelope** — an object with `actionName`, `isSuccess`, and an `outputValues` node that carries the tool's real payload. To render this envelope with a widget, model it as **two object-based CLTs** (`lightning__objectType`) of equal standing — the only reason there are two is that one must reference the other by name (a CLT cannot reference itself), so they need distinct deployed names. Name and describe each by what it actually models — never by an invented role-label pair like "Payload CLT"/"Envelope CLT" or "Inner CLT"/"Outer CLT":
26
+
27
+ - The CLT that mimics the tool-result envelope, named `<toolApiName>`. Its `outputValues` property is typed to the other CLT via `c__<responseCLT>`.
28
+ - The CLT that is the exact shape of the Invocable Action's **response** (`@InvocableVariable` fields on the `@InvocableMethod` response class), named `<toolApiName>Response` — "Response" here is not an invented role word, it's the same word the Apex source already uses for that class (e.g. `GetAccountSummaryResponse`).
29
+
30
+ The widget grounds on the **response fields** (flat), and the **default `renderer.json` in the envelope CLT** bridges the envelope nesting to the flat widget via `{!$attrs.outputValues.<field>}`.
31
+
32
+ **Out of scope, route elsewhere:**
33
+
34
+ - Customizing an **Apex-backed agent action** output (Apex-backed CLT `@apexClassType/...`, single CLT, surface-specific renderer) → `platform-lightning-type-widget-coordinate`.
35
+ - A standalone widget with no MCP tool / Lightning Type → `platform-widget-generate`.
36
+ - Authoring only a CLT or only an Apex class → `platform-custom-lightning-type-generate` / `platform-apex-generate`.
37
+
38
+ > **Beta cardinality:** the invocable-action result is a bulk array (`content[]`). For the beta release this skill models and renders a **single response** — the first element of `content[]`. The CLT envelope models one result object, not the `content[]` wrapper.
39
+
40
+ ---
41
+
42
+ ## How this differs from `platform-lightning-type-widget-coordinate`
43
+
44
+ | Dimension | agent-action flow (`...lightning-type-widget-coordinate`) | this MCP-tool flow |
45
+ |---|---|---|
46
+ | CLT kind | Apex-backed (`@apexClassType/...`) | Object-based (`lightning__objectType`) |
47
+ | Number of CLTs | one | **two** (envelope + response) |
48
+ | Field source | `@AuraEnabled` | **`@InvocableVariable`** on the response class |
49
+ | Renderer location | `lightningTypes/<T>/lightningDesktopGenAi/renderer.json` (surface-specific) | `lightningTypes/<toolCLT>/renderer.json` (**default, parallel to `schema.json`**) |
50
+ | Renderer binding | flat `{!$attrs.<field>}` | **nested `{!$attrs.outputValues.<field>}`** |
51
+
52
+ ---
53
+
54
+ ## Phase Graph
55
+
56
+ | Phase | Purpose | Output |
57
+ |---|---|---|
58
+ | 1 — Input selection | Determine the payload source: an **invocable action API name** (preferred), an Apex Invocable class, or a pasted tool-output JSON sample. | `source` (`action` \| `apex` \| `sample`), tool API name |
59
+ | 2 — Payload discovery | Describe the invocable action via the Actions REST API and read its typed `outputs` (or parse the response class from source, or `outputValues` from the sample). | `payloadFields` (name + `lightning:type`) |
60
+ | 3 — Build plan | Print the plan in full; proceed unless the next reply explicitly pushes back. | printed plan |
61
+ | 4 — Generation | Load and invoke leaf skills: response CLT → envelope CLT → widget → inline default renderer in the envelope CLT. | files written |
62
+ | 5 — Validation | Run hard gates (block) and warn gates (advisory). | gate report |
63
+ | 6 — Summary | Files, validations, deploy order, preview readiness. | summary |
64
+
65
+ **Per-phase pattern:** load the skill fresh → execute its workflow → verify outputs → checkpoint before the next phase. Even if you remember a leaf skill's content, skills evolve — always load fresh.
66
+
67
+ ---
68
+
69
+ ## Phase 1 — Input selection
70
+
71
+ Determine where the payload shape comes from. Prefer the sources top-to-bottom:
72
+
73
+ | Source | Trigger | Phase 2 action |
74
+ |---|---|---|
75
+ | `action` | Prompt gives an **invocable action API name** — directly, or via an Apex class name that resolves to one — AND an authenticated org is available. **Preferred.** | Describe the action via the Actions REST API and read its typed `outputs`. |
76
+ | `sample` | No reachable org (or the describe 404s), but a pasted tool-output JSON sample is available. | Parse the `outputValues` object from the sample. |
77
+ | `apex` | Only the Apex **class** is available (no action name resolvable, no reachable org, no sample) — fallback only, may be stale relative to what's deployed. | Resolve the response class and enumerate `@InvocableVariable` fields. |
78
+
79
+ Capture the **tool API name** (used to name all artifacts — see the naming convention below).
80
+
81
+ **Source priority:** live/authoritative schema sources beat parsing a local class, which beats a pasted example. In order:
82
+ 1. **`action`** if an action API name and an authenticated org are available. The Actions REST API describe is the same schema the platform itself exposes, so it needs no request/helper filtering and gives real field types.
83
+ 2. **`sample`** if a runtime JSON sample is pasted (runtime response — explicit and current).
84
+ 3. **`apex`** if an Apex class exists locally AND none of the above apply (fallback only — may be stale relative to what's actually deployed behind the action).
85
+
86
+ If none are available, STOP and ask the user for an action name, a class, a sample, or a schema.
87
+
88
+ ---
89
+
90
+ ## Phase 2 — Payload discovery
91
+
92
+ FIRST Read `references/mcp-tool-output-discovery.md` (REQUIRED — do NOT run Phase 2 from this summary alone), then execute the procedure for the chosen source. Reminders:
93
+
94
+ **For `action` (preferred):** describe the action with the Actions REST API and read its `outputs`:
95
+
96
+ - Resolve the action API name (for Apex actions this is the **class name** declaring `@InvocableMethod`, not the method label).
97
+ - `sf api request rest '/services/data/v<APIVER>/actions/custom/apex/<ActionApiName>' -o <org>`.
98
+ - Use the `outputs` array only (each entry `{ name, label, type, maxOccurs }`). **Ignore `inputs`** — that is the tool input (request wrapper). A field with `maxOccurs > 1` is a list — surface it in the plan (beta renders a single response).
99
+ - Map the Actions API `type` → CLT `lightning:type` (see the discovery reference's table; `STRING`/`ID`/`REFERENCE`/… → `lightning__textType`, `INTEGER`/`LONG` → `lightning__integerType`, `DOUBLE`/`DECIMAL`/`CURRENCY`/`PERCENT` → `lightning__numberType`, `BOOLEAN` → `lightning__booleanType`, `DATE`/`DATETIME` → date types). Match case-insensitively.
100
+ - An entry with **`"type": null` and an `"apexClass": "<OuterClass>$<InnerClass>"` key** instead of a primitive `type` is a nested-object field, not a describe gap — see "Nested-object payload fields" below. The describe never exposes that class's own leaf fields, so retrieving/reading the named Apex class to enumerate them is the expected next step, not a fallback away from `action`.
101
+ - If the describe 404s, fall back to `sample` (a pasted tool-output JSON) if one is available, else `apex` (parse the class from source, if locally available).
102
+
103
+ **For `apex` (fallback):**
104
+
105
+ - Locate the class (`<pkgDir>/classes/<ClassName>.cls`; retrieve `ApexClass:<ClassName>` if absent).
106
+ - Identify the **response class** — the element type of the `@InvocableMethod` return `List<...>` (e.g. `List<GetAccountSummaryResponse>` → `GetAccountSummaryResponse`).
107
+ - Enumerate its `@InvocableVariable` fields. **Exclude** the request class (the `@InvocableMethod` parameter type) and any `private` helper classes — those are not part of the tool's externally visible output schema.
108
+ - Map Apex → CLT `lightning:type`: `String`/`Id` → `lightning__textType`, `Integer` → `lightning__integerType`, `Decimal`/`Double` → `lightning__numberType`, `Boolean` → `lightning__booleanType`, `Date` → `lightning__dateType`, `Datetime` → `lightning__dateTimeType`.
109
+ - **A field whose type is itself an Apex class** (e.g. `flightInfo : SearchFlightsAction.Flight`) is a second, additive case alongside the flat-primitive mapping above — see "Nested-object payload fields" below. This applies to every source (`action`, `apex`, `sample`), not just `apex`.
110
+
111
+ **For `sample` (fallback):** parse the `outputValues` object; infer each field's `lightning:type` from its JSON value (string → `lightning__textType`, integer → `lightning__integerType`, fractional number → `lightning__numberType`, boolean → `lightning__booleanType`).
112
+
113
+ **Nested-object payload fields (applies to every source above):** when a response/output field's type is not a primitive but another Apex class (object), do NOT model it as `{"type":"object"}` or an inlined `lightning__objectType` — both produce an opaque, unrenderable blob and neither deploys. Instead:
114
+ - Type the response CLT property as `"@apexClassType/<ns>__<OuterClass>$<InnerClass>"` (e.g. `"@apexClassType/c__SearchFlightsAction$Flight"`), matching the Apex-backed-CLT convention `platform-custom-lightning-type-generate` already documents.
115
+ - Enumerate the referenced Apex class's own `@InvocableVariable`/public fields as the leaf set; the widget schema flattens to those leaves (never the object field itself).
116
+ - The renderer binds one level deeper: `{!$attrs.outputValues.<objectField>.<leaf>}` (e.g. `{!$attrs.outputValues.flightInfo.flightId}`), not `{!$attrs.outputValues.<objectField>}`.
117
+ - A field typed `List<ApexClass>` is out of scope for the beta single-response flow — surface it in the build plan like a `maxOccurs > 1` scalar, do not emit a schema for it.
118
+ - See `references/two-clt-modeling.md` ("Nested-object payload fields") and `examples/nested-object-source-prompt.md` for the full walkthrough.
119
+
120
+ Capture `payloadFields` — the ordered list of `{ name, title, lightning:type }` that defines the response CLT and the widget schema. Record which source produced it in the build plan.
121
+
122
+ > Staleness: do NOT maintain a cross-session cache. Read the local project fresh and re-retrieve from the org per session.
123
+
124
+ ---
125
+
126
+ ## Phase 3 — Build plan + approval gate
127
+
128
+ Print a build plan using the template in `references/build-plan-format.md`. The plan must list:
129
+
130
+ - A one-line developer-facing summary (the `PLAN:` line).
131
+ - The tool API name and the response class FQN (or "from pasted sample").
132
+ - The two CLT names (envelope + payload) and the widget name, with absolute paths.
133
+ - The envelope fields the envelope CLT will carry, and the response fields the response CLT + widget will carry.
134
+ - `Properties omitted:` — any response fields intentionally dropped, with rationale. **`actionName` and `isSuccess` are envelope fields and never appear here or on the widget** — they belong to the envelope CLT only. Any payload-side operational/status field (`isSuccess`, `errorMessage`, `status`, `message`, and similar) that the response happens to carry is omitted from the widget by default and MUST be listed here with a one-line rationale — the widget renders `outputValues` data fields only.
135
+ - The validations that will run after generation.
136
+
137
+ **Print the plan in full, then proceed unless the user's next reply explicitly pushes back.** Explicit pushback = `no`, `stop`, `wait`, `change X`, `use Y instead`, or an equivalent rejection / revision request. Explicit approval is welcome but NOT required — silence, an unrelated follow-up, or the natural continuation of a single-turn eval all count as implicit approval. The invariant is the plan being visible in the transcript. If pushback arrives, revise and re-print before moving on.
138
+
139
+ ---
140
+
141
+ ## Phase 4 — Generation
142
+
143
+ Load and invoke leaf skills in this order. For each: load the skill, execute its workflow against the Phase 3 spec, verify the outputs, checkpoint before the next.
144
+
145
+ 1. **Response CLT** — load `platform-custom-lightning-type-generate`. Author an object-based CLT `<responseCLT>` (convention: `<toolApiName>Response`) whose `properties` are the `payloadFields` from Phase 2 (1:1 with the response `@InvocableVariable` fields). Root is `lightning__objectType`, with root-level `"lightning:tags": ["mcp"]`.
146
+
147
+ 2. **Envelope CLT** — load `platform-custom-lightning-type-generate`. Author an object-based CLT `<toolCLT>` (convention: `<toolApiName>`, the envelope), also with root-level `"lightning:tags": ["mcp"]`, and:
148
+ - `actionName` → `lightning__textType`
149
+ - `isSuccess` → `lightning__booleanType`
150
+ - `outputValues` → **`c__<responseCLT>`** (the referenced-CLT pattern; the response CLT must be deployed before the envelope CLT)
151
+ - Add `message` / other envelope scalars only if the widget needs to render them.
152
+
153
+ 3. **Widget** — load `platform-widget-generate`. Author a **flat** widget whose `schema.json` properties are the `payloadFields` (name + primitive type) — a standalone widget contract, not derived from or coupled to any Lightning Type. It renders **only `outputValues` data fields**: never `actionName`/`isSuccess` (envelope-only), and never a response-side operational/status field declared in `Properties omitted:`. The widget body binds each field via `{!$attrs.<field>}` — the widget is envelope-agnostic and never references `outputValues` itself.
154
+
155
+ 4. **Default renderer (authored inline in the ENVELOPE CLT — never optional).** FIRST Read `platform-custom-lightning-type-generate/references/widget-rendition.md` (REQUIRED — do NOT author from memory or copy an existing sample, which may use a deprecated shape). Then author `<pkgDir>/lightningTypes/<toolCLT>/renderer.json` — the **default renderer, at the bundle root, parallel to `schema.json`** (NOT under `lightningDesktopGenAi/`). Shape:
156
+
157
+ ```json
158
+ {
159
+ "renderer": {
160
+ "componentOverrides": {
161
+ "$": {
162
+ "definition": "@widget/c/<widgetName>",
163
+ "attributes": {
164
+ "<payloadField>": "{!$attrs.outputValues.<payloadField>}"
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
170
+ ```
171
+
172
+ The renderer maps **every widget schema property** to the matching payload field nested under the envelope's `outputValues` node via `{!$attrs.outputValues.<payloadField>}`. This nested binding is the crux of this flow — it bridges the envelope CLT to the flat widget. Do **NOT** duplicate the widget body inside `renderer.json`.
173
+
174
+ **Existing-renderer handling:** if `renderer.json` already exists at the target path, read it first. If it references the same widget with the same bindings, leave it. If it references a different widget or a custom-LWC root override (`c/<component>`), STOP and surface the conflict before overwriting.
175
+
176
+ ---
177
+
178
+ ## Phase 5 — Validation gates
179
+
180
+ Read `references/validation-gates.md` and **run every gate**. Widget-bundle-internal checks (schema parse, root keys, leaf types, `{!$attrs.X}` resolution, `.uiwidget-meta.xml` well-formedness) are owned by `platform-widget-generate` and run in its own self-validation.
181
+
182
+ **Hard — block on failure:**
183
+
184
+ 1. `clt-reference-integrity` — the envelope CLT's `outputValues` property has `lightning:type === "c__<responseCLT>"`, the response CLT exists at `<pkgDir>/lightningTypes/<responseCLT>/schema.json`, both parse as JSON, and neither carries `$schema` or (nested) `items`.
185
+ 2. `renderer-wires-widget` — `<pkgDir>/lightningTypes/<toolCLT>/renderer.json` exists (at the bundle root, **not** `lightningDesktopGenAi/`), parses, wires the widget via `componentOverrides["$"].definition === "@widget/c/<widgetName>"`, and binds every widget schema property as **`{!$attrs.outputValues.<property>}`** (nested path). Bidirectional: missing or extra bindings both fail.
186
+
187
+ **Warn — advisory:**
188
+
189
+ 1. `field-trace` — RUN the trace in `references/validation-gates.md`: grep `@InvocableVariable` from the **response** class, `jq` the widget schema property keys, print both lists, classify INVENTED vs OMITTED. Invented widget fields fail; silent omissions (a response field absent from the widget AND absent from the Phase 3 `Properties omitted:` plan) warn.
190
+
191
+ Report each gate result by name in Phase 6 (`pass`, `fail (<reason>)`, `warn (<reason>)`, `not run`). Do **not** summarize as "all passed". This skill produces metadata only — it does not deploy; deployment is the caller's responsibility.
192
+
193
+ ---
194
+
195
+ ## Phase 6 — Summary
196
+
197
+ ```text
198
+ MCP Tool Widget Build Complete: <widgetName>
199
+
200
+ FILES GENERATED:
201
+ Response CLT:
202
+ <pkgDir>/lightningTypes/<responseCLT>/schema.json
203
+ Envelope CLT:
204
+ <pkgDir>/lightningTypes/<toolCLT>/schema.json
205
+ <pkgDir>/lightningTypes/<toolCLT>/renderer.json # default renderer — wires the widget
206
+ Widget bundle:
207
+ <pkgDir>/uiWidgets/<widgetName>/<widgetName>.json
208
+ <pkgDir>/uiWidgets/<widgetName>/schema.json
209
+ <pkgDir>/uiWidgets/<widgetName>/<widgetName>.uiwidget-meta.xml
210
+
211
+ VALIDATIONS:
212
+ widget self-validation (platform-widget-generate gates): <pass | fail — see sub-skill report>
213
+ clt-reference-integrity (envelope.outputValues → c__<responseCLT>): <pass | fail (<reason>)>
214
+ renderer-wires-widget (nested {!$attrs.outputValues.X} bindings): <pass | fail (<reason>)>
215
+ field-trace (INVENTED + OMITTED lists printed): <pass | warn (<reason>) | fail (invented: <list>)>
216
+ ```
217
+
218
+ ---
219
+
220
+ ## Hard Rules (always apply)
221
+
222
+ 1. **Plan-first, then proceed.** Print the full Phase 3 build plan before writing any file. Explicit rejection or a change request → stop and revise; otherwise continue. The invariant is the plan being visible in the transcript, not an interactive human approval — this holds in manual chat, agent-to-agent flows, and single-turn evals.
223
+ 2. **Two object-based CLTs, never one.** The envelope and the payload are separate CLTs. The envelope's `outputValues` is typed via `c__<responseCLT>`, never inlined as a nested `lightning__objectType`. Both CLTs carry root-level `"lightning:tags": ["mcp"]` (see `platform-custom-lightning-type-generate/assets/primitive-types-and-constraints.md`).
224
+ 3. **Renderer lives in the ENVELOPE CLT, at the bundle root.** `lightningTypes/<toolCLT>/renderer.json` — the default renderer, parallel to `schema.json`. Never `lightningDesktopGenAi/renderer.json` (that is the agent-action flow's surface-specific path), never in the response CLT.
225
+ 4. **Renderer bindings are nested.** Every widget attribute maps to `{!$attrs.outputValues.<field>}`, not `{!$attrs.<field>}`. The widget schema stays flat; the renderer does the bridging.
226
+ 5. **Widget grounds on the payload, not the envelope, and renders `outputValues` data fields only.** The widget schema properties are the payload fields. The widget never references `actionName` or `isSuccess` — those are envelope-only. A payload field that is itself operational/status (`isSuccess`, `errorMessage`, `status`, `message`, and similar) is omitted from the widget by default and declared in `Properties omitted:`.
227
+ 6. **Field source is `@InvocableVariable` on the response class.** Enumerate the response class only. Exclude the request class and private helper classes.
228
+ 7. **No invented fields, no silent omissions.** The widget schema (and the response CLT) must be a subset of the response `@InvocableVariable` fields. Omission requires the field to appear in the Phase 3 `Properties omitted:` section with an approved rationale. `field-trace` prints both lists.
229
+ 8. **Single response for beta.** Model one result object, not the `content[]` bulk wrapper.
230
+ 9. **Always load the leaf skill** before generation. Do not author from memory.
231
+ 10. **Run gates, do not describe them.** Reporting `pass` without executing a gate is a hard violation; report `not run` instead.
232
+ 11. **No shell metacharacters that trigger the Vibes safe-shell filter.** In every `Bash` tool call emitted by this orchestrator and by any leaf skill it invokes, do NOT use command substitution (`$(…)` or backticks), process substitution (`<(…)`, `>(…)`), brace expansion (`{a,b,c}` or `{1..N}`), or `eval` / `exec`. These force manual approval even under Bypass mode and stall the eval. Run separate commands (`mkdir -p a && mkdir -p b`), print each intermediate value with its own command and reason about the result, and use plain shell variables (`X=literal`) or here-strings when a value must be reused.
233
+ 12. **Resolve `action` schema from the Actions REST API describe, never from raw HTTP to the MCP endpoint or from credential extraction.** Use `sf api request rest` against the org's Actions REST API (which uses the existing `sf` org auth). Never read `a4d_mcp_settings.json` or any MCP settings file, never extract an org access token, never `curl` an MCP server endpoint directly — that requires credentials the session doesn't have and targets a URL the runtime doesn't actually expose that way.
234
+ 13. **Never invoke an MCP tool to discover its output shape.** Describing the payload must never execute the underlying action. Resolve the schema via the Actions REST API describe of the backing action — never by calling the tool with sample/guessed input to observe a response. If no action name is resolvable, ask the user for a pasted `sample` instead of invoking anything.
235
+ 14. **A response field typed as another Apex class is never a bare `{"type":"object"}`.** Type it `@apexClassType/<ns>__<OuterClass>$<InnerClass>` in the response CLT, flatten to its leaf fields in the widget, and bind the renderer two levels deep (`{!$attrs.outputValues.<objectField>.<leaf>}`). This is additive to the flat-primitive case (Hard Rule 5), not a replacement for it — see `references/two-clt-modeling.md`.
236
+
237
+ ---
238
+
239
+ ## Reference File Index
240
+
241
+ | File | When to read |
242
+ |------|--------------|
243
+ | `references/mcp-tool-output-discovery.md` | Phase 2 — the three sources (`action` describe via Actions REST API; pasted `sample`; `apex` class parse), field enumeration, and type mapping. |
244
+ | `references/two-clt-modeling.md` | Phase 4 — how the envelope + response CLTs and the nested renderer binding fit together, with the naming convention and nested-object payload handling. |
245
+ | `references/build-plan-format.md` | Phase 3 — plan template the model fills before proceeding. |
246
+ | `references/validation-gates.md` | Phase 5 — full hard / warn gate table with RUN procedures. |
247
+ | `examples/action-name-source-prompt.md` | Phase 3 — a complete walkthrough starting from an invocable action API name (preferred source). |
248
+ | `examples/apex-invocable-source-prompt.md` | Phase 3 — a complete walkthrough starting from an Apex Invocable class (fallback). |
249
+ | `examples/pasted-tool-output-prompt.md` | Phase 3 — a complete walkthrough starting from a pasted tool-output sample (fallback). |
250
+ | `examples/nested-object-source-prompt.md` | Phase 3 — a complete walkthrough where a payload field is itself an Apex-class reference, not a primitive. |