跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 automation-sandbox-post-copy-configure

Automation Sandbox Post Copy Configure

应用一个销售力量沙盒 复制后自动化 JSON 配置 针对一个目标 Og. 对于每个条目,该技能从条目的“算法”中得出正确的工具化API sobject,通过描述性探测器验证衍生物,通过SOQL-over-REST解决Id记录,然后用“sf api请求休息”通过复合“Metata”字段处理记录。 " 附表Apex " 条目匿名 顶部 “ 系统. 附表 (. ) ” 通过`sf apex跑'(因为`CronTrigger'只读取)并通过`CronTrigger' SOQL回读来核实。 当用户要求应用,运行,执行,干跑,或预览后复制文件或后更新的配置文件(如‘后复制-配置.json')时使用. 触发短语 :\"应用后复制配置\",\"运行后复制自动化\",\"执行后更新JSON\的沙盒",\"应用后复制的沙盒刷新配置","刷新后配置沙盒"等. 在从 SOP 生成配置 JSON( 改为“ 自定义- 散装箱- 后复制- 配置- 生成” ) 或用于部署元数据 XML 时, 不要 TRIGGER .

1779 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

应用一个销售力量沙盒 复制后自动化 JSON 配置 针对一个目标 Og. 对于每个条目,该技能从条目的“算法”中得出正确的工具化API sobject,通过描述性探测器验证衍生物,通过SOQL-over-REST解决Id记录,然后用“sf api请求休息”通过复合“Metata”字段处理记录。 " 附表Apex " 条目匿名 顶部 “ 系统. 附表 (. ) ” 通过`sf apex跑'(因为`CronTrigger'只读)并通过`CronTrigger' SOQL回读验证

何时用

用户要求针对沙盒应用、运行、执行、干燥或预览复制后或更新后配置文件(例如`后复制-配置.json')。 触发短语 :\"应用后复制的配置",\"运行后复制的自动化",\"执行后更新的JSON\",\"应用后复制的沙盒"

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Automation: Sandbox Post-Copy Configure、Tool Restrictions、STOP — do this before making any API call、Per-entry procedure (the core of this skill)、Step A — Resolve the Tooling API sobject and lookup filter、Step B — Verify the candidate exists and supports Metadata writes。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 scripts/map-metadata-key.mjs、references/api_endpoints.md、scripts/classify-patch-result.mjs、references/scheduled_apex_path.md、scripts/plan-phases.mjs、references/execution_phasing.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Apply a Salesforce sandbox post-copy automation JSON config against a target org. For each entry, the skill derives the correct Tooling API sobject from the entry's `ConfigurationName`, verifies the derivation via a describe probe, resolves the record Id via SOQL-over-REST, then PATCHes the record via the compound `Metadata` field using `sf api request rest`. `ScheduledApex` entries run anonymous Apex `System.schedule(...)` via `sf apex run` (because `CronTrigger` is read-only) and verify via a `CronTrigger` SOQL read-back. Use when the user asks to apply, run, execute, dry-run, or preview a post-copy or post-refresh config file (e.g. `post-copy-config.json`) against a sandbox. Trigger phrases: \"apply post-copy config\", \"run post-copy automation\", \"execute sandbox post-refresh JSON\", \"apply sandbox refresh config\", \"configure sandbox after refresh\". DO NOT TRIGGER for generating the config JSON from an SOP (delegate to `automation-sandbox-post-copy-config-generate`), or for deploying metadata XML.

Automation: Sandbox Post-Copy ConfigureTool RestrictionsSTOP — do this before making any API callPer-entry procedure (the core of this skill)Step A — Resolve the Tooling API sobject and lookup filterStep B — Verify the candidate exists and supports Metadata writesStep C — Resolve the record Id (SOQL-over-REST)SOQL to a variable + separate jq call — avoids the most commonshell-quoting failure in this skill.Step D — GET current Metadata, mutate, PATCH backStep E — Verify the change landedStep F — Scheduled Apex (anonymous Apex route)

· allowed-tools:Bash Read Write

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
automation-sandbox-post-copy-configure
description
Apply a Salesforce sandbox post-copy automation JSON config against a target org. For each entry, the skill derives the correct Tooling API sobject from the entry's `ConfigurationName`, verifies the derivation via a describe probe, resolves the record Id via SOQL-over-REST, then PATCHes the record via the compound `Metadata` field using `sf api request rest`. `ScheduledApex` entries run anonymous Apex `System.schedule(...)` via `sf apex run` (because `CronTrigger` is read-only) and verify via a `CronTrigger` SOQL read-back. Use when the user asks to apply, run, execute, dry-run, or preview a post-copy or post-refresh config file (e.g. `post-copy-config.json`) against a sandbox. Trigger phrases: \"apply post-copy config\", \"run post-copy automation\", \"execute sandbox post-refresh JSON\", \"apply sandbox refresh config\", \"configure sandbox after refresh\". DO NOT TRIGGER for generating the config JSON from an SOP (delegate to `automation-sandbox-post-copy-config-generate`), or for deploying metadata XML.
allowed-tools
Bash Read Write实验字段,支持情况取决于客户端;字段声明本身不会授予工具权限。
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 8
  • scripts/map-metadata-key.mjs
  • references/api_endpoints.md
  • scripts/classify-patch-result.mjs
  • references/scheduled_apex_path.md
  • scripts/plan-phases.mjs
  • references/execution_phasing.md
  • scripts/resolve-target-org.mjs
  • references/rules_gotchas.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「automation-sandbox-post-copy-configure」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-588074824d7a302d-%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B2%99%E7%9B%92-%E9%82%AE%E4%BB%B6%E5%A4%8D%E5%88%B6%E9%85%8D%E7%BD%AE.html
请存为 .cursor/skills/automation-sandbox-post-copy-configure/SKILL.md 或 .claude/skills/automation-sandbox-post-copy-configure/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/forcedotcom/sf-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/forcedotcom/sf-skills' --list

npx skills add 'https://github.com/forcedotcom/sf-skills' --skill 'automation-sandbox-post-copy-configure'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: automation-sandbox-post-copy-configure description: "Apply a Salesforce sandbox post-copy automation JSON config against a target org. For each entry, the skill derives the correct Tooling API sobject from the entry's `ConfigurationName`, verifies the derivation via a describe probe, resolves the record Id via SOQL-over-REST, then PATCHes the record via the compound `Metadata` field using `sf api request rest`. `ScheduledApex` entries run anonymous Apex `System.schedule(...)` via `sf apex run` (because `CronTrigger` is read-only) and verify via a `CronTrigger` SOQL read-back. Use when the user asks to apply, run, execute, dry-run, or preview a post-copy or post-refresh config file (e.g. `post-copy-config.json`) against a sandbox. Trigger phrases: \"apply post-copy config\", \"run post-copy automation\", \"execute sandbox post-refresh JSON\", \"apply sandbox refresh config\", \"configure sandbox after refresh\". DO NOT TRIGGER for generating the config JSON from an SOP (delegate to `automation-sandbox-post-copy-config-generate`), or for deploying metadata XML." allowed-tools: Bash Read Write metadata: relatedSkills: - "automation-sandbox-post-copy-config-generate" - "dx-org-permission-set-assign" - "platform-metadata-deploy" version: "1.1" domains: ["Automation"] cliTools: - tool: ["curl"] semver: ">=7.0.0" - tool: ["jq"] semver: ">=1.6" - tool: ["node"] semver: ">=18.0.0" - tool: ["sf"] semver: ">=2.0.0" --- # Automation: Sandbox Post-Copy Configure Apply a Salesforce sandbox post-copy automation JSON config to a target org. Three canonical `ConfigurationName` values are pinned: `OutboundMessages` and `RemoteSiteSettings` take the compound-`Metadata` PATCH route (Steps A–E); `ScheduledApex` takes the anonymous-Apex route (Step F), because `CronTrigger` is read-only in the Tooling API. Any other `ConfigurationName` is derived and describe-verified. Every A–E entry — pinned or derived — must pass Step B (describe returns 200 with a `Metadata` compound field) before any PATCH is planned; Step B does not apply to `ScheduledApex`. Entries whose API cannot be verified are surfaced in the summary and skipped — never guessed at. ## Tool Restrictions **Use ONLY the Bash tool** to execute `sf` CLI commands (`sf data query --use-tooling-api`, `sf api request rest`, `sf org display`). Do NOT use MCP tools like `execute_soql` — ignore them completely; the compound `Metadata` PATCH pattern this skill requires is not available through MCP tool wrappers. If the target org alias is not explicitly named by the user, invoke `sf` commands **without** `--target-org` — the harness has already set the CLI's default target-org. Never pass `--target-org default` — `default` is not an alias and will fail with `NamedOrgNotFoundError`. SOQL-over-REST (`sf data query --use-tooling-api ...`) is treated as an API call — same OAuth session, same authorization boundary as the subsequent PATCH. No direct database / non-Salesforce SQL access. ## STOP — do this before making any API call Never call the org from memory. Before the first request: 1. Read the config JSON end-to-end from the exact path the user gave (default `./post-copy-config.json`). Every entry must have all five keys (`ConfigurationName`, `Label`, `Fields`, `IsActive`, `ExecutionOrder`). If any entry is malformed, abort and surface the file path + entry index — do **not** partially apply. **Do not invent entries.** If the file is missing, stop and ask; never fabricate a plan against synthetic labels. 2. For each distinct `ConfigurationName` in the config, run the derivation + describe-verify step (below) **before** planning any PATCH. An entry whose API cannot be verified must never appear as a planned PATCH — it is rejected up front. 3. Confirm the target org alias with the user unless they supplied one explicitly. This skill mutates a live org — writing to the wrong org (e.g., a production alias set as default) is the most expensive failure mode. If you announce "I will apply … now" without having read the config file and run the describe-verify for every distinct `ConfigurationName`, stop and do those first. --- ## Per-entry procedure (the core of this skill) The skill carries a pinned mapping for the canonical types below, and a derive-then-verify path for anything else. Follow these steps **for every entry**, in order. `Step B` (describe-verify) is mandatory regardless of whether the mapping came from the pinned table or the derive path — its HTTP status must appear in the summary. ### Step A — Resolve the Tooling API sobject and lookup filter **Pinned canonicals (authoritative — use these exactly, do NOT substitute a different sobject name):** | ConfigurationName | Tooling API sobject | Record-lookup SOQL | |-------------------|---------------------|--------------------| | `OutboundMessages` | `WorkflowOutboundMessage` | `SELECT Id, FullName FROM WorkflowOutboundMessage WHERE EntityDefinition.QualifiedApiName = ''` — then client-side pick the row whose `FullName == '.'`. SOQL cannot filter on `FullName` directly for this sobject. | | `RemoteSiteSettings` | `RemoteProxy` | `SELECT Id, SiteName FROM RemoteProxy WHERE SiteName = ''`. | | `ScheduledApex` | `CronTrigger` (read-only — Anonymous Apex route, see Step F) | See Step F — pre-flight `SELECT Id FROM CronTrigger WHERE CronJobDetail.Name = ''` gate. | For canonical entries use the pinned sobject and SOQL as-is; skip "derive". Do not invent `OutboundMessage`, `RemoteSiteSetting`, or `MasterLabel` variants — plausible-looking but wrong. Field-name resolution (overrides + case rule + existence check) is owned by `scripts/map-metadata-key.mjs`. **Non-canonical**: derive a candidate (usually singular of the Metadata API type name, sometimes prefixed); Step B rules out wrong guesses. Use the generic SOQL patterns in Step C. ### Step B — Verify the candidate exists and supports Metadata writes For each candidate, GET the describe: ```bash sf api request rest \ "/services/data/v/tooling/sobjects//describe/" ``` Accept the candidate only if **both** are true: - HTTP 200 (the sobject exists on this org's Tooling API), AND - The describe response's `fields` array contains a field named `Metadata` (compound field — this is what PATCH writes through). If no candidate passes both gates, mark the entry `API_NOT_IDENTIFIED` and skip. **Do not guess a REST path** — the wrong path 404s in the best case and updates the wrong record in the worst case. ### Step C — Resolve the record Id (SOQL-over-REST) **For pinned canonicals**: run the SOQL from the Step A table verbatim (substituting `` / ``). Do not substitute a different filter column such as `MasterLabel` — the pinned SOQL is the tested-and-correct filter for that sobject. **For non-canonical (derived) sobjects**: query the verified sobject for the record identified by the entry's `Label` (and `Fields.Object` when present): ```bash # SOQL to a variable + separate jq call — avoids the most common # shell-quoting failure in this skill. SOQL='SELECT Id, FullName FROM WHERE ' sf data query --use-tooling-api --json --query "$SOQL" \ > /tmp/entry--lookup.json ID=$(jq -r '.result.records[0].Id // empty' /tmp/entry--lookup.json) ``` Pick `` based on the queryable fields shown in the describe response from Step B. If the row contains a `FullName` field, SOQL usually rejects a direct `FullName = ...` filter — filter by whichever direct column the describe surfaces (e.g. `EntityDefinition.QualifiedApiName`, `DeveloperName`, `SiteName`) and apply the `FullName` match client-side (`jq -r '.result.records[] | select(.FullName == "

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…