@salesforce/afv-skills 1.67.0 → 1.69.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 (258) hide show
  1. package/README.md +55 -5
  2. package/package.json +1 -1
  3. package/skills/afcc-setup-coordinate/SKILL.md +348 -0
  4. package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
  5. package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
  6. package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
  7. package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
  8. package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
  9. package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
  10. package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
  11. package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
  12. package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
  13. package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
  14. package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
  15. package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
  16. package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
  17. package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
  18. package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
  19. package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
  20. package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
  21. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
  22. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
  23. package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
  24. package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
  25. package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
  26. package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
  27. package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
  28. package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
  29. package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
  30. package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
  31. package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
  32. package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
  33. package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
  34. package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
  35. package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
  36. package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
  37. package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
  38. package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
  39. package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
  40. package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
  41. package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
  42. package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
  43. package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
  44. package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
  45. package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
  46. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
  47. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
  48. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
  49. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
  50. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
  51. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
  52. package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
  53. package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
  54. package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
  55. package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
  56. package/skills/agentforce-offline-experimentation-run/SKILL.md +14 -22
  57. package/skills/agentforce-offline-experimentation-run/scripts/bt_compare.py +81 -0
  58. package/skills/agentforce-offline-experimentation-run/scripts/bt_fetch.py +358 -0
  59. package/skills/agentforce-offline-experimentation-run/scripts/bt_patch_agent.py +110 -0
  60. package/skills/agentforce-offline-experimentation-run/scripts/btlib/__init__.py +34 -0
  61. package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentpatch.py +483 -0
  62. package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentsrc.py +565 -0
  63. package/skills/agentforce-offline-experimentation-run/scripts/btlib/cache.py +95 -0
  64. package/skills/agentforce-offline-experimentation-run/scripts/btlib/compare.py +617 -0
  65. package/skills/agentforce-offline-experimentation-run/scripts/btlib/fetch.py +1012 -0
  66. package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +140 -0
  67. package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +93 -0
  68. package/skills/agentforce-offline-experimentation-run/scripts/btlib/patch.py +327 -0
  69. package/skills/agentforce-offline-experimentation-run/scripts/btlib/redact.py +40 -0
  70. package/skills/agentforce-offline-experimentation-run/scripts/btlib/results.py +288 -0
  71. package/skills/agentforce-offline-experimentation-run/scripts/btlib/scoring.py +340 -0
  72. package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +354 -0
  73. package/skills/agentforce-offline-experimentation-run/scripts/btlib/splits.py +136 -0
  74. package/skills/agentforce-offline-experimentation-run/scripts/btlib/stdm.py +98 -0
  75. package/skills/agentforce-offline-experimentation-run/scripts/btlib/tokens.py +173 -0
  76. package/skills/agentforce-offline-experimentation-run/scripts/btlib/units.py +199 -0
  77. package/skills/agentforce-offline-experimentation-run/scripts/btlib/versions.py +194 -0
  78. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +367 -379
  79. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +23 -6
  80. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +483 -796
  81. package/skills/commerce-react-storefront-create/SKILL.md +54 -21
  82. package/skills/dx-lifecycle-center/SKILL.md +22 -13
  83. package/skills/dx-lifecycle-center/examples/workflows.md +54 -17
  84. package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
  85. package/skills/dx-lifecycle-center/references/connect-org.md +62 -12
  86. package/skills/dx-lifecycle-center/references/deploy.md +3 -3
  87. package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
  88. package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
  89. package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
  90. package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
  91. package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
  92. package/skills/dx-org-devhub-configure/SKILL.md +85 -84
  93. package/skills/dx-org-devhub-configure/examples/status-output.md +25 -2
  94. package/skills/dx-org-devhub-configure/scripts/devhub.sh +265 -140
  95. package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +100 -15
  96. package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
  97. package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
  98. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +88 -0
  99. package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +167 -0
  100. package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
  101. package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
  102. package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
  103. package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
  104. package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
  105. package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
  106. package/skills/dx-scratch-def-configure/SKILL.md +163 -0
  107. package/skills/dx-scratch-def-configure/examples/confirm-card.md +53 -0
  108. package/skills/dx-scratch-def-configure/examples/report-recipes.md +100 -0
  109. package/skills/dx-scratch-def-configure/references/features.json +3270 -0
  110. package/skills/dx-scratch-def-configure/references/project-scratch-def.schema.json +1841 -0
  111. package/skills/dx-scratch-def-configure/references/settings-map.json +682 -0
  112. package/skills/dx-scratch-def-configure/scripts/lib_scratch_def.py +1306 -0
  113. package/skills/dx-scratch-def-configure/scripts/requirements.txt +3 -0
  114. package/skills/dx-scratch-def-configure/scripts/scrape_config_values.py +848 -0
  115. package/skills/education-cloud-domain-configure/SKILL.md +1 -1
  116. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -1
  117. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -1
  118. package/skills/experience-afv-analytics-query/SKILL.md +239 -0
  119. package/skills/experience-afv-analytics-query/references/references.md +176 -0
  120. package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
  121. package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
  122. package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
  123. package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
  124. package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
  125. package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
  126. package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
  127. package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
  128. package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
  129. package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
  130. package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
  131. package/skills/experience-app-mcp-generate/SKILL.md +174 -0
  132. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
  133. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
  134. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
  135. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
  136. package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
  137. package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
  138. package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
  139. package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
  140. package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
  141. package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
  142. package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
  143. package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
  144. package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
  145. package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
  146. package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
  147. package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
  148. package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
  149. package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
  150. package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
  151. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
  152. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
  153. package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
  154. package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
  155. package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
  156. package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
  157. package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
  158. package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
  159. package/skills/experience-cms-content-type-generate/SKILL.md +1 -1
  160. package/skills/experience-design-validate/SKILL.md +1 -1
  161. package/skills/experience-search-coordinate/SKILL.md +18 -12
  162. package/skills/experience-search-coordinate/references/content-route.md +79 -1
  163. package/skills/field-service-data-capture-migrate/SKILL.md +1 -1
  164. package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
  165. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
  166. package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
  167. package/skills/platform-apex-generate/SKILL.md +14 -11
  168. package/skills/platform-apex-test-generate/SKILL.md +2 -1
  169. package/skills/platform-custom-field-generate/SKILL.md +24 -16
  170. package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
  171. package/skills/platform-custom-setting-generate/SKILL.md +1 -0
  172. package/skills/platform-datamask-run/SKILL.md +52 -71
  173. package/skills/platform-datamask-run/references/api-surface.md +10 -4
  174. package/skills/platform-datamask-run/references/policy-authoring.md +56 -7
  175. package/skills/platform-datamask-run/references/run-and-abort.md +17 -10
  176. package/skills/platform-datamask-run/scripts/poll-job.sh +15 -25
  177. package/skills/platform-dataspace-access-configure/SKILL.md +43 -10
  178. package/skills/platform-flexipage-generate/SKILL.md +7 -10
  179. package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
  180. package/skills/platform-metadata-discovery-get/SKILL.md +185 -0
  181. package/skills/platform-metadata-discovery-get/references/api-map.md +25 -0
  182. package/skills/platform-metadata-discovery-get/references/h360-routes.md +30 -0
  183. package/skills/platform-metadata-discovery-get/references/scoped-soql.md +52 -0
  184. package/skills/platform-metadata-grounding-get/SKILL.md +170 -0
  185. package/skills/platform-policy-rule-generate/SKILL.md +85 -231
  186. package/skills/platform-policy-rule-generate/references/condition-model.md +47 -0
  187. package/skills/platform-policy-rule-generate/references/condition-templates.md +89 -0
  188. package/skills/platform-policy-rule-generate/references/conjunction-compiler.md +25 -0
  189. package/skills/platform-policy-rule-generate/references/conjunction-expression.md +30 -0
  190. package/skills/platform-policy-rule-generate/references/consumer-all.md +9 -0
  191. package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +99 -0
  192. package/skills/platform-policy-rule-generate/references/deploy-errors.md +24 -36
  193. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/package.xml +12 -0
  194. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +5 -0
  195. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitions/ExistsJoinRLS_Rule_1.policyRuleDefinition +91 -0
  196. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/package.xml +12 -0
  197. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +5 -0
  198. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitions/FieldReadDeny_Rule_1.policyRuleDefinition +72 -0
  199. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/package.xml +12 -0
  200. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +5 -0
  201. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitions/LastCharactersFieldMasking_Rule_1.policyRuleDefinition +77 -0
  202. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/package.xml +12 -0
  203. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +5 -0
  204. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitions/PrincipalFieldMatchRLS_Rule_1.policyRuleDefinition +77 -0
  205. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/package.xml +12 -0
  206. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +5 -0
  207. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitions/TaggedObjectAccess_Rule_1.policyRuleDefinition +65 -0
  208. package/skills/platform-policy-rule-generate/references/headless-transport.md +87 -0
  209. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +18 -11
  210. package/skills/platform-policy-rule-generate/references/policy-shapes.md +107 -0
  211. package/skills/platform-policy-rule-generate/references/principal-expression.md +31 -0
  212. package/skills/platform-policy-rule-generate/references/reference-resolution.md +51 -0
  213. package/skills/platform-policy-rule-generate/references/resource-expression.md +48 -0
  214. package/skills/platform-policy-rule-generate/references/runtime-context.md +9 -0
  215. package/skills/platform-policy-rule-generate/references/templates-access.md +11 -9
  216. package/skills/platform-policy-rule-generate/references/templates-advanced.md +5 -3
  217. package/skills/platform-policy-rule-generate/references/templates-record.md +37 -22
  218. package/skills/platform-policy-rule-generate/references/templates-transform.md +10 -8
  219. package/skills/platform-policy-rule-generate/references/templates.md +2 -2
  220. package/skills/platform-policy-rule-generate/references/ui-compatibility.md +36 -18
  221. package/skills/platform-report-generate/SKILL.md +29 -5
  222. package/skills/platform-report-generate/references/chart-types.md +26 -2
  223. package/skills/platform-report-generate/references/column-names.md +43 -0
  224. package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
  225. package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
  226. package/skills/platform-report-generate/references/verification-checklist.md +22 -2
  227. package/skills/service-digital-engagement-channel-configure/SKILL.md +49 -110
  228. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +35 -0
  229. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
  230. package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
  231. package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
  232. package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
  233. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +128 -28
  234. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +16 -20
  235. package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
  236. package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
  237. package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
  238. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
  239. package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
  240. package/skills/service-e911-configure/SKILL.md +242 -0
  241. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
  242. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
  243. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
  244. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
  245. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
  246. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
  247. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
  248. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
  249. package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
  250. package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
  251. package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
  252. package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
  253. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
  254. package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
  255. package/skills/experience-content-media-image-generate/SKILL.md +0 -83
  256. package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
  257. package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
  258. package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
@@ -0,0 +1,38 @@
1
+ # Standalone MCP configuration delivery
2
+
3
+ Use when the user wants connection configuration without a plugin. Ask for the target client and an absolute path to a **new JSON file**. Do not change an existing client configuration; generate a file the user can review and import or merge using their client's supported workflow.
4
+
5
+ The delivery workflow is client-neutral; configuration schemas still depend on the client. The current generator supports the `claude-code` profile (default, `oauth.clientId`) and an explicitly requested custom `requested` profile (`auth.CLIENT_ID`). Do not claim either schema works in every client. For another client, establish its supported schema before generating; report unsupported formats rather than guessing.
6
+
7
+ A configuration input needs only `destination`, `mcp`, and optionally `authStyle`:
8
+
9
+ ```json
10
+ {
11
+ "destination": "/absolute/user-selected/new-mcp-config.json",
12
+ "authStyle": "claude-code",
13
+ "mcp": {
14
+ "serverName": "partner-tools",
15
+ "environment": "production",
16
+ "domain": "your-my-domain",
17
+ "siteDeveloperName": "PartnerPortal",
18
+ "mcpName": "PartnerTools",
19
+ "clientId": "actual-public-eca-consumer-key"
20
+ }
21
+ }
22
+ ```
23
+
24
+ Substitute the selected environment (`production`, `developer`, `sandbox` or `scratch`), its My Domain token and the exact site/server developer names as described in the skill; the generator builds the environment's route, so users need not supply or assemble the URL. Replace the four route components with `url` only when reusing an authoritative setup URL. An explicitly selected integer `mcp.callbackPort` is supported only for `claude-code`; omit it when skipped. Plugin identity, author, icon, repository and skills are unnecessary.
25
+
26
+ Preview:
27
+
28
+ ```bash
29
+ node "<skill-dir>/scripts/generate_mcp_config.mjs" /path/to/delivery-config.json
30
+ ```
31
+
32
+ Create the selected file:
33
+
34
+ ```bash
35
+ node "<skill-dir>/scripts/generate_mcp_config.mjs" /path/to/delivery-config.json --write
36
+ ```
37
+
38
+ Inspect the written JSON: `mcpServers` wraps the selected server key; its entry contains `type: "http"`, the exact HTTPS URL and the selected public client ID in the target profile. Confirm an omitted callback port remains absent. The generator refuses existing destinations and does not write plugin files or a README. Report the file path, selected org/site/server/ECA, profile and validation results. Provide import/merge guidance for the selected client; leave OAuth, routing, tool listing and user permissions pending until verified there. Do not run `claude plugin validate` on a standalone configuration file or provide publication steps unless separately requested.
@@ -0,0 +1,80 @@
1
+ # Claude Plugin Package and Publication
2
+
3
+ This format and the bundled generator support Claude plugins only. Reject Codex, ChatGPT, and other non-Claude plugin requests before running discovery or generation; do not package a Claude plugin as a substitute. If the plugin platform is unspecified, resolve it before proceeding.
4
+
5
+ Read before generating files. Format sources are the [official example README](https://github.com/anthropics/claude-plugins-official/blob/main/plugins/example-plugin/README.md), [plugin manifest reference](https://code.claude.com/docs/en/plugins-reference), [MCP OAuth reference](https://code.claude.com/docs/en/mcp#use-pre-configured-oauth-credentials), and [submission guide](https://claude.com/docs/plugins/submit). Check these sources again if the target client's validator disagrees; do not treat a locally generated skeleton as directory approval.
6
+
7
+ ## Required layout
8
+
9
+ ```text
10
+ <plugin-repository>/
11
+ .claude-plugin/plugin.json
12
+ .mcp.json
13
+ README.md
14
+ .gitignore
15
+ assets/ # only when the user supplies an icon
16
+ skills/ # only when requested
17
+ <skill-name>/SKILL.md
18
+ <skill-name>/references/...
19
+ <skill-name>/scripts/...
20
+ ```
21
+
22
+ Only the manifest lives inside `.claude-plugin/`; skills and `.mcp.json` live at the plugin root. Prefer `skills/<name>/SKILL.md` over legacy `commands/*.md`. A marketplace manifest is not required merely to package a plugin repository for submission. Do not copy Anthropic branding or its example author's identity/license into a new package.
23
+
24
+ The plugin manifest contains `name`, semantic `version`, `description`, `author.name`, and the user's optional author email, repository URL and chosen license identifier. Use a stable kebab-case plugin name; never silently rename an already published plugin. First release can use `1.0.0`, then increment patch/minor/major according to the change. The skill's own metadata version and generated plugin's semantic version are separate.
25
+
26
+ For the icon choice established in the skill, supply `iconPath` as an absolute path to a regular, non-empty PNG, JPEG or WebP file, at most 5 MiB. Directories and symlinks are rejected. Omit `iconPath` when the user skips it. Prefer a square, legible image; local validation does not certify directory acceptance. If the generator rejects the input, report the error and ask for a valid replacement or an explicit decision to omit the icon. Do not substitute a placeholder or reuse a removed icon.
27
+
28
+ The icon is for the directory listing, not an MCP tool widget. If the client validator warns about the icon field, report the installed Claude Code version and the warning, and check the [manifest reference](https://code.claude.com/docs/en/plugins-reference#directory-listing-fields) before resolving it. Do not silently remove the selected icon.
29
+
30
+ ## Configuration for the bundled generator
31
+
32
+ This example is a configuration schema illustration, not real connection data. Replace every value using the selected org and user choices. Keep the temporary config outside both this repo and the public output.
33
+
34
+ ```json
35
+ {
36
+ "destination": "/absolute/user-chosen/new-plugin-folder",
37
+ "name": "partner-tools",
38
+ "version": "1.0.0",
39
+ "description": "Use approved partner operations through the Experience Site MCP server.",
40
+ "author": { "name": "User-provided author" },
41
+ "repository": "https://github.com/owner/partner-tools",
42
+ "authStyle": "claude-code",
43
+ "iconPath": "/absolute/path/to/user-selected-icon.png",
44
+ "mcp": {
45
+ "serverName": "partner-tools",
46
+ "environment": "production",
47
+ "domain": "your-my-domain",
48
+ "siteDeveloperName": "PartnerPortal",
49
+ "mcpName": "PartnerTools",
50
+ "clientId": "actual-public-eca-consumer-key"
51
+ },
52
+ "skills": ["/absolute/path/to/optional-skill"]
53
+ }
54
+ ```
55
+
56
+ Use `skills: []` for an MCP-only plugin. Substitute the selected environment (`production`, `developer`, `sandbox` or `scratch`), its My Domain token and the exact site/server developer names as described in the skill; the generator builds the environment's route, so users need not supply or assemble it. Replace the four route components with `mcp.url` only when reusing an authoritative setup URL. Do not normalize the server's DeveloperName or site developer name to the plugin slug. `serverName` is the local MCP configuration key, not a Salesforce record identifier.
57
+
58
+ `authStyle` accepts `"claude-code"` (the default when omitted) or `"requested"` (a custom OAuth profile requiring an explicit user request for the Claude plugin). Both produce the same Claude plugin package format; `"requested"` does not enable Codex, ChatGPT, or other plugin platforms. Use the default for Claude Code and leave custom OAuth compatibility pending until verified. The generator constructs the connection configuration. Report incompatible or ignored settings found during client validation and resolve the profile or inputs before retrying. A consumer secret, access token, refresh token or org-auth file must never enter either profile.
59
+
60
+ ## Local verification
61
+
62
+ ### Callback port input
63
+
64
+ Set `mcp.callbackPort` only to a user-selected JSON integer from 1 through 65535, and only with the `claude-code` profile. Omit the input when the user skips or cannot provide a port; do not supply `null`, an empty string or a guessed value. Check that the intended redirect URI matches the ECA registration; report that check as pending if unverified, and do not modify org settings as part of packaging.
65
+
66
+ Present the generated README's **Local check** instructions, preserving one command per fenced block and its safely quoted destination. Adapt the CLI path when needed. The launch command is for the user to run; do not start an interactive session automatically.
67
+
68
+ Run validation on the final files, not just an earlier preview. Record exit status, errors and warnings, fix packaging errors, and rerun after changes. Compare the generated connection settings with the approved inputs; a successful manifest check alone does not verify the connection. If the executable is not on PATH, use its installed absolute path when available; otherwise mark validation pending.
69
+
70
+ In the interactive client, use `/mcp` to authenticate with the intended Experience Site user and inspect the available tools. Check that the OAuth client and allowed redirect URI match the ECA, the server is active, and the user has permission for the backing actions. Read-only listing is sufficient for packaging verification; do not execute an action just to test the connection. A successful connection does not prove every business tool works or a widget renders.
71
+
72
+ ## Private GitHub handoff
73
+
74
+ Before upload, review every generated and copied file, resolve confidential material or machine-specific references, and clear routing/auth compatibility failures. A private repository still must not contain secrets. Discuss licensing before distribution. Present the generated README's **Publication** instructions and replace any owner placeholder with the user's intended private repository on github.com. Check the active account and intended owner's permissions; private visibility does not bypass managed-account restrictions. Creating a repository, uploading, tagging or submitting requires a separate user request.
75
+
76
+ Preserve one command per fenced block, with labels and blank lines between blocks. Tell users to run commands separately and stop on the first error. Keep repository creation private by default, and adapt the README's release tag to the selected semantic version. Create and push a release tag only after successful upload.
77
+
78
+ For an existing local repository, skip `git init`; commit only if there are changes. For an existing GitHub repository, provide its verified `git remote add origin`/push steps instead of creating a duplicate; inspect an existing `origin` before changing it. Do not recreate, move or force-push an existing release tag. The plugin files belong at the repository root. Keep `.claude-plugin/plugin.json` and release tags aligned for later versions. If no license has been chosen, label that distribution work pending rather than copying a sample license.
79
+
80
+ Private GitHub hosting is separate from public directory submission. After local and client checks, follow [Submit your plugin](https://claude.com/docs/plugins/submit) to review the current access/visibility requirements; do not promise that a private repository is eligible or automatically make it public. Valid structure is not marketplace acceptance. Do not create an Anthropic-owned `/plugins/` entry or submit a PR to the example as the default route for a third-party plugin. End the user-facing completion message with this submission guide as its final documentation link.
@@ -0,0 +1,9 @@
1
+ // DeveloperName values are interpolated into SOQL and filenames.
2
+ // Allow one managed-package separator (ns__Name). Reject a second double
3
+ // underscore, a trailing underscore, and anything over 80 characters.
4
+ const DEVELOPER_NAME =
5
+ /^(?:[A-Za-z][A-Za-z0-9]{0,14}__)?[A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*$/;
6
+
7
+ export function isValidDeveloperName(name) {
8
+ return typeof name === "string" && name.length > 0 && name.length <= 80 && DEVELOPER_NAME.test(name);
9
+ }
@@ -0,0 +1,114 @@
1
+ #!/usr/bin/env node
2
+ // Read-only inventory. Never print the full org-display response: it contains
3
+ // an access token. Only selected non-secret fields leave this process.
4
+ import fs from "node:fs";
5
+ import { execFileSync } from "node:child_process";
6
+ import { isValidDeveloperName } from "./developer_name.mjs";
7
+
8
+ function sfJson(args) {
9
+ return JSON.parse(execFileSync("sf", args, { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }));
10
+ }
11
+
12
+ function normalizeSalesforceId(id) {
13
+ return typeof id === "string" && /^[A-Za-z0-9]{15}(?:[A-Za-z0-9]{3})?$/.test(id) ? id.slice(0, 15) : null;
14
+ }
15
+
16
+ // Enhanced-domain instance hosts encode both the routing token and the environment.
17
+ const HOST_PATTERNS = [
18
+ [/^([a-z0-9-]+--[a-z0-9]+)\.sandbox\.my\.salesforce\.com$/i, "sandbox"],
19
+ [/^([a-z0-9-]+)\.develop\.my\.salesforce\.com$/i, "developer"],
20
+ [/^([a-z0-9-]+)\.scratch\.my\.salesforce\.com$/i, "scratch"],
21
+ [/^([a-z0-9-]+)\.my\.salesforce\.com$/i, "production"],
22
+ ];
23
+
24
+ function domainFromHost(hostname) {
25
+ for (const [pattern, hostEnvironment] of HOST_PATTERNS) {
26
+ const match = hostname.match(pattern);
27
+ if (match) return { value: match[1].toLowerCase(), hostEnvironment };
28
+ }
29
+ return null;
30
+ }
31
+
32
+ // Scratch orgs report IsSandbox and carry a trial expiration; production trials do not report IsSandbox.
33
+ function classifyOrg({ IsSandbox, TrialExpirationDate, OrganizationType }) {
34
+ if (IsSandbox && TrialExpirationDate != null) return "scratch";
35
+ if (IsSandbox) return "sandbox";
36
+ if (typeof OrganizationType === "string" && OrganizationType.toLowerCase().includes("developer")) return "developer";
37
+ return "production";
38
+ }
39
+
40
+ function main() {
41
+ const [targetOrg, serverName, ...extra] = process.argv.slice(2);
42
+ if (!targetOrg || targetOrg.startsWith("-") || extra.length || (serverName && !isValidDeveloperName(serverName))) {
43
+ throw new Error("Usage: discover_mcp_context.mjs <target-org-alias> [SERVER_DEV_NAME]");
44
+ }
45
+ const { sourceApiVersion: apiVersion } = JSON.parse(fs.readFileSync("sfdx-project.json", "utf8"));
46
+ if (!/^\d{2,3}\.0$/.test(apiVersion)) throw new Error("SFDX project sourceApiVersion is missing or invalid");
47
+ let displayed;
48
+ try { displayed = sfJson(["org", "display", "--target-org", targetOrg, "--json"]); }
49
+ catch { throw new Error("Org lookup failed; authenticate the selected org with sf before retrying"); }
50
+ if (displayed.status !== 0 || !displayed.result?.instanceUrl || !displayed.result?.id) throw new Error("Org lookup returned an unrecognized response");
51
+ const instance = new URL(displayed.result.instanceUrl);
52
+ if (instance.protocol !== "https:" || instance.username || instance.password) throw new Error("Org instance URL is invalid");
53
+ const domain = domainFromHost(instance.hostname);
54
+ const errors = [];
55
+ function listNetworkMetadata() {
56
+ try {
57
+ const response = sfJson([
58
+ "org", "list", "metadata", "--metadata-type", "Network",
59
+ "--target-org", targetOrg, "--api-version", apiVersion, "--json",
60
+ ]);
61
+ if (response.status !== 0 || !Array.isArray(response.result) ||
62
+ response.result.some((record) => typeof record.fullName !== "string" || !record.fullName)) {
63
+ throw new Error();
64
+ }
65
+ return response.result.map(({ id, fullName }) => ({ id, fullName }));
66
+ } catch {
67
+ errors.push("Network Metadata API lookup failed or returned incomplete results; this does not prove absence");
68
+ return null;
69
+ }
70
+ }
71
+ function query(label, soql, tooling, fields) {
72
+ try {
73
+ const args = ["data", "query", "--query", soql, "--target-org", targetOrg, "--api-version", apiVersion, "--json"];
74
+ if (tooling) args.push("--use-tooling-api");
75
+ const response = sfJson(args);
76
+ if (response.status !== 0 || !Array.isArray(response.result?.records) || response.result.totalSize !== response.result.records.length) throw new Error();
77
+ return response.result.records.map((record) => Object.fromEntries(fields.map((field) => [field, record[field]])));
78
+ } catch {
79
+ errors.push(`${label} lookup failed or returned incomplete results; this does not prove absence`);
80
+ return null;
81
+ }
82
+ }
83
+ const orgs = query("Org environment", "SELECT IsSandbox, TrialExpirationDate, OrganizationType FROM Organization", false, ["IsSandbox", "TrialExpirationDate", "OrganizationType"]);
84
+ const environment = orgs?.length === 1 ? { value: classifyOrg(orgs[0]), source: "Organization query" } : null;
85
+ if (orgs && orgs.length !== 1) errors.push("Org environment lookup returned no single Organization record");
86
+ const servers = query("MCP server", `SELECT Id, DeveloperName, MasterLabel FROM McpServerDefinition${serverName ? ` WHERE DeveloperName = '${serverName}'` : ""}`, true, ["Id", "DeveloperName", "MasterLabel"]);
87
+ const serverAccess = query("MCP activation", "SELECT Id, McpServerId, Active FROM McpServerAccess", true, ["Id", "McpServerId", "Active"]);
88
+ const networkMetadata = listNetworkMetadata();
89
+ const sites = query("Experience Site", "SELECT Id, Name, UrlPathPrefix FROM Network", false, ["Id", "Name", "UrlPathPrefix"]);
90
+ const siteDeveloperNames = new Map(
91
+ (networkMetadata ?? []).map((record) => [normalizeSalesforceId(record.id), record.fullName])
92
+ .filter(([id]) => id !== null),
93
+ );
94
+ const sitesWithDeveloperNames = sites?.map((site) => ({
95
+ ...site,
96
+ DeveloperName: siteDeveloperNames.get(normalizeSalesforceId(site.Id)) ?? null,
97
+ }));
98
+ const ecas = query("ECA", "SELECT Id, DeveloperName FROM ExternalClientApplication", false, ["Id", "DeveloperName"]);
99
+ console.log(JSON.stringify({
100
+ status: errors.length ? "incomplete" : "discovered",
101
+ targetOrg, apiVersion,
102
+ org: { id: displayed.result.id, instanceUrl: instance.origin },
103
+ environment,
104
+ domainCandidate: domain ? { ...domain, source: "selected org instance hostname", routingVerified: false } : null,
105
+ servers, serverAccess, sites: sitesWithDeveloperNames,
106
+ networkMetadataFullNames: networkMetadata?.map((record) => record.fullName) ?? null,
107
+ ecas, errors,
108
+ }, null, 2));
109
+ }
110
+
111
+ try { main(); } catch (error) {
112
+ console.log(JSON.stringify({ status: "blocked", error: error.message }, null, 2));
113
+ process.exitCode = 1;
114
+ }
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ // Preview or create a standalone connection file without plugin metadata or org writes.
3
+ import fs from "node:fs";
4
+ import path from "node:path";
5
+ import { createMcpConfig } from "./mcp_config.mjs";
6
+
7
+ try {
8
+ const args = process.argv.slice(2);
9
+ if (args.length !== 1 && !(args.length === 2 && args[1] === "--write")) throw new Error("Usage: generate_mcp_config.mjs <CONFIG_JSON> [--write]");
10
+ const config = JSON.parse(fs.readFileSync(args[0], "utf8"));
11
+ if (typeof config.destination !== "string" || !path.isAbsolute(config.destination)) throw new Error("destination must be an absolute path to a new MCP configuration file");
12
+ const destination = path.resolve(config.destination);
13
+ // lstat also detects dangling symlinks; exclusive creation protects against races.
14
+ try {
15
+ fs.lstatSync(destination);
16
+ throw new Error("Destination already exists; select a new file");
17
+ } catch (error) { if (error.code !== "ENOENT") throw error; }
18
+ const mcpConfig = createMcpConfig(config);
19
+ if (args[1] === "--write") {
20
+ fs.mkdirSync(path.dirname(destination), { recursive: true });
21
+ fs.writeFileSync(destination, JSON.stringify(mcpConfig, null, 2) + "\n", { flag: "wx", mode: 0o644 });
22
+ }
23
+ console.log(JSON.stringify({ status: args[1] === "--write" ? "created" : "preview", destination, mcpConfig, runtimeVerified: false }, null, 2));
24
+ } catch (error) {
25
+ console.log(JSON.stringify({ status: "blocked", error: error.message }, null, 2));
26
+ process.exitCode = 1;
27
+ }
@@ -0,0 +1,184 @@
1
+ #!/usr/bin/env node
2
+ // Preview or create a standalone Claude plugin without changing Salesforce,
3
+ // Git state, or an existing destination. The OAuth client ID is public; no secrets belong here.
4
+ import { createMcpConfig } from "./mcp_config.mjs";
5
+ import fs from "node:fs";
6
+ import path from "node:path";
7
+
8
+ const KEBAB = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
9
+ const SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
10
+ const SKIP = new Set([".git", "node_modules", ".DS_Store", "__pycache__"]);
11
+ function need(condition, message) { if (!condition) throw new Error(message); }
12
+ function text(value, name) { need(typeof value === "string" && value.trim(), `${name} must be a non-empty string`); return value.trim(); }
13
+ function readJson(file) { return JSON.parse(fs.readFileSync(file, "utf8")); }
14
+ function shellQuote(value) { return "'" + value.replaceAll("'", "'\\''") + "'"; }
15
+ function within(parent, child) { const rel = path.relative(parent, child); return rel === "" || (!rel.startsWith(`..${path.sep}`) && rel !== ".." && !path.isAbsolute(rel)); }
16
+
17
+ function iconFile(input) {
18
+ need(typeof input === "string" && path.isAbsolute(input), "iconPath must be an absolute path to the user-selected image");
19
+ const stat = fs.lstatSync(input);
20
+ need(stat.isFile(), "iconPath must be a regular file, not a directory or symlink");
21
+ need(stat.size > 0 && stat.size <= 5 * 1024 * 1024, "Plugin icon must be non-empty and at most 5 MiB");
22
+ const extension = path.extname(input).toLowerCase();
23
+ const content = fs.readFileSync(input);
24
+ const valid = extension === ".png" ? content.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]))
25
+ : [".jpg", ".jpeg"].includes(extension) ? content[0] === 255 && content[1] === 216 && content[2] === 255
26
+ : extension === ".webp" && content.toString("ascii", 0, 4) === "RIFF" && content.toString("ascii", 8, 12) === "WEBP";
27
+ need(valid, "iconPath must contain a PNG, JPEG or WebP image matching its extension");
28
+ return { relative: `assets/icon${extension}`, content, mode: 0o644 };
29
+ }
30
+
31
+ function skillFiles(input, destination) {
32
+ need(path.isAbsolute(input), "Skill paths must be absolute");
33
+ const source = fs.realpathSync(input);
34
+ need(fs.statSync(source).isDirectory(), "A skill path must point to a directory");
35
+ need(!within(source, destination), "Plugin destination cannot be inside an included skill");
36
+ const content = fs.readFileSync(path.join(source, "SKILL.md"), "utf8");
37
+ const frontmatter = content.match(/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/)?.[1];
38
+ const name = frontmatter?.match(/^name:\s*["']?([a-z0-9]+(?:-[a-z0-9]+)*)["']?\s*$/m)?.[1];
39
+ need(name && name.length <= 64 && /^description:\s*\S/m.test(frontmatter), `Skill must have a kebab-case name and description in SKILL.md: ${input}`);
40
+ const files = [];
41
+ function visit(dir, relative = "") {
42
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
43
+ if (SKIP.has(entry.name)) continue;
44
+ const rel = path.posix.join(relative, entry.name);
45
+ need(!entry.isSymbolicLink(), `Resolve skill symlinks before packaging: ${rel}`);
46
+ need(!/^(?:\.env(?:\..*)?|\.npmrc|\.pypirc|\.sf|\.sfdx|a4d_mcp_settings\.json)$|\.(?:pem|key)$/i.test(entry.name), `Remove credential/configuration files from the skill before packaging: ${rel}`);
47
+ const file = path.join(dir, entry.name);
48
+ if (entry.isDirectory()) visit(file, rel);
49
+ else {
50
+ need(entry.isFile(), `Unsupported skill entry: ${rel}`);
51
+ files.push({ relative: `skills/${name}/${rel}`, content: fs.readFileSync(file), mode: fs.statSync(file).mode & 0o777 });
52
+ }
53
+ }
54
+ }
55
+ visit(source);
56
+ return { name, files };
57
+ }
58
+
59
+ function main() {
60
+ const args = process.argv.slice(2);
61
+ need(args.length === 1 || (args.length === 2 && args[1] === "--write"), "Usage: generate_plugin.mjs <CONFIG_JSON> [--write]");
62
+ const config = readJson(args[0]);
63
+ const name = text(config.name, "name");
64
+ need(KEBAB.test(name) && name.length <= 64, "Plugin name must be kebab-case and at most 64 characters");
65
+ need(!/^(?:claude|anthropic|anthropics|cc-plugin)(?:-|$)/.test(name), "Choose a plugin name that does not impersonate the client vendor");
66
+ const version = config.version ?? "1.0.0";
67
+ need(SEMVER.test(version), "Plugin version must be semantic versioning, for example 1.0.0");
68
+ need(typeof config.destination === "string" && path.isAbsolute(config.destination), "destination must be the user-selected absolute path for a new plugin directory");
69
+ const destination = path.resolve(config.destination);
70
+ need(destination !== path.parse(destination).root && !fs.existsSync(destination), "Destination already exists or is a filesystem root; select a new directory");
71
+ const description = text(config.description, "description");
72
+ const author = { name: text(config.author?.name, "author.name") };
73
+ if (config.author.email) author.email = text(config.author.email, "author.email");
74
+ const manifest = { name, version, description, author };
75
+ if (config.repository) {
76
+ need(/^https:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/?$/.test(config.repository), "repository must be the intended github.com repository URL");
77
+ manifest.repository = config.repository;
78
+ }
79
+ if (config.license) manifest.license = text(config.license, "license");
80
+ const icon = config.iconPath === undefined ? null : iconFile(config.iconPath);
81
+ if (icon) manifest.icon = `./${icon.relative}`;
82
+ const mcpConfig = createMcpConfig(config);
83
+ const server = Object.values(mcpConfig.mcpServers)[0];
84
+ const url = server.url;
85
+ const authStyle = config.authStyle ?? "claude-code";
86
+ const sources = config.skills ?? [];
87
+ need(Array.isArray(sources), "skills must be an array of absolute skill directory paths");
88
+ const skills = sources.map((source) => skillFiles(source, destination));
89
+ need(new Set(skills.map((skill) => skill.name)).size === skills.length, "Included skills have duplicate names");
90
+ const jsonFile = (relative, value) => ({ relative, content: JSON.stringify(value, null, 2) + "\n", mode: 0o644 });
91
+ const repository = config.repository ? new URL(config.repository).pathname.replace(/^\/|\/$/g, "") : `OWNER/${name}`;
92
+ const localCheck = `Copy and run each command separately. Continue only after changing directory successfully.
93
+
94
+ Enter the plugin directory:
95
+
96
+ \`\`\`bash
97
+ cd -- ${shellQuote(destination)}
98
+ \`\`\`
99
+
100
+ Validate:
101
+
102
+ \`\`\`bash
103
+ claude plugin validate .
104
+ \`\`\`
105
+
106
+ Launch Claude with the plugin:
107
+
108
+ \`\`\`bash
109
+ claude --plugin-dir .
110
+ \`\`\``;
111
+ const publication = `Review files before uploading; a private repository must not contain secrets. Use a private GitHub repository and retain the kebab-case plugin name. ${config.repository ? "The commands use your selected repository." : "Replace OWNER below with your approved GitHub username or organization."} Check the active GitHub account and owner permissions; private visibility does not bypass enterprise-managed account restrictions.
112
+
113
+ Copy and run each command separately using its own code block, and stop on any error. Do not copy the entire multi-step section at once. The following is for a new local repository and a new remote only. For an existing repository, skip initialization, commit only changed files and inspect any existing origin before adding or changing it.
114
+
115
+ Initialize:
116
+
117
+ \`\`\`bash
118
+ git init -b main
119
+ \`\`\`
120
+
121
+ Stage files:
122
+
123
+ \`\`\`bash
124
+ git add .
125
+ \`\`\`
126
+
127
+ Commit:
128
+
129
+ \`\`\`bash
130
+ git commit -m "Initial plugin package"
131
+ \`\`\`
132
+
133
+ Create the private remote and upload:
134
+
135
+ \`\`\`bash
136
+ gh repo create ${repository} --private --source . --remote origin --push
137
+ \`\`\`
138
+
139
+ Only after successful upload, create the release tag if it does not already exist. Do not recreate or move an existing tag.
140
+
141
+ \`\`\`bash
142
+ git tag v${version}
143
+ \`\`\`
144
+
145
+ Push the tag:
146
+
147
+ \`\`\`bash
148
+ git push origin v${version}
149
+ \`\`\`
150
+
151
+ Bump the semantic version for later releases. Private hosting is separate from public directory submission: review the access/visibility requirements and licensing before submission, and do not change repository visibility automatically. Follow [Submit your plugin](https://claude.com/docs/plugins/submit); local validation does not guarantee directory approval.
152
+ `;
153
+ const files = [
154
+ jsonFile(".claude-plugin/plugin.json", manifest),
155
+ jsonFile(".mcp.json", mcpConfig),
156
+ ...(icon ? [icon] : []),
157
+ { relative: ".gitignore", content: ".DS_Store\n.env\n.env.*\n*.log\nnode_modules/\n", mode: 0o644 },
158
+ { relative: "README.md", content: `# ${name}\n\n${description}\n\n## Connection\n\nThis plugin connects to the Salesforce hosted MCP server at:\n\n${url}\n\nSign in as the intended Experience Site user through the client's OAuth flow. The ECA consumer key is a public OAuth client ID; this package contains no client secret or access token. Confirm that the ECA callback URLs match the client, that required MCP scopes are enabled, and that the user has access to the selected server and its actions.\n\n${authStyle === "requested" ? "This package uses the requested submission profile, `auth.CLIENT_ID`. Verify that the target client accepts it; current Claude Code documents `oauth.clientId` instead. This profile is not proof of runtime compatibility." : "This package uses Claude Code's documented `oauth.clientId` configuration."}\n\n## Local check\n\n${localCheck}\n\nIn Claude Code, open \`/mcp\`, complete OAuth, and check that expected tools are listed. Inspect tool descriptions before executing an action. Local metadata validation alone does not verify routing, OAuth, or tool execution.\n\n## Included skills\n\n${skills.length ? skills.map((skill) => `- \`${name}:${skill.name}\` — see \`skills/${skill.name}/SKILL.md\`.`).join("\n") : "No skills are bundled; this plugin provides the MCP connection."}\n\n## Publication\n\n${publication}`, mode: 0o644 },
159
+ ...skills.flatMap((skill) => skill.files),
160
+ ];
161
+ if (args[1] === "--write") {
162
+ const parent = path.dirname(destination);
163
+ fs.mkdirSync(parent, { recursive: true });
164
+ const staging = fs.mkdtempSync(path.join(parent, ".plugin-package-"));
165
+ try {
166
+ for (const file of files) {
167
+ const target = path.join(staging, file.relative);
168
+ fs.mkdirSync(path.dirname(target), { recursive: true });
169
+ fs.writeFileSync(target, file.content, { mode: file.mode });
170
+ }
171
+ need(!fs.existsSync(destination), "Destination appeared during generation; nothing was replaced");
172
+ fs.renameSync(staging, destination);
173
+ } catch (error) {
174
+ fs.rmSync(staging, { recursive: true, force: true });
175
+ throw error;
176
+ }
177
+ }
178
+ console.log(JSON.stringify({ status: args[1] === "--write" ? "created" : "preview", destination, plugin: name, version, url, authStyle, skills: skills.map((skill) => skill.name), files: files.map((file) => file.relative), runtimeVerified: false }, null, 2));
179
+ }
180
+
181
+ try { main(); } catch (error) {
182
+ console.log(JSON.stringify({ status: "blocked", error: error.message }, null, 2));
183
+ process.exitCode = 1;
184
+ }
@@ -0,0 +1,57 @@
1
+ // Connection validation shared by standalone configuration and plugin delivery.
2
+ function need(condition, message) { if (!condition) throw new Error(message); }
3
+ function text(value, name) { need(typeof value === "string" && value.trim(), `${name} must be a non-empty string`); return value.trim(); }
4
+
5
+ // Org environment → route segment between the domain token and the site.
6
+ const ENVIRONMENT_SEGMENTS = { production: "", developer: "develop", sandbox: "sandbox", scratch: "scratch" };
7
+
8
+ function checkDomain(domain, environment) {
9
+ need(/^[a-z0-9]+(?:[a-z0-9.-]*[a-z0-9])?$/.test(domain) && !domain.includes(".."), "domain must be the routing domain token, not a URL or full instance hostname");
10
+ need(!domain.endsWith("salesforce.com"), "Use the routing domain token, not the full Salesforce hostname");
11
+ need(!domain.includes("."), `${environment} domain must not contain dots`);
12
+ if (environment === "sandbox") need(/^[a-z0-9-]+--[a-z0-9]+$/.test(domain), "sandbox domain must be {my-domain}--{sandbox-name}");
13
+ else need(!domain.includes("--"), `${environment} domain must not contain a sandbox suffix`);
14
+ }
15
+
16
+ function mcpUrl(mcp) {
17
+ need(mcp.sitePrefix === undefined, "mcp.sitePrefix is no longer supported; supply the exact site developer name as mcp.siteDeveloperName");
18
+ if (mcp.url) {
19
+ need(!mcp.domain && !mcp.environment && mcp.siteDeveloperName === undefined, "Supply a verified URL or route components, not both");
20
+ const url = new URL(mcp.url);
21
+ need(url.protocol === "https:" && !url.username && !url.password && !url.search && !url.hash, "MCP URL must use HTTPS without credentials, query, or fragment");
22
+ return url.href;
23
+ }
24
+ const environment = text(mcp.environment, "mcp.environment");
25
+ need(Object.hasOwn(ENVIRONMENT_SEGMENTS, environment), `mcp.environment must be one of: ${Object.keys(ENVIRONMENT_SEGMENTS).join(", ")}`);
26
+ const domain = text(mcp.domain, "mcp.domain");
27
+ checkDomain(domain, environment);
28
+ const siteDeveloperName = text(mcp.siteDeveloperName, "mcp.siteDeveloperName");
29
+ need(/^[A-Za-z0-9_-]+$/.test(siteDeveloperName), "siteDeveloperName must be the exact site developer name without slashes");
30
+ const name = text(mcp.mcpName, "mcp.mcpName");
31
+ need(/^[A-Za-z][A-Za-z0-9_]*$/.test(name), "mcpName must be the exact server DeveloperName");
32
+ const segment = ENVIRONMENT_SEGMENTS[environment];
33
+ return `https://api.salesforce.com/platform/mcp/v1/p/${encodeURIComponent(domain)}/${segment ? `${segment}/` : ""}${encodeURIComponent(siteDeveloperName)}/custom/${encodeURIComponent(name)}`;
34
+ }
35
+
36
+ export function createMcpConfig(config) {
37
+ need(config.mcp && typeof config.mcp === "object", "mcp configuration is required");
38
+ const serverKey = text(config.mcp.serverName, "mcp.serverName");
39
+ need(/^[A-Za-z0-9_-]+$/.test(serverKey), "mcp.serverName must contain letters, numbers, underscores, or hyphens");
40
+ const clientId = text(config.mcp.clientId, "mcp.clientId");
41
+ need(!/[\s<>]/.test(clientId), "Use the actual ECA consumer key as clientId, not a placeholder or ECA record ID");
42
+ need(clientId !== config.mcp.ecaId, "clientId must be the ECA consumer key, not its record ID");
43
+ const url = mcpUrl(config.mcp);
44
+ // Custom client conventions must be explicitly selected, not inferred from submission.
45
+ const authStyle = config.authStyle ?? "claude-code";
46
+ need(["requested", "claude-code"].includes(authStyle), "authStyle must be requested or claude-code");
47
+ const server = { type: "http", url };
48
+ if (authStyle === "requested") server.auth = { CLIENT_ID: clientId };
49
+ else server.oauth = { clientId };
50
+ if (config.mcp.callbackPort !== undefined) {
51
+ need(authStyle === "claude-code", "mcp.callbackPort requires the claude-code OAuth profile");
52
+ const port = config.mcp.callbackPort;
53
+ need(Number.isInteger(port) && port >= 1 && port <= 65535, "mcp.callbackPort must be a JSON integer from 1 through 65535; omit it when skipped");
54
+ server.oauth.callbackPort = port;
55
+ }
56
+ return { mcpServers: { [serverKey]: server } };
57
+ }
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env node
2
+ // Run from the SFDX project root; read the JSON `decision`. Exit 0 = decision reached (incl. skip, needs_input); exit 1 = error.
3
+ // Usage: node preflight.mjs <target-org-alias> --skill-named <true|false>
4
+ import fs from "node:fs";
5
+ import { execFileSync } from "node:child_process";
6
+
7
+ const [org, option, skillNamed, ...extra] = process.argv.slice(2);
8
+ const requestNamesSkill = skillNamed === "true";
9
+ let gatePassed = false;
10
+
11
+ function finish(report, code = 0) {
12
+ console.log(JSON.stringify(report));
13
+ process.exit(code);
14
+ }
15
+
16
+ function skip(disabled = false) {
17
+ finish({
18
+ decision: disabled && requestNamesSkill ? "disabled" : "skip",
19
+ nextAction: "continue_without_this_skill",
20
+ userMessage: disabled && requestNamesSkill ? "The App MCP skill is not enabled for this org." : null,
21
+ });
22
+ }
23
+
24
+ function problem(errorCode, userMessage, nextAction, needsInput = false) {
25
+ if (!needsInput && !gatePassed && !requestNamesSkill) skip();
26
+ finish({ decision: needsInput ? "needs_input" : "error", errorCode, userMessage, nextAction, gatePassed }, needsInput ? 0 : 1);
27
+ }
28
+
29
+ if (!org || org.startsWith("--") || option !== "--skill-named" ||
30
+ !["true", "false"].includes(skillNamed) || extra.length) {
31
+ problem("invalid_arguments", "Provide a target org alias and --skill-named true or false.", "Correct the preflight arguments.", true);
32
+ }
33
+
34
+ let project;
35
+ try {
36
+ project = JSON.parse(fs.readFileSync("sfdx-project.json", "utf8"));
37
+ } catch {
38
+ problem("invalid_project", "Could not read sfdx-project.json.", "Select a valid SFDX project root, then rerun preflight.");
39
+ }
40
+ const version = project?.sourceApiVersion;
41
+ if (typeof version !== "string" || !/^\d+\.\d+$/.test(version) || Number(version) < 68) {
42
+ problem("invalid_api_version", "sfdx-project.json sourceApiVersion must use X.Y format and be at least 68.0.",
43
+ "Ask the user to correct sourceApiVersion to an org-supported version, then rerun preflight.", true);
44
+ }
45
+
46
+ function sf(args) {
47
+ let output;
48
+ let failed = false;
49
+ try {
50
+ output = execFileSync("sf", args, {
51
+ encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], timeout: 30000,
52
+ });
53
+ } catch (error) {
54
+ output = error.stdout ?? "";
55
+ failed = true;
56
+ }
57
+ let response;
58
+ try {
59
+ response = JSON.parse(output);
60
+ } catch {
61
+ return { failed: true, response: null };
62
+ }
63
+ if (response?.name === "NamedOrgNotFoundError" || response?.code === "NamedOrgNotFoundError") {
64
+ problem("invalid_org_alias", "No authenticated org matches the target org alias.",
65
+ "Ask the user for a valid authenticated org alias, then rerun preflight.", true);
66
+ }
67
+ return { failed, response };
68
+ }
69
+
70
+ const versionsResult = sf(["api", "request", "rest", "/services/data/",
71
+ "--target-org", org, "--method", "GET", "--json"]);
72
+ const versions = versionsResult.response?.result?.body;
73
+ if (versionsResult.failed || versionsResult.response?.status !== 0 ||
74
+ versionsResult.response?.result?.statusCode !== 200 || !Array.isArray(versions) || !versions.length ||
75
+ !versions.every((entry) => typeof entry?.version === "string" && /^\d+\.\d+$/.test(entry.version))) {
76
+ problem("gate_check_failed", "Could not determine the target org's supported API versions.",
77
+ "Check target-org authentication and connectivity, then rerun preflight.");
78
+ }
79
+ const compatibleVersions = versions.filter((entry) => Number(entry.version) >= 68).map((entry) => entry.version);
80
+ if (!compatibleVersions.length) {
81
+ problem("invalid_api_version", "The target org does not advertise an API version of at least 68.0.",
82
+ "Ask the user for an org alias supporting API 68.0 or later, then rerun preflight.", true);
83
+ }
84
+ if (!compatibleVersions.includes(version)) {
85
+ problem("invalid_api_version", "sfdx-project.json sourceApiVersion is not supported by the target org.",
86
+ "Ask the user to select a supported sourceApiVersion of at least 68.0 from: " +
87
+ compatibleVersions.join(", ") +
88
+ ". Then rerun preflight.", true);
89
+ }
90
+
91
+ const gateResult = sf(["api", "request", "rest", `/services/data/v${version}/headless/invocableaction`,
92
+ "--target-org", org, "--method", "POST", "--body",
93
+ JSON.stringify({ action: "getExperienceAppMcpMetadata-getExperienceAppMcpMetadata", inputs: {} }), "--json"]);
94
+ const gate = gateResult.response;
95
+ const body = gate?.result?.body;
96
+ if (gate?.result?.statusCode === 400 && Array.isArray(body) &&
97
+ body.some((error) => error?.errorCode === "INVALID_INPUT")) skip(true);
98
+ const unsupportedGateActionMessage = /Unsupported action type: GET_EXPERIENCE_APP_MCP_METADATA(?![A-Za-z0-9_])/;
99
+ if (Array.isArray(body) && body.some((error) =>
100
+ typeof error?.message === "string" && unsupportedGateActionMessage.test(error.message))) skip(true);
101
+ if (gateResult.failed || gate?.status !== 0 || gate?.result?.statusCode !== 200 ||
102
+ typeof body?.outputs?.isAppMcpEnabled !== "boolean") {
103
+ problem("gate_check_failed", "Could not verify whether the App MCP skill is enabled.",
104
+ "Check target-org authentication and connectivity, then rerun preflight.");
105
+ }
106
+ if (!body.outputs.isAppMcpEnabled) skip(true);
107
+ gatePassed = true;
108
+
109
+ finish({ decision: "continue" });