@salesforce/afv-skills 1.59.0 → 1.60.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 (173) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-architecture-analyze/SKILL.md +66 -17
  3. package/skills/agentforce-architecture-analyze/assets/cli/show_access_token.yaml +4 -7
  4. package/skills/agentforce-architecture-analyze/references/contract.json +1 -1
  5. package/skills/agentforce-architecture-analyze/scripts/emit_env.py +2 -2
  6. package/skills/agentforce-architecture-analyze/scripts/main.py +40 -44
  7. package/skills/agentforce-architecture-analyze/scripts/rest_client.py +11 -3
  8. package/skills/agentforce-architecture-analyze/scripts/sf_cli.py +77 -10
  9. package/skills/agentforce-architecture-analyze/scripts/tests/test_end_to_end_fixture.py +1 -0
  10. package/skills/agentforce-architecture-analyze/scripts/tests/test_flow_children_inflation.py +1 -0
  11. package/skills/agentforce-architecture-analyze/scripts/tests/test_main_pipeline.py +53 -2
  12. package/skills/agentforce-architecture-analyze/scripts/tests/test_resolve_creds.py +184 -36
  13. package/skills/agentforce-architecture-analyze/scripts/tests/test_rest_client.py +17 -0
  14. package/skills/agentforce-architecture-analyze/scripts/tests/test_sf_cli.py +165 -11
  15. package/skills/agentforce-architecture-analyze/scripts/tests/test_skill_md_pipeline_block.py +319 -0
  16. package/skills/agentforce-d360-analyze/SKILL.md +28 -10
  17. package/skills/agentforce-d360-analyze/scripts/dc.py +200 -50
  18. package/skills/agentforce-d360-analyze/scripts/discover_sessions.py +10 -6
  19. package/skills/agentforce-d360-analyze/scripts/fetch_dc.py +22 -6
  20. package/skills/agentforce-d360-analyze/scripts/resolve_session.py +21 -13
  21. package/skills/agentforce-d360-analyze/scripts/tests/test_dc_and_resolve_session.py +298 -76
  22. package/skills/agentforce-d360-analyze/scripts/tests/test_default_target_org.py +432 -0
  23. package/skills/agentforce-d360-analyze/scripts/tests/test_discover_sessions.py +1 -1
  24. package/skills/agentforce-d360-analyze/scripts/tests/test_resolve_session_main.py +9 -3
  25. package/skills/agentforce-d360-analyze/scripts/tests/test_skill_md_prefix_block.py +176 -0
  26. package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +17 -27
  27. package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +7 -17
  28. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +47 -63
  29. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +10 -13
  30. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -46
  31. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +4 -21
  32. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +58 -82
  33. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +16 -315
  34. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +9 -24
  35. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -44
  36. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +11 -63
  37. package/skills/consumer-goods-rtr-datacloud-export-configure/SKILL.md +2 -1
  38. package/skills/consumer-goods-tpe-dashboard-configure/SKILL.md +2 -1
  39. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/SKILL.md +2 -1
  40. package/skills/consumer-goods-tpe-datakit-deploy/SKILL.md +2 -1
  41. package/skills/data360-schema-get/SKILL.md +3 -3
  42. package/skills/design-systems-slds-validate/references/report-format.md +1 -1
  43. package/skills/dx-org-manage/SKILL.md +1 -0
  44. package/skills/dx-org-shape-manage/SKILL.md +1 -0
  45. package/skills/dx-org-snapshot-manage/SKILL.md +172 -0
  46. package/skills/dx-org-snapshot-manage/examples/create_error_output.json +16 -0
  47. package/skills/dx-org-snapshot-manage/examples/create_success_output.json +19 -0
  48. package/skills/dx-org-snapshot-manage/examples/delete_output.json +9 -0
  49. package/skills/dx-org-snapshot-manage/examples/get_output.json +19 -0
  50. package/skills/dx-org-snapshot-manage/examples/list_output.json +36 -0
  51. package/skills/dx-org-snapshot-manage/references/cli_flags.md +179 -0
  52. package/skills/dx-org-snapshot-manage/references/snapshot_usage.md +55 -0
  53. package/skills/dx-org-trial-expiration-check/SKILL.md +1 -1
  54. package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +2 -2
  55. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +7 -5
  56. package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +11 -11
  57. package/skills/experience-content-media-image-generate/SKILL.md +83 -0
  58. package/skills/experience-content-media-image-generate/scripts/download-image.sh +84 -0
  59. package/skills/external-diagram-mermaid-generate/SKILL.md +12 -12
  60. package/skills/field-service-data-capture-migrate/references/component-mapping.md +1 -1
  61. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +1 -2
  62. package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +1 -0
  63. package/skills/field-service-data-capture-migrate/references/transformer-rules.md +1 -1
  64. package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +12 -1
  65. package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +4 -1
  66. package/skills/field-service-setup-orchestrator-get/SKILL.md +0 -1
  67. package/skills/insurance-brokerage-agency-billing-configure/SKILL.md +233 -0
  68. package/skills/insurance-brokerage-agency-billing-configure/references/accounting-setup.md +117 -0
  69. package/skills/insurance-brokerage-agency-billing-configure/references/billing-rules-config.md +237 -0
  70. package/skills/insurance-brokerage-agency-billing-configure/references/billing-settings.md +271 -0
  71. package/skills/insurance-brokerage-agency-billing-configure/references/demo-policy-config.md +138 -0
  72. package/skills/insurance-brokerage-agency-billing-configure/references/org-defaults.md +64 -0
  73. package/skills/insurance-brokerage-agency-billing-configure/references/permissions-config.md +226 -0
  74. package/skills/insurance-brokerage-agency-billing-configure/references/prerequisites.md +142 -0
  75. package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +3 -2
  76. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-execution-state-and-recovery.md +3 -3
  77. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-overview.md +68 -45
  78. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-visit-creation-data.md +17 -18
  79. package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +16 -3
  80. package/skills/life-sciences-kam-coordinate/references/stage-5-data-creation-data.md +16 -13
  81. package/skills/marketing-message-test/SKILL.md +194 -0
  82. package/skills/marketing-message-test/references/api-contract.md +333 -0
  83. package/skills/omnistudio-callable-apex-generate/SKILL.md +3 -3
  84. package/skills/omnistudio-datamapper-generate/SKILL.md +6 -6
  85. package/skills/omnistudio-datapacks-deploy/SKILL.md +11 -11
  86. package/skills/omnistudio-dependencies-analyze/SKILL.md +5 -5
  87. package/skills/omnistudio-epc-catalog-generate/SKILL.md +6 -6
  88. package/skills/omnistudio-flexcard-generate/SKILL.md +6 -6
  89. package/skills/omnistudio-integration-procedure-generate/SKILL.md +6 -6
  90. package/skills/omnistudio-omniscript-generate/SKILL.md +6 -5
  91. package/skills/platform-apex-logs-debug/SKILL.md +1 -0
  92. package/skills/platform-metadata-deploy/SKILL.md +1 -0
  93. package/skills/platform-models-api-configure/SKILL.md +5 -5
  94. package/skills/platform-soql-query/SKILL.md +1 -0
  95. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +17 -6
  96. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +107 -192
  97. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone-action.json +6 -6
  98. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +49 -20
  99. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +4 -4
  100. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +224 -290
  101. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/workflow.md +295 -0
  102. package/skills/service-itsm-incident-priority-configure/SKILL.md +1 -1
  103. package/skills/service-itsm-slack-itservice-configure/SKILL.md +2 -1
  104. package/skills/service-itsm-slack-itservice-configure/references/manage-slack-connection.md +2 -2
  105. package/skills/service-omni-channel-setup-coordinate/SKILL.md +20 -13
  106. package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +5 -55
  107. package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +0 -38
  108. package/skills/service-omni-command-center-analyze/SKILL.md +2 -3
  109. package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
  110. package/skills/tableau-next-asset-create/README.md +65 -0
  111. package/skills/tableau-next-asset-create/SKILL.md +409 -0
  112. package/skills/tableau-next-asset-create/references/admin-users.md +149 -0
  113. package/skills/tableau-next-asset-create/references/ai-readiness.md +355 -0
  114. package/skills/tableau-next-asset-create/references/alerts.md +111 -0
  115. package/skills/tableau-next-asset-create/references/build-workflow.md +819 -0
  116. package/skills/tableau-next-asset-create/references/dashboard-authoring.md +302 -0
  117. package/skills/tableau-next-asset-create/references/dashboard-design-principles.md +352 -0
  118. package/skills/tableau-next-asset-create/references/data-transform-gotchas.md +210 -0
  119. package/skills/tableau-next-asset-create/references/data-understanding.md +387 -0
  120. package/skills/tableau-next-asset-create/references/deep-reference-index.md +74 -0
  121. package/skills/tableau-next-asset-create/references/destructive-operations.md +62 -0
  122. package/skills/tableau-next-asset-create/references/edit-dashboard.md +273 -0
  123. package/skills/tableau-next-asset-create/references/edit-visualization.md +529 -0
  124. package/skills/tableau-next-asset-create/references/empty-source-handling.md +104 -0
  125. package/skills/tableau-next-asset-create/references/ingest-and-metric-gotchas.md +638 -0
  126. package/skills/tableau-next-asset-create/references/insight-bundle.md +69 -0
  127. package/skills/tableau-next-asset-create/references/large-flat-file-handling.md +331 -0
  128. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_envelope.json +54 -0
  129. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_shared-widget-fields.json +122 -0
  130. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/add_page.json +29 -0
  131. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/delete_page.json +27 -0
  132. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/discard_dashboard.json +11 -0
  133. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget.json +30 -0
  134. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget_to_page.json +30 -0
  135. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/place_widget_on_page.json +30 -0
  136. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_dashboard.json +16 -0
  137. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_page.json +26 -0
  138. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/rename_page.json +28 -0
  139. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/save_dashboard.json +18 -0
  140. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/undo.json +11 -0
  141. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_button_widget.json +69 -0
  142. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_container_widget.json +88 -0
  143. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_filter_widget.json +146 -0
  144. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_metric_widget.json +78 -0
  145. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_navigation_widget.json +80 -0
  146. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_parameter_widget.json +160 -0
  147. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_text_widget.json +103 -0
  148. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_visualization_widget.json +68 -0
  149. package/skills/tableau-next-asset-create/references/sdm-tool-reference.md +721 -0
  150. package/skills/tableau-next-asset-create/references/semantic-query-and-enrichment.md +355 -0
  151. package/skills/tableau-next-asset-create/references/shared-gates.md +322 -0
  152. package/skills/tableau-next-asset-create/references/sharing-and-promotion.md +306 -0
  153. package/skills/tableau-next-asset-create/references/tasks/ai-readiness-audit.md +51 -0
  154. package/skills/tableau-next-asset-create/references/tasks/analyze-data.md +48 -0
  155. package/skills/tableau-next-asset-create/references/tasks/build-dashboard.md +66 -0
  156. package/skills/tableau-next-asset-create/references/tasks/build-end-to-end.md +73 -0
  157. package/skills/tableau-next-asset-create/references/tasks/create-data-transform.md +51 -0
  158. package/skills/tableau-next-asset-create/references/tasks/create-viz.md +58 -0
  159. package/skills/tableau-next-asset-create/references/tasks/edit-dashboard.md +80 -0
  160. package/skills/tableau-next-asset-create/references/tasks/edit-sdm.md +106 -0
  161. package/skills/tableau-next-asset-create/references/tasks/edit-viz.md +40 -0
  162. package/skills/tableau-next-asset-create/references/tasks/enrich-model.md +68 -0
  163. package/skills/tableau-next-asset-create/references/tasks/ingest-flat-file.md +68 -0
  164. package/skills/tableau-next-asset-create/references/tasks/manage-alert.md +35 -0
  165. package/skills/tableau-next-asset-create/references/tasks/profile-dataset.md +47 -0
  166. package/skills/tableau-next-asset-create/references/tasks/promote-or-reuse.md +46 -0
  167. package/skills/tableau-next-asset-create/references/tasks/provision-user.md +39 -0
  168. package/skills/tableau-next-asset-create/references/tasks/query-model.md +92 -0
  169. package/skills/tableau-next-asset-create/references/tasks/review-verified-questions.md +42 -0
  170. package/skills/tableau-next-asset-create/references/tasks/share-asset.md +37 -0
  171. package/skills/tableau-next-asset-create/references/verified-questions.md +125 -0
  172. package/skills/tableau-next-asset-create/references/viz-authoring.md +992 -0
  173. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +0 -102
@@ -1,4 +1,4 @@
1
- const { execSync, execFileSync, spawnSync } = require('child_process');
1
+ const { execSync, execFileSync } = require('child_process');
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
4
 
@@ -16,16 +16,7 @@ const ACCESS_TOKEN_VIA_SHOW_SINCE = [2, 136, 8];
16
16
 
17
17
  function getSfCliVersion() {
18
18
  try {
19
- let raw;
20
- if (process.platform === 'win32') {
21
- const r = spawnSync('sf.cmd', ['version', '--json'], {
22
- encoding: 'utf8', stdio: 'pipe', shell: true, windowsVerbatimArguments: true
23
- });
24
- if (r.error) return null;
25
- raw = r.stdout;
26
- } else {
27
- raw = execFileSync(getSfBin(), ['version', '--json'], { encoding: 'utf8', stdio: 'pipe' });
28
- }
19
+ const raw = execFileSync(getSfBin(), ['version', '--json'], { encoding: 'utf8', stdio: 'pipe' });
29
20
  const { cliVersion } = JSON.parse(raw);
30
21
  const m = (cliVersion || '').match(/(\d+)\.(\d+)\.(\d+)/);
31
22
  return m ? m.slice(1).map(Number) : null;
@@ -48,27 +39,10 @@ function isSfAtLeast(version, min) {
48
39
  * @param {string[]} args - CLI arguments
49
40
  * @returns {any} parsed JSON result
50
41
  */
51
- function execSfJson(args, options) {
52
- options = options || {};
42
+ function execSfJson(args) {
53
43
  let rawOutput;
54
44
  try {
55
- if (process.platform === 'win32') {
56
- // execFileSync cannot run .cmd files without shell:true, but shell:true
57
- // word-splits args containing spaces. Use spawnSync with shell:true +
58
- // windowsVerbatimArguments:true and pre-quote space-bearing args so that
59
- // cmd.exe receives them intact.
60
- const winArgs = args.map(a =>
61
- (a.includes(' ') || a.includes("'")) ? `"${a.replace(/"/g, '\\"')}"` : a
62
- );
63
- const r = spawnSync('sf.cmd', winArgs, {
64
- encoding: 'utf8', stdio: 'pipe', shell: true, windowsVerbatimArguments: true,
65
- cwd: options.cwd
66
- });
67
- if (r.error) throw r.error;
68
- rawOutput = r.stdout;
69
- } else {
70
- rawOutput = execFileSync(getSfBin(), args, { encoding: 'utf8', stdio: 'pipe', cwd: options.cwd });
71
- }
45
+ rawOutput = execFileSync(getSfBin(), args, { encoding: 'utf8', stdio: 'pipe' });
72
46
  } catch (err) {
73
47
  if (err.stdout) {
74
48
  rawOutput = err.stdout;
@@ -227,12 +201,6 @@ function getBundleStreamMap(dataKitPath) {
227
201
  .filter(f => f.endsWith('.dataStreamTemplate-meta.xml'));
228
202
 
229
203
  const bundleRegex = /<dataSourceBundleDefinition>\s*([^<\s]+)\s*<\/dataSourceBundleDefinition>/i;
230
- // <sourceObjectName> is the stable identifier that appears verbatim (or as a prefix
231
- // for ingest streams with hex suffixes) in DataKitDeploymentLog.ComponentName.
232
- // E.g. sourceObjectName "tpm_accrualrule_ingest" → log "tpm_accrualrule_ingest_3ADCEDC6".
233
- // Fall back to <dataSourceObject> if absent, then to the filename stem.
234
- const srcObjNameRegex = /<sourceObjectName>\s*([^<\s]+)\s*<\/sourceObjectName>/i;
235
- const srcObjRegex = /<dataSourceObject>\s*([^<\s]+)\s*<\/dataSourceObject>/i;
236
204
 
237
205
  for (const file of files) {
238
206
  const fullPath = path.join(templatesDir, file);
@@ -247,20 +215,12 @@ function getBundleStreamMap(dataKitPath) {
247
215
  if (!match) continue;
248
216
 
249
217
  const bundleName = match[1];
250
- const srcObjNameMatch = content.match(srcObjNameRegex);
251
- const srcObjMatch = content.match(srcObjRegex);
252
- const streamDevName = srcObjNameMatch
253
- ? srcObjNameMatch[1]
254
- : srcObjMatch
255
- ? srcObjMatch[1]
256
- : file.replace(/\.dataStreamTemplate-meta\.xml$/, '');
218
+ const streamDevName = file.replace(/\.dataStreamTemplate-meta\.xml$/, '');
257
219
 
258
220
  if (!map.has(bundleName)) {
259
221
  map.set(bundleName, []);
260
222
  }
261
- if (!map.get(bundleName).includes(streamDevName)) {
262
- map.get(bundleName).push(streamDevName);
263
- }
223
+ map.get(bundleName).push(streamDevName);
264
224
  }
265
225
 
266
226
  return map;
@@ -307,7 +267,7 @@ function findMatchingRecords(deploymentLog, spec, namespace) {
307
267
  function getDeploymentLogForComponents(orgAlias, componentSpecs) {
308
268
  console.log(`Checking deployment status for ${componentSpecs.length} components...`);
309
269
 
310
- const query = `SELECT ComponentName, DeploymentStatus, DeploymentError FROM DataKitDeploymentLog ORDER BY CreatedDate DESC LIMIT 500`;
270
+ const query = `SELECT ComponentName, DeploymentStatus, DeploymentError FROM DataKitDeploymentLog ORDER BY CreatedDate DESC`;
311
271
 
312
272
  try {
313
273
  const result = execSfJson(['data', 'query', '--query', query, '--target-org', orgAlias, '--json']);
@@ -384,7 +344,7 @@ async function waitForDeploymentCompletion(orgAlias, componentSpecs, deploymentS
384
344
  console.log(`\nWaiting for deployment to complete...`);
385
345
  console.log(`Tracking ${componentSpecs.length} components`);
386
346
 
387
- const maxWaitTime = 90 * 60 * 1000; // 90 minutes — production orgs typically take 60-90 min
347
+ const maxWaitTime = 30 * 60 * 1000; // 30 minutes
388
348
  const pollInterval = 60_000; // 60 seconds
389
349
  const startTime = Date.now();
390
350
 
@@ -393,7 +353,7 @@ async function waitForDeploymentCompletion(orgAlias, componentSpecs, deploymentS
393
353
 
394
354
  while (Date.now() - startTime < maxWaitTime) {
395
355
  const whereClause = deploymentStartTime ? `WHERE CreatedDate > ${deploymentStartTime}` : '';
396
- const query = `SELECT ComponentName, DeploymentStatus, DeploymentError FROM DataKitDeploymentLog ${whereClause} ORDER BY CreatedDate DESC LIMIT 500`;
356
+ const query = `SELECT ComponentName, DeploymentStatus, DeploymentError FROM DataKitDeploymentLog ${whereClause} ORDER BY CreatedDate DESC`;
397
357
 
398
358
  let deploymentLog = [];
399
359
  try {
@@ -448,7 +408,7 @@ async function waitForDeploymentCompletion(orgAlias, componentSpecs, deploymentS
448
408
  if (pending.length > 0) {
449
409
  console.error(`Pending: ${pending.join(', ')}`);
450
410
  }
451
- throw new Error(`Deployment timed out after ${maxWaitTime / 1000 / 60} minutes — ${pending.length} component(s) still in progress`);
411
+ process.exit(1);
452
412
  }
453
413
 
454
414
  /**
@@ -460,19 +420,7 @@ function execDeployJson(deployArgs, options) {
460
420
  const allArgs = deployArgs.concat(['--json']);
461
421
  let rawOutput;
462
422
  try {
463
- if (process.platform === 'win32') {
464
- const winArgs = allArgs.map(a =>
465
- (a.includes(' ') || a.includes("'")) ? `"${a.replace(/"/g, '\\"')}"` : a
466
- );
467
- const r = spawnSync('sf.cmd', winArgs, {
468
- encoding: 'utf8', stdio: 'pipe', shell: true, windowsVerbatimArguments: true,
469
- cwd: options.cwd
470
- });
471
- if (r.error) throw r.error;
472
- rawOutput = r.stdout;
473
- } else {
474
- rawOutput = execFileSync(getSfBin(), allArgs, { encoding: 'utf8', stdio: 'pipe', cwd: options.cwd });
475
- }
423
+ rawOutput = execFileSync(getSfBin(), allArgs, { encoding: 'utf8', stdio: 'pipe', cwd: options.cwd });
476
424
  } catch (err) {
477
425
  if (err.stdout) {
478
426
  rawOutput = err.stdout;
@@ -3,7 +3,8 @@ name: consumer-goods-rtr-datacloud-export-configure
3
3
  description: "Configure a Trade Promotion Management (TPM) org's RTR (Real Time Reporting) export pipeline to push promotion measures into Data Cloud (Data 360) for Trade Promotion Effectiveness (TPE) dashboards. Use when a customer or admin wants to set up the RTR export for Data Cloud measures, configure the RTR report for TPE, or as a delegated step from consumer-goods-tpe-dashboard-configure."
4
4
  metadata:
5
5
  version: "1.0"
6
- domains: ["Consumer Goods"]
6
+ domains:
7
+ - "Consumer Goods"
7
8
  relatedSkills:
8
9
  - "consumer-goods-tpe-dashboard-configure"
9
10
  cliTools:
@@ -4,7 +4,8 @@ description: "End-to-end headless setup of Trade Promotion Effectiveness (TPE) d
4
4
  metadata:
5
5
  version: "1.0"
6
6
  minApiVersion: "67.0"
7
- domains: ["Consumer Goods"]
7
+ domains:
8
+ - "Consumer Goods"
8
9
  relatedSkills:
9
10
  - "consumer-goods-rtr-datacloud-export-configure"
10
11
  - "consumer-goods-tpe-dashboard-custom-kpi-configure"
@@ -3,7 +3,8 @@ name: consumer-goods-tpe-dashboard-custom-kpi-configure
3
3
  description: "Customize the Trade Promotion Effectiveness (TPE) Analytics dashboards' generic KPI slots (Promotion Measure 1-3, Tactic Measure 1-2) with customer-chosen KPI measure codes and display names, without touching the shipped base model. Use when a customer/admin wants to \"customize TPE dashboards\", \"change the KPIs on the Promotion/Tactic Analysis dashboard\", or \"swap in our own measure codes on the TPE dashboard\"."
4
4
  metadata:
5
5
  version: "1.0"
6
- domains: ["Consumer Goods"]
6
+ domains:
7
+ - "Consumer Goods"
7
8
  relatedSkills:
8
9
  - "consumer-goods-tpe-dashboard-configure"
9
10
  cliTools:
@@ -4,7 +4,8 @@ description: "Deploy the TPM Accruals Data Kit components specifically required
4
4
  metadata:
5
5
  version: "1.0"
6
6
  minApiVersion: "67.0"
7
- domains: ["Consumer Goods"]
7
+ domains:
8
+ - "Consumer Goods"
8
9
  relatedSkills:
9
10
  - "consumer-goods-tpe-dashboard-configure"
10
11
  cliTools:
@@ -2,6 +2,8 @@
2
2
  name: data360-schema-get
3
3
  description: "Retrieve Data Lake Object (DLO) and Data Model Object (DMO) schema information from Salesforce Data Cloud using REST APIs. Use this skill when you need to inspect DLO or DMO field definitions, data types, or metadata. Takes org alias and optional DLO/DMO name as parameters."
4
4
  metadata:
5
+ version: "1.0"
6
+ domains: ["Data 360"]
5
7
  cliTools:
6
8
  - tool: ["pip"]
7
9
  semver: ">=23.0.0"
@@ -9,8 +11,6 @@ metadata:
9
11
  semver: ">=3.10.0"
10
12
  - tool: ["sf"]
11
13
  semver: ">=2.0.0"
12
- version: "1.0"
13
- domains: ["Data 360"]
14
14
  ---
15
15
 
16
16
  # data360-schema-get Skill
@@ -54,7 +54,7 @@ Example output:
54
54
  ┌────┬───────┬──────────────────────────┬────────────────────┬───────────┐
55
55
  │ │ Alias │ Username │ Org Id │ Status │
56
56
  ├────┼───────┼──────────────────────────┼────────────────────┼───────────┤
57
- │ 🍁 │ myorg │ chandresh@afvidedemo.org │ 00DKZ00000b80NT2AY │ Connected │
57
+ │ │ myorg │ chandresh@afvidedemo.org │ 00DKZ00000b80NT2AY │ Connected │
58
58
  └────┴───────┴──────────────────────────┴────────────────────┴───────────┘
59
59
  ```
60
60
 
@@ -131,7 +131,7 @@ Suggestions for improvement.
131
131
  <details>
132
132
  <summary>Full Linter Output</summary>
133
133
 
134
- ```
134
+ ```json
135
135
  {linter-output}
136
136
  ```
137
137
 
@@ -6,6 +6,7 @@ metadata:
6
6
  domains: ["Developer Experience"]
7
7
  minApiVersion: "60.0"
8
8
  relatedSkills:
9
+ - "dx-org-snapshot-manage"
9
10
  - "dx-org-switch"
10
11
  - "platform-metadata-deploy"
11
12
  cliTools:
@@ -6,6 +6,7 @@ metadata:
6
6
  domains: ["Developer Experience"]
7
7
  relatedSkills:
8
8
  - "dx-org-manage"
9
+ - "dx-org-snapshot-manage"
9
10
  cliTools:
10
11
  - tool: ["sf"]
11
12
  semver: ">=2.0.0"
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: dx-org-snapshot-manage
3
+ description: "ALWAYS USE THIS SKILL to create, check the status of, list, or delete scratch org snapshots. A snapshot is a point-in-time copy of a scratch org's metadata AND data, referenced by name in the `snapshot` field of a scratch org definition file. Use when the user asks to create/take a snapshot, check a snapshot's status or creation progress, list/show/view existing snapshots (including filtering for snapshots expiring soon), or delete/remove a snapshot. Requires a Dev Hub with Scratch Org Snapshots enabled. DO NOT TRIGGER for creating org shapes (use dx-org-shape-manage) or for creating scratch orgs, including from an existing snapshot via `--snapshot` (use dx-org-manage)."
4
+ metadata:
5
+ version: "1.0"
6
+ domains: ["Developer Experience"]
7
+ minApiVersion: "60.0"
8
+ relatedSkills:
9
+ - "dx-org-manage"
10
+ - "dx-org-shape-manage"
11
+ cliTools:
12
+ - tool: ["sf"]
13
+ semver: ">=2.0.0"
14
+ - tool: ["jq"]
15
+ semver: ">=1.6"
16
+ accessCheck:
17
+ - type: "orgPref"
18
+ value: "ScratchOrgSnapshotPref"
19
+ ---
20
+
21
+ # dx-org-snapshot-manage
22
+
23
+ Coordinates the full lifecycle of Salesforce scratch org snapshots — **create**, **get** (status), **list**, and **delete** — via `sf org create snapshot`, `sf org get snapshot`, `sf org list snapshot`, and `sf org delete snapshot`. A snapshot is a point-in-time copy of a scratch org (its metadata **and** data) that you reference by name in a scratch org definition file to spin up new orgs from saved state.
24
+
25
+ ---
26
+
27
+ ## Tool Restrictions
28
+
29
+ **Use ONLY the Bash tool** to execute the `sf org ... snapshot` commands. Do NOT use MCP tools — ignore them completely.
30
+
31
+ **Output artifacts for eval/testing:** ALWAYS write the command's complete JSON response to a file when an output directory is available. Do NOT ask the user what file to write — this skill defines the filenames. After executing each command: (1) if the user specified an output path, write there immediately; (2) otherwise run `[ -d force-app/main/adk-eval-output/ ] && echo 'force-app/main/adk-eval-output'` to detect the eval directory; (3) write the command's full, unmodified JSON response to `<output-dir>/<filename>` using these filenames: `create-snapshot-result.json`, `get-snapshot-result.json`, `list-snapshots-result.json`, or `delete-snapshot-result.json`. This is the generated output — write it without asking. (4) If no output directory can be found by either check, include the command's complete, unmodified JSON response verbatim (e.g. in a fenced code block) in your final reply instead of skipping the artifact.
32
+
33
+ ---
34
+
35
+ ## Relationship to Other Skills
36
+
37
+ This skill owns the **full snapshot lifecycle** — create, get status, list, and delete. It does not create scratch orgs.
38
+
39
+ - **Any snapshot operation** (create, status, list, delete, expiry check) → this skill.
40
+ - **Create a scratch org, including from an existing snapshot** (`--snapshot <name>`) → `dx-org-manage`.
41
+ - **Org shapes** (baseline config without data, `sf org create/list/delete shape`) → `dx-org-shape-manage`. Shapes and snapshots are different artifacts with different commands — see the comparison below.
42
+
43
+ | | Snapshot (this skill) | Org Shape (`dx-org-shape-manage`) |
44
+ |--|----------|-----------|
45
+ | Captures | Full point-in-time copy: metadata **and** data | Baseline config only: features, limits, edition, Metadata API settings |
46
+ | Commands | `sf org create/get/list/delete snapshot` | `sf org create/list/delete shape` |
47
+ | Referenced via | `snapshot` (name) in the scratch def file | `sourceOrg` (org ID) in the scratch def file |
48
+ | Prerequisite | **Dev Hub** has Scratch Org Snapshots enabled | **Source org** has Org Shape for Scratch Orgs enabled |
49
+ | Operates against | A **Dev Hub** (`--target-dev-hub`) | The **source org** (`--target-org`) |
50
+
51
+ ---
52
+
53
+ ## Scope
54
+
55
+ - **In scope**: Creating (`sf org create snapshot`), getting status (`sf org get snapshot`), listing (`sf org list snapshot`), and deleting (`sf org delete snapshot`) scratch org snapshots
56
+ - **Out of scope**: Creating org shapes (`dx-org-shape-manage`), creating scratch orgs — including from a snapshot (`dx-org-manage`)
57
+
58
+ ---
59
+
60
+ ## Required Inputs
61
+
62
+ Infer from the user's request:
63
+
64
+ - **Operation**: create, get, list, or delete (see Workflow step 1)
65
+ - **Dev Hub**: Username or alias of the Dev Hub that owns the snapshots. Passed via `--target-dev-hub` (`-v`); optional if the `target-dev-hub` config variable is set. **All four commands** operate against a Dev Hub, never `--target-org`.
66
+ - **Source org** (create only): Scratch org ID (starts with `00D`), username, or alias to snapshot. Passed via `--source-org` (`-o`).
67
+ - **Snapshot name** (create only): A unique name for the snapshot, **max 15 characters**. Passed via `--name` (`-n`).
68
+ - **Snapshot name or ID** (get & delete only): Name, or ID (starts with `0Oo`), of the snapshot. Passed via `--snapshot` (`-s`).
69
+ - **Description** (create, optional): Documents snapshot contents.
70
+ - **Expiry threshold in days** (expiring-soon listing only): There is no CLI flag for this — it's a client-side filter on `ExpirationDate` (see Command Patterns).
71
+
72
+ ---
73
+
74
+ ## Workflow
75
+
76
+ 1. **Identify the operation** and match it to the command pattern below.
77
+ 2. **Resolve the Dev Hub** — if `--target-dev-hub` isn't provided, check the default with `sf config get target-dev-hub`. Never fabricate a placeholder Dev Hub name (e.g. `my-dev-hub`) — an unresolved hub is a hard stop; advise `sf org login web --set-default-dev-hub` instead.
78
+ 3. **For create, confirm the source org and snapshot name** — the source must be a scratch org; the name must be unique in the Dev Hub and ≤15 characters.
79
+ 4. **Execute via Bash tool** with the `--json` flag.
80
+ 5. **Report the result** (see Output Expectations and the example files).
81
+
82
+ ### Command Patterns
83
+
84
+ | Operation | User intent | Execute via Bash tool |
85
+ |-----------|-------------|------------------------|
86
+ | **Create** | Create snapshot with name only | `sf org create snapshot --source-org <orgId\|alias> --name <SnapshotName> --json` |
87
+ | **Create** | Create snapshot with description | `sf org create snapshot --source-org <orgId\|alias> --name <SnapshotName> --description "<desc>" --json` |
88
+ | **Create** | Specify Dev Hub explicitly | `sf org create snapshot --source-org <orgId\|alias> --name <SnapshotName> --target-dev-hub <devHub> --json` |
89
+ | **Get** | Check a snapshot's status/details | `sf org get snapshot --snapshot <name\|0Oo...> --json` |
90
+ | **List** | List all snapshots in the Dev Hub | `sf org list snapshot --json` |
91
+ | **List** | List snapshots expiring within N days | `sf org list snapshot --json` → filter on `ExpirationDate` with `jq` (see `references/cli_flags.md`) |
92
+ | **Delete** | Delete a snapshot (with confirm prompt) | `sf org delete snapshot --snapshot <name\|0Oo...> --json` |
93
+ | **Delete** | Delete without prompting (scripts/CI) | `sf org delete snapshot --snapshot <name\|0Oo...> --no-prompt --json` |
94
+ | **Delete** | Delete multiple/all snapshots | **First** `sf org list snapshot --json`, confirm the target names with the user, **then** run `sf org delete snapshot --snapshot <name>` once per snapshot — there is no bulk-delete command |
95
+
96
+ **Snapshot creation is asynchronous.** `create` returns a record whose `Status` is typically `InProgress` initially, with `ExpirationDate` still `null`. Poll with `sf org get snapshot` until `Status` is `Active` (verified live against a real Dev Hub — see `examples/create_success_output.json` vs `examples/get_output.json`) before using the snapshot to create scratch orgs.
97
+
98
+ ---
99
+
100
+ ## Rules / Constraints
101
+
102
+ | Constraint | Rationale |
103
+ |-----------|-----------|
104
+ | Always use `--json` flag | Provides structured output for reliable parsing and error handling |
105
+ | All commands operate against a **Dev Hub** | `--target-dev-hub` (not `--target-org`) — optional only if the `target-dev-hub` config is set |
106
+ | Dev Hub must have **Scratch Org Snapshots** enabled | Otherwise commands fail — contact Salesforce to enable it |
107
+ | Source org (create) must be a **scratch org** | Snapshots only work with scratch orgs |
108
+ | Snapshot names must be **unique** in the Dev Hub, **≤15 characters** | Longer names fail with `STRING_TOO_LONG` (verified live) |
109
+ | Creation is **asynchronous** | `create` may return before the snapshot is `Active` — poll with `sf org get snapshot` |
110
+ | **There is no update/rename/extend-expiration command.** | Verified — the CLI (and the underlying platform object) exposes only create/get/list/delete. To change a snapshot's name, description, or expiration, delete it and create a new one. |
111
+ | **There is no bulk-delete command.** | Each `sf org delete snapshot` call removes exactly one snapshot |
112
+ | **`sf org list snapshot` has no server-side filters** | Returns every visible snapshot; filter status/expiry client-side (e.g. with `jq`) |
113
+ | `delete` prompts for confirmation by default | Use `--no-prompt` (`-p`) for non-interactive/CI use |
114
+ | **Bulk/`--no-prompt` deletes require an explicit confirmation step** | Before deleting multiple or all snapshots — or any delete with `--no-prompt` — first run `sf org list snapshot --json`, echo the resolved target names back to the user, and get explicit confirmation. Deletion is irreversible. |
115
+ | Permissions affect visibility/deletion | Users see/delete only their own snapshots unless a Dev Hub admin grants View All / Modify All |
116
+
117
+ ---
118
+
119
+ ## Troubleshooting
120
+
121
+ | Issue | Resolution |
122
+ |-------|------------|
123
+ | `@salesforce/plugin-signups does not exist in the registry` | Snapshot commands live in the `signups` plugin, bundled with a normal `sf` install. This means the CLI environment is incomplete (slim/offline image) — do NOT attempt `sf plugins install` in an offline environment, it will fail and loop. Advise repairing the environment (`sf update`, or a fresh install) from a connected machine. |
124
+ | `Scratch Org Snapshots isn't enabled for your Dev Hub.` | The Dev Hub lacks the snapshot feature — contact Salesforce to enable it |
125
+ | `No snapshot found with the given name or id: <value>` (`SingleRecordQuery_NoRecords`) | Verified live on `get`/`delete` — the name/ID doesn't exist in this Dev Hub. Run `sf org list snapshot --json` to see available snapshots |
126
+ | `STRING_TOO_LONG` — "Org Snapshot Name: data value too large... (max length=15)" | Verified live — the `--name` value exceeds 15 characters. Shorten it and retry |
127
+ | Snapshot name already exists (`DuplicateValue`) | Names must be unique per Dev Hub — choose a different name |
128
+ | `Status` is `InProgress` for a while | Creation is asynchronous — keep polling `sf org get snapshot` until `Status` becomes `Active` |
129
+ | `Status` is `Error` (see the `Error` field) | Read the `Error` field, delete the failed snapshot, and recreate |
130
+ | `NotADevHubError` | The targeted org isn't a Dev Hub — point `--target-dev-hub` at an actual Dev Hub |
131
+ | No default Dev Hub org found | Provide `--target-dev-hub <alias>` or set a default with `sf config set target-dev-hub=<alias>` |
132
+
133
+ ---
134
+
135
+ ## Output Expectations
136
+
137
+ All commands return JSON when `--json` is used. `get`/`list` return the raw `OrgSnapshot` sobject record(s) — verified live, these include the sobject `attributes` wrapper plus `Id`, `SnapshotName`, `Description`, `Status` (`New`, `InProgress`, `Active`, `Error`, `Expired`, or `Deleted`), `SourceOrg`, `CreatedDate`, `LastModifiedDate`, `ExpirationDate` (`null` until `Active`), and `Error`.
138
+
139
+ - **Create** → a single snapshot record (`Status` is `InProgress` immediately after creation; `ExpirationDate` is `null`).
140
+ - **Get** → a single snapshot record — use it to poll `Status`.
141
+ - **List** → an array of snapshot records, ordered by `CreatedDate`. Empty array if none exist.
142
+ - **Delete** → `{ "id": "0Oo...", "success": true, "errors": [] }`. No result if the user declines the confirmation prompt.
143
+
144
+ See the example files below for exact response structures (captured live against a real Dev Hub, not assumed).
145
+
146
+ ---
147
+
148
+ ## Cross-Skill Integration
149
+
150
+ | Need | Delegate to |
151
+ |------|-------------|
152
+ | Create a scratch org from a snapshot | `dx-org-manage` skill (set `snapshot` to the snapshot name in the definition file, or `--snapshot <name>`) |
153
+ | Create/list/delete an org **shape** instead of a snapshot | `dx-org-shape-manage` skill |
154
+
155
+ ---
156
+
157
+ ## Reference File Index
158
+
159
+ | File | When to read |
160
+ |------|-------------|
161
+ | `references/cli_flags.md` | Detailed flag reference across create/get/list/delete, including the `jq` pipeline for filtering snapshots expiring soon |
162
+ | `references/snapshot_usage.md` | Using a snapshot name in a scratch org definition file, once it's `Active` |
163
+
164
+ ## Example Files
165
+
166
+ | File | Purpose |
167
+ |------|---------|
168
+ | `examples/create_success_output.json` | Successful snapshot creation (`Status: InProgress`) |
169
+ | `examples/create_error_output.json` | `STRING_TOO_LONG` — name over 15 characters |
170
+ | `examples/get_output.json` | Get response for an `Active` snapshot (`ExpirationDate` populated) |
171
+ | `examples/list_output.json` | List response — array of snapshot records |
172
+ | `examples/delete_output.json` | Successful delete response |
@@ -0,0 +1,16 @@
1
+ {
2
+ "status": 1,
3
+ "name": "STRING_TOO_LONG",
4
+ "message": "Org Snapshot Name: data value too large: ThisNameIsWayTooLongForSnapshot (max length=15)",
5
+ "exitCode": 1,
6
+ "context": "SnapshotCreate",
7
+ "code": "STRING_TOO_LONG",
8
+ "commandName": "SnapshotCreate",
9
+ "data": {
10
+ "message": "Org Snapshot Name: data value too large: ThisNameIsWayTooLongForSnapshot (max length=15)",
11
+ "errorCode": "STRING_TOO_LONG",
12
+ "fields": ["SnapshotName"]
13
+ },
14
+ "stack": "STRING_TOO_LONG: Org Snapshot Name: data value too large: ThisNameIsWayTooLongForSnapshot (max length=15)...",
15
+ "warnings": []
16
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "status": 0,
3
+ "result": {
4
+ "attributes": {
5
+ "type": "OrgSnapshot",
6
+ "url": "/services/data/v68.0/sobjects/OrgSnapshot/0Oo5g00000001ABCAA"
7
+ },
8
+ "Id": "0Oo5g00000001ABCAA",
9
+ "SnapshotName": "MySnapshot",
10
+ "Description": "Baseline with Package v1.2.0",
11
+ "Status": "InProgress",
12
+ "SourceOrg": "00D5g00000001XyEAI",
13
+ "CreatedDate": "2026-08-25T21:57:58.000+0000",
14
+ "LastModifiedDate": "2026-08-25T21:57:59.000+0000",
15
+ "ExpirationDate": null,
16
+ "Error": null
17
+ },
18
+ "warnings": []
19
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "status": 0,
3
+ "result": {
4
+ "id": "0Oo5g00000002DEFAA",
5
+ "success": true,
6
+ "errors": []
7
+ },
8
+ "warnings": []
9
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "status": 0,
3
+ "result": {
4
+ "attributes": {
5
+ "type": "OrgSnapshot",
6
+ "url": "/services/data/v68.0/sobjects/OrgSnapshot/0Oo5g00000001ABCAA"
7
+ },
8
+ "Id": "0Oo5g00000001ABCAA",
9
+ "SnapshotName": "MySnapshot",
10
+ "Description": "Baseline with Package v1.2.0",
11
+ "Status": "Active",
12
+ "SourceOrg": "00D5g00000001XyEAI",
13
+ "CreatedDate": "2026-08-21T22:04:47.000+0000",
14
+ "LastModifiedDate": "2026-08-21T22:06:21.000+0000",
15
+ "ExpirationDate": "2026-11-19",
16
+ "Error": null
17
+ },
18
+ "warnings": []
19
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "status": 0,
3
+ "result": [
4
+ {
5
+ "attributes": {
6
+ "type": "OrgSnapshot",
7
+ "url": "/services/data/v68.0/sobjects/OrgSnapshot/0Oo5g00000001ABCAA"
8
+ },
9
+ "Id": "0Oo5g00000001ABCAA",
10
+ "SnapshotName": "BaseSnapshot",
11
+ "Description": "QA fixture",
12
+ "Status": "Active",
13
+ "SourceOrg": "00D5g00000001XyEAI",
14
+ "CreatedDate": "2026-08-21T22:04:47.000+0000",
15
+ "LastModifiedDate": "2026-08-21T22:06:21.000+0000",
16
+ "ExpirationDate": "2026-11-19",
17
+ "Error": null
18
+ },
19
+ {
20
+ "attributes": {
21
+ "type": "OrgSnapshot",
22
+ "url": "/services/data/v68.0/sobjects/OrgSnapshot/0Oo5g00000002DEFAA"
23
+ },
24
+ "Id": "0Oo5g00000002DEFAA",
25
+ "SnapshotName": "MySnapshot",
26
+ "Description": "Baseline with Package v1.2.0",
27
+ "Status": "InProgress",
28
+ "SourceOrg": "00D5g00000001XyEAI",
29
+ "CreatedDate": "2026-08-25T21:57:58.000+0000",
30
+ "LastModifiedDate": "2026-08-25T21:57:59.000+0000",
31
+ "ExpirationDate": null,
32
+ "Error": null
33
+ }
34
+ ],
35
+ "warnings": []
36
+ }