Prompt Improver
severity1/claude-code-prompt-improver
This skill enriches vague prompts with targeted research and clarification before execution.
Deploy the deterministic half of Einstein Pre-Work Brief on Field Service Mobile to a target org — prompt template, Lightning Data Service, licenses and permission sets, the Work Order layout field…
$ npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install forcedotcom/sf-skills field-service-prework-brief-deployer-configure --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/field-service-prework-brief-deployer-configure .claude/skills/field-service-prework-brief-deployer-configure && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "field-service-prework-brief-deployer-configure" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/field-service-prework-brief-deployer-configure into .claude/skills/field-service-prework-brief-deployer-configure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "field-service-prework-brief-deployer-configure", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/forcedotcom/sf-skills/tree/main/skills/field-service-prework-brief-deployer-configureType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install forcedotcom/sf-skills field-service-prework-brief-deployer-configure --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/field-service-prework-brief-deployer-configure .agents/skills/field-service-prework-brief-deployer-configure && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "field-service-prework-brief-deployer-configure" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/field-service-prework-brief-deployer-configure into .agents/skills/field-service-prework-brief-deployer-configure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "field-service-prework-brief-deployer-configure", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install forcedotcom/sf-skills field-service-prework-brief-deployer-configure --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/field-service-prework-brief-deployer-configure .cursor/skills/field-service-prework-brief-deployer-configure && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "field-service-prework-brief-deployer-configure" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/field-service-prework-brief-deployer-configure into .cursor/skills/field-service-prework-brief-deployer-configure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "field-service-prework-brief-deployer-configure", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/forcedotcom/sf-skills.git --path skills/field-service-prework-brief-deployer-configure--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install forcedotcom/sf-skills field-service-prework-brief-deployer-configure --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/field-service-prework-brief-deployer-configure .gemini/skills/field-service-prework-brief-deployer-configure && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "field-service-prework-brief-deployer-configure" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/field-service-prework-brief-deployer-configure into .gemini/skills/field-service-prework-brief-deployer-configure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "field-service-prework-brief-deployer-configure", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install forcedotcom/sf-skills field-service-prework-brief-deployer-configureInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/field-service-prework-brief-deployer-configure .github/skills/field-service-prework-brief-deployer-configure && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "field-service-prework-brief-deployer-configure" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/field-service-prework-brief-deployer-configure into .github/skills/field-service-prework-brief-deployer-configure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "field-service-prework-brief-deployer-configure", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install forcedotcom/sf-skills field-service-prework-brief-deployer-configure --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/field-service-prework-brief-deployer-configure .opencode/skills/field-service-prework-brief-deployer-configure && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "field-service-prework-brief-deployer-configure" agent skill from https://github.com/forcedotcom/sf-skills/tree/main/skills/field-service-prework-brief-deployer-configure into .opencode/skills/field-service-prework-brief-deployer-configure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "field-service-prework-brief-deployer-configure", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
field-service-prework-brief-deployer-configureDeploy the deterministic half of Einstein Pre-Work Brief on Field Service Mobile to a target org — prompt template, Lightning Data Service, licenses and permission sets, the Work Order layout field…
Field Service Prework Brief Deployer Configure is an agent skill from forcedotcom/sf-skills. Deploy the deterministic half of Einstein Pre-Work Brief on Field Service Mobile to a target org — prompt template, Lightning Data Service, licenses and permission sets, the Work Order layout field, and a scheduled test Work Order. Use this skill when a user asks to deploy, set up, enable, or configure Einstein Pre-Work Brief on Field Service Mobile.
Its SKILL.md is about 12k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Prompt engineering. The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 4bbae5c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
sfFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Field Service Prework Brief Deployer Configure loads about 12k tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 4,029 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from forcedotcom/sf-skills at commit 4bbae5c, republished under its Apache-2.0 licence (© forcedotcom). 4,029 words, ~11,719 tokens.
.claude/skills/field-service-prework-brief-deployer-configure/SKILL.md (or your agent's skills folder).Deploy the deterministic half of Einstein Pre-Work Brief on Field Service Mobile to a target org via dispatch — prompt template, Lightning Data Service, licenses and permission sets, the Work Order layout field, and a scheduled test Work Order.
Deploy the deterministic half of Einstein Pre-Work Brief on Field Service Mobile via dispatch.
This skill takes an org whose Einstein for Field Service add-on is already provisioned and performs every automatable step to stand up Pre-Work Brief: it deploys three metadata artifacts, assigns licenses and permission sets, exposes the Work Order field on the technician's layout, wires a test Work Order scheduled in today's window, and activates the prompt template via the Connect API. The workflow is fully automatable end-to-end — there are no irreducibly manual steps. On-device rendering verification (confirming grounding produces job-specific content) is owned by the coordinating Pre-Work Brief skill, not this deploy primitive.
This skill is the judgment-free deploy primitive. Org diagnosis / routing (STOP if unprovisioned), technician selection, and the fresh-vs-existing test-data decision are resolved by the coordinating skill and passed in as inputs / a choice point.
einstein_gpt__fieldServicePreWorkBrief GenAiPromptTemplate (Pre_Work_Brief) as Published.lsdkForFieldServiceMobilePref org preference; without LDS the brief renders blank on mobile).PreWorkBrief_Field_Access and exposes WorkOrder.PreWorkBriefPromptTemplate on the technician's layout with FLS.ServiceResource.fresh (create a clean test Work Order chain) or existing (point a supplied real Work Order at the template and move its Service Appointment into today's window). Default fresh.ServiceResource.Verify provisioning → assign licenses and permission sets → verify permset assignments → detect existing template → deploy prompt template → verify template deployed → read Field Service settings → deploy LDS setting → verify LDS enabled → deploy field-access permset → read Work Order layout → add field to layout → verify field on layout → create test Work Order → create Service Appointment → assign resource → verify test Work Order scheduled → resolve template version → activate prompt template (Connect API) → verify activation.
Existing-test-WO branch — when test-data-mode is existing, skip create-test-workorder / create-service-appointment / assign-resource and run point-existing-workorder instead: update a real Work Order's PreWorkBriefPromptTemplate and move its Service Appointment into today's window.
Every step is idempotent — it checks org state before it writes, so re-running applies zero changes.
EinsteinGPTPromptTemplateManager) BEFORE deploying the prompt template. If the admin lacks it, the Pre-Work Brief template type silently vanishes from Prompt Builder and the deploy fails with no error message — just a missing dropdown option.lsdkForFieldServiceMobilePref) before on-device use or the brief renders blank on mobile.GenAiPromptTemplate is NOT SOQL/REST queryable. Detect it and resolve its 0hf-prefixed Id via the Metadata deep-read by name (type=GenAiPromptTemplate, fullName=Pre_Work_Brief), not a query.deploy-lds-setting and add-field-to-layout both write existing whole records, but differently. LDS goes through the Field Service settings controller (saveFieldServiceSettingsConfig): a per-field isChanged<Field> partial-patch whose body must be wrapped under a top-level userSettings key — {"userSettings": {"lsdkForFieldServiceMobilePref": true, "isChangedLsdkForFieldServiceMobilePref": true}}. A flat body (fields at the top level) returns 500 CONTROLLER_ERROR NullPointerException (userSettings is null). The Work Order layout is a Tooling API Layout.Metadata round-trip that IS full-replace: read the current Metadata first (a Tooling Layout GET — read-workorder-layout's describe/layouts is only for checking placement), add only the new field, and PATCH the whole object back (omitted keys reset to default). On the write, null out feedLayout and drop the ServiceReportRelatedList related list or the PATCH 400s (see the layout step's notes). This is NOT SOAP MDAPI and NOT /headless/metadata (unrouted) — it's Tooling REST over dispatch passthrough.The template deploys Published, not Active — until it is activated it does not appear in the runtime catalog and the mobile app fails with "We hit a snag." Activation IS programmatic via the Connect API (available since v65.0 / API 258):
PUT /services/data/v67.0/einstein/prompt-templates/{devName}/versions/{versionId}/status?action=activate&ignoreWarnings=false
Body: {}versionId first. GET /services/data/v67.0/einstein/prompt-templates/{devName} and read childRelationships.GenAiPromptTemplateVersions[].fields.Id.value (the 3vN-prefixed version Id). This GET works even while the template is inactive/absent from the catalog.isSuccessful:true, statusCode:"200", with an additionalData.wrappedMap.summary.overallSeverity of SAFE. The template-level IsActive flips to true and ActiveVersionId is populated (the version's own Status stays Published — "Published" at the version level is "Active" at the template level).@ConnectHidden(from=Apex); call it through dispatch (or sf api request rest --method PUT), not ConnectApi. This is why the earlier Apex ConnectApi.EinsteinLLM and Tooling/metadata attempts failed — along with a wrong URL shape (/activate rather than /versions/{id}/status?action=activate) and too-early API versions (v62–v66).verify-activation — a runtime prompt-template-catalog read (GET /einstein/prompt-templates?pageSize=200, confirm Pre_Work_Brief now appears) — is chained immediately after to confirm activation landed.Live-verified against a non-prod org 2026-07-22: IsActive False→True, ActiveVersionId null→populated, and the template appeared in the runtime catalog on the same call.
On-device verification (the technician opening the Field Service mobile app and confirming the brief renders job-specific content in the Overview tab) is out of scope for this deploy primitive and owned by the coordinating Pre-Work Brief skill. Note that verify-activation confirms the template is Active, but only on-device rendering confirms Data 360 grounding is actually producing job-specific content — a distinct check the coordinating skill is responsible for. There is no headless surface that returns what the technician sees on the device.
Authored from the sf-skills-internal coordinating skill field-service-prework-brief-configure (+ its references/ files) and Salesforce Help for Einstein Pre-Work Brief. Live-validated against a dispatcher org. The harness derives the ordered, typed SOR from this skill on each run.
─────
Runtime context (Headless 360 / agentic): When this skill runs in the Headless 360 / agentic context, prefer the dispatch tool over CLI tools (sf project deploy, sfdx, shell commands) when possible. The operations available to you are listed below in steps:; each has been verified against the live org. Use dispatch against the canonical paths. CLI fallback is acceptable only when no API path exists for a given capability.
Preconditions:
GET /services/data/v67.0/query?q=SELECT Id FROM PermissionSetLicense WHERE DeveloperName='EinsteinFieldServicePsl' returns totalSize>=1)session user is a Setup admin)org-level Einstein Pref enabled; grounding sources reachable)GET /services/data/v67.0/query?q=SELECT Id, RelatedRecordId FROM ServiceResource WHERE IsActive=true AND RelatedRecordId='<pilot-user-id>' returns totalSize=1)After every write operation, confirm the effect by re-reading state:
verify-provisioning (GET /services/data/v67.0/query)assign-perms-admin: call verify-permset-admin (GET /services/data/v67.0/query)verify-showpreworkbrief-perm: call detect-existing-template (GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName})deploy-prompt-template-header: call verify-template-deployed (GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName})deploy-lds-setting: call verify-lds-enabled (GET /headless/invoke/platform/document-builder)add-field-to-layout: call verify-field-on-layout (GET /services/data/v67.0/sobjects/WorkOrder/describe/layouts)assign-resource: call verify-workorder-scheduled (GET /services/data/v67.0/query)activate-prompt-template: call verify-activation (GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName})assign-fs-einstein-user-admin: call verify-showpreworkbrief-perm (GET /services/data/v67.0/query)Operations grouped by purpose. Use these as the building blocks for the workflows above.
| Operation | Purpose | Status | Call | Depends on |
|---|---|---|---|---|
verify-provisioning | verify | — | GET /services/data/v67.0/query | — |
assign-psl-admin | write | — | POST /services/data/v67.0/sobjects/PermissionSetLicenseAssign | verify-provisioning |
assign-perms-admin | write | — | POST /services/data/v67.0/sobjects/PermissionSetAssignment | assign-psl-admin |
verify-permset-admin | verify | — | GET /services/data/v67.0/query | assign-perms-admin |
detect-existing-template | verify | — | GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName} | verify-showpreworkbrief-perm |
deploy-prompt-template-header | write | — | PATCH /headless/invoke/platform/einstein-prompt-studio/insert-prompt-template | detect-existing-template |
verify-template-deployed | verify | — | GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName} | deploy-prompt-template-header |
read-fieldservice-settings | read | — | GET /headless/invoke/platform/document-builder | verify-template-deployed |
deploy-lds-setting | write | — | PATCH /headless/invoke/platform/document-builder-rlm/save-field-service-settings-config | read-fieldservice-settings |
verify-lds-enabled | verify | — | GET /headless/invoke/platform/document-builder | deploy-lds-setting |
deploy-field-access-permset | write | — | POST /services/data/v67.0/sobjects/PermissionSet | verify-lds-enabled |
assign-perms-technician | write | — | POST /services/data/v67.0/sobjects/PermissionSetAssignment | deploy-field-access-permset |
read-workorder-layout | read | — | GET /services/data/v67.0/sobjects/WorkOrder/describe/layouts | assign-perms-technician |
verify-field-on-layout | verify | — | GET /services/data/v67.0/sobjects/WorkOrder/describe/layouts | add-field-to-layout |
create-test-workorder | write | — | POST /services/data/v67.0/sobjects/WorkOrder | verify-field-on-layout |
create-service-appointment | write | — | POST /services/data/v67.0/sobjects/ServiceAppointment | create-test-workorder |
assign-resource | write | — | POST /services/data/v67.0/sobjects/AssignedResource | create-service-appointment |
verify-workorder-scheduled | verify | — | GET /services/data/v67.0/query | assign-resource |
point-existing-workorder | write | — | PATCH /services/data/v67.0/sobjects/WorkOrder/{Id} | verify-field-on-layout |
resolve-template-version | read | — | GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName} | verify-workorder-scheduled, point-existing-workorder |
activate-prompt-template | write | — | PUT /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName}/versions/{versionId}/status?action=activate&ignoreWarnings=false | resolve-template-version |
verify-activation | verify | — | GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName} | activate-prompt-template |
assign-fs-einstein-psl-admin | write | — | POST /services/data/v67.0/sobjects/PermissionSetLicenseAssign | verify-permset-admin |
assign-fs-einstein-user-admin | write | — | POST /services/data/v67.0/sobjects/PermissionSetAssignment | assign-fs-einstein-psl-admin |
verify-showpreworkbrief-perm | verify | — | GET /services/data/v67.0/query | assign-fs-einstein-user-admin |
add-field-to-layout | write | — | PATCH /services/data/v67.0/tooling/sobjects/Layout/{layoutId} | read-workorder-layout |
graph TD
verify_provisioning["verify-provisioning (verify)"]
assign_psl_admin["assign-psl-admin (write)"]
assign_perms_admin["assign-perms-admin (write)"]
verify_permset_admin["verify-permset-admin (verify)"]
detect_existing_template["detect-existing-template (verify)"]
deploy_prompt_template_header["deploy-prompt-template-header (write)"]
verify_template_deployed["verify-template-deployed (verify)"]
read_fieldservice_settings["read-fieldservice-settings (read)"]
deploy_lds_setting["deploy-lds-setting (write)"]
verify_lds_enabled["verify-lds-enabled (verify)"]
deploy_field_access_permset["deploy-field-access-permset (write)"]
assign_perms_technician["assign-perms-technician (write)"]
read_workorder_layout["read-workorder-layout (read)"]
verify_field_on_layout["verify-field-on-layout (verify)"]
create_test_workorder["create-test-workorder (write)"]
create_service_appointment["create-service-appointment (write)"]
assign_resource["assign-resource (write)"]
verify_workorder_scheduled["verify-workorder-scheduled (verify)"]
point_existing_workorder["point-existing-workorder (write)"]
resolve_template_version["resolve-template-version (read)"]
activate_prompt_template["activate-prompt-template (write)"]
verify_activation["verify-activation (verify)"]
assign_fs_einstein_psl_admin["assign-fs-einstein-psl-admin (write)"]
assign_fs_einstein_user_admin["assign-fs-einstein-user-admin (write)"]
verify_showpreworkbrief_perm["verify-showpreworkbrief-perm (verify)"]
add_field_to_layout["add-field-to-layout (write)"]
verify_provisioning --> assign_psl_admin
assign_psl_admin --> assign_perms_admin
assign_perms_admin --> verify_permset_admin
verify_showpreworkbrief_perm --> detect_existing_template
detect_existing_template --> deploy_prompt_template_header
deploy_prompt_template_header --> verify_template_deployed
verify_template_deployed --> read_fieldservice_settings
read_fieldservice_settings --> deploy_lds_setting
deploy_lds_setting --> verify_lds_enabled
verify_lds_enabled --> deploy_field_access_permset
deploy_field_access_permset --> assign_perms_technician
assign_perms_technician --> read_workorder_layout
add_field_to_layout --> verify_field_on_layout
verify_field_on_layout --> create_test_workorder
create_test_workorder --> create_service_appointment
create_service_appointment --> assign_resource
assign_resource --> verify_workorder_scheduled
verify_field_on_layout --> point_existing_workorder
verify_workorder_scheduled --> resolve_template_version
point_existing_workorder --> resolve_template_version
resolve_template_version --> activate_prompt_template
activate_prompt_template --> verify_activation
verify_permset_admin --> assign_fs_einstein_psl_admin
assign_fs_einstein_psl_admin --> assign_fs_einstein_user_admin
assign_fs_einstein_user_admin --> verify_showpreworkbrief_perm
read_workorder_layout --> add_field_to_layoutread-fieldservice-settingsRead the Field Service settings singleton (userSettings map — lsdkForFieldServiceMobilePref for LDS on mobile, other prefs). Result is the pre-write snapshot for deploy-lds-setting's read-back contract in verify-lds-enabled. Reused from FieldServiceSettings SOR.
Call: GET /headless/invoke/platform/document-builder
Depends on: verify-template-deployed
Output: FieldServiceSettingsSerializer map at body.body. Load-bearing key: lsdkForFieldServiceMobilePref (Lightning Data Service for Field Service Mobile — without it, Pre-Work Brief renders blank on device). This step is a snapshot for verify-lds-enabled; deploy-lds-setting does NOT consume the full map (see its inputs — the controller uses isChanged<Field> partial-patch semantics).
read-workorder-layoutEnumerate WorkOrder page layouts + record types. Result feeds add-field-to-layout / verify-field-on-layout. Response is large (~200KB).
Call: GET /services/data/v67.0/sobjects/WorkOrder/describe/layouts
Depends on: assign-perms-technician
Output: layouts[] array with layoutSections/detailLayoutSections and buttonLayoutSection; recordTypeMappings[] mapping recordTypeId -> layoutId. Scan detailLayoutSections[].layoutRows[].layoutItems[].layoutComponents[].value for the technician's layout to check whether 'PreWorkBriefPromptTemplate' is present.
resolve-template-versionExtract the 3vN-prefix version Id from the deployed Pre_Work_Brief template. Same GET as detect-existing-template / verify-template-deployed — this step re-reads under a distinct id because activation consumes the version Id specifically. Read childRelationships.GenAiPromptTemplateVersions[].fields.Id.value; pick the entry whose fields.Status.value == 'Published' (the pre-active version).
Call: GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName}
Inputs:
promptTemplateDevName (String) — Fixed 'Pre_Work_Brief' for this workflow.Depends on: verify-workorder-scheduled, point-existing-workorder
Output: childRelationships.GenAiPromptTemplateVersions[].fields.Id.value — the 3vN-prefix version Id activate-prompt-template consumes. The GET works even while the template is inactive/absent from the runtime catalog.
Notes: branch_join: Join point for both test-data branches. verify-workorder-scheduled is the fresh-branch tail; point-existing-workorder is the existing-branch tail. The two are mutex, so exactly one predecessor runs — activation fires in either mode. Treat depends_on here as an OR-join, not a barrier.
assign-psl-adminGrant the Einstein-for-Field-Service PSL to the admin user via PermissionSetLicenseAssign create. Idempotent: swallow DUPLICATE_VALUE (STATUSCODE) as already-assigned success.
Call: POST /services/data/v67.0/sobjects/PermissionSetLicenseAssign
Inputs:
AssigneeId (String) — 18-char User Id (005-prefixed).PermissionSetLicenseId (String) — 0PL-prefixed PSL Id from verify-provisioning.verify-provisioningDepends on: verify-provisioning
Rollback: DELETE /sobjects/PermissionSetLicenseAssign/{id}
Notes: idempotency: DUPLICATE_VALUE -> success (already assigned)
assign-perms-adminGrant EinsteinGPTPromptTemplateManager to the admin — this provides Prompt Studio authoring access. NOTE (corrected 2026-08-25): this permset does NOT make the Pre-Work Brief template TYPE visible; the type is gated by UserPermission ShowPreWorkBriefGA (see assign-fs-einstein-user-admin). On a full FS eval org ShowPreWorkBriefGA is ambient so this permset alone appeared sufficient, but on a fresh org it is not. Idempotent: swallow DUPLICATE_VALUE as already-assigned.
Call: POST /services/data/v67.0/sobjects/PermissionSetAssignment
Inputs:
AssigneeId (String)PermissionSetId (String) — 0PS-prefixed PermissionSet Id. Resolve via SELECT Id FROM PermissionSet WHERE Name='EinsteinGPTPromptTemplateManager'.Depends on: assign-psl-admin
Rollback: DELETE /sobjects/PermissionSetAssignment/{id}
Notes: idempotency: DUPLICATE_VALUE -> success; skill_gotcha: Skipping this before deploy-prompt-template-header produces silent failure (missing dropdown option, no error).
deploy-prompt-template-headerCreate the Pre_Work_Brief GenAiPromptTemplate (type einstein_gpt__fieldServicePreWorkBrief) in ONE insertPromptTemplate call that carries the version + WorkOrder input + Flow DataProvider inline via childRelationships. insertPromptTemplate rejects a bare header ("Prompt Template[null] has no versions"), and createPromptTemplateVersion only adds versions to an already-existing template, so header + version + input + provider are created together in a single transaction. Skipped when detect-existing-template returned 200. Adjusted-from the skill's MDAPI-deploy assumption: /headless/metadata is not routed on this dispatcher; einstein-prompt-studio is the canonical replacement.
Call: PATCH /headless/invoke/platform/einstein-prompt-studio/insert-prompt-template
Inputs:
promptTemplate (object) — Complete GenAiPromptTemplate as a single-call insert, sent as a JSON object (NOT a
serialized string). Exact nested shape (each node uses the wrapper form
{apiName, id:null, isStandard:false, isOverridable:false, additionalFields:{}, fields:{...}, childRelationships:{...}}).
apiName MUST be the node's ENTITY TYPE NAME (NOT null): 'GenAiPromptTemplate' for the top
node, then 'GenAiPromptTemplateVersion', 'GenAiPromptTemplateInput',
'GenAiPromptTemplateDataProvider', 'GenAiPromptTemplateDataProviderParam' on the nested
nodes. A null apiName throws CONTROLLER_ERROR ("Cannot invoke String.equals ...
getApiName() is null"). The Flow reference (DataProvider Definition/ReferenceName and the
version Content merge field) MUST use the fully-qualified namespaced flow name
sfdc_fieldservice__ModifyPWB — the bare FlowDefinitionView.ApiName (ModifyPWB)
fails flow-accessibility ("ModifyPWB is not accessible"):
promptTemplate.fields: DeveloperName='Pre_Work_Brief', MasterLabel='Pre-Work Brief', Type='einstein_gpt__fieldServicePreWorkBrief', Visibility='Global'
promptTemplate.childRelationships.GenAiPromptTemplateVersions[0]: .fields: Content='{!$Flow:sfdc_fieldservice__ModifyPWB.Prompt}', PrimaryModel='sfdc_ai__DefaultOpenAIGPT4OmniMini' .childRelationships.GenAiPromptTemplateInputs[0].fields: ApiName='WorkOrder' (MUST equal the template type's schema input name), ReferenceName='Input:WorkOrder', MasterLabel='Work Order', Definition='SOBJECT://WorkOrder', IsRequired=true .childRelationships.GenAiPromptTemplateDataProviders[0]: .fields: Definition='flow://sfdc_fieldservice__ModifyPWB', ReferenceName='Flow:sfdc_fieldservice__ModifyPWB' .childRelationships.GenAiPromptTemplateDataProviderParams[0].fields: Definition='SOBJECT://WorkOrder', ParameterName='WorkOrder', IsRequired=true, ValueExpression='{!$Input:WorkOrder}'
The Flow DataProvider MUST be supplied explicitly: when the configured-action gate is enabled only DataGraph providers auto-derive; Flow providers are client-managed. Prereq: the target org must have the sfdc_fieldservice__ModifyPWB flow (ProcessType=PromptFlow, active) with a WorkOrder input variable, else MissingTemplateInputs / provider validation recurs.
Depends on: detect-existing-template
Output: Created template record with 0hf-prefixed Id, DeveloperName, MasterLabel, IsActive=false, plus the inline version (LastCreatedVersionId 3vN-prefixed, LastUsedVersionNumber=1).
deploy-lds-settingEnable Lightning Data Service for Field Service Mobile via saveFieldServiceSettingsConfig. REQUEST SHAPE (load-bearing): the PATCH body MUST wrap the deltas under a top-level "userSettings" key — {"userSettings": {"lsdkForFieldServiceMobilePref": true, "isChangedLsdkForFieldServiceMobilePref": true}}. A flat body (fields at the top level) throws 500 CONTROLLER_ERROR NullPointerException ("userSettings is null"). Inside userSettings the controller uses isChanged<Field> partial-patch semantics: pass lsdkForFieldServiceMobilePref=true AND isChangedLsdkForFieldServiceMobilePref=true together — omitting the isChanged flag returns 200 with body:true but silently persists NOTHING. Send only the deltas plus their paired isChanged flags inside userSettings, NOT the whole read-back map. A 200 with body:true does NOT by itself prove persistence — always verify via read-back on getFieldServiceSettingsConfig.
Call: PATCH /headless/invoke/platform/document-builder-rlm/save-field-service-settings-config
Inputs:
lsdkForFieldServiceMobilePref (boolean) — Target value for the Lightning-SDK-for-Field-Service-Mobile org preference (true to enable). Backed by ORG_PREFERENCE_LSDK_FOR_FIELD_SERVICE_MOBILE.isChangedLsdkForFieldServiceMobilePref (boolean) — MUST be true for lsdkForFieldServiceMobilePref to be persisted. The controller's per-field isChanged<Field> gate silently skips any field whose paired flag is absent or false — a 200 response body of {body:true} does NOT confirm the value landed. Always verify via read-back on getFieldServiceSettingsConfig.Depends on: read-fieldservice-settings
Rollback: Re-PATCH with lsdkForFieldServiceMobilePref=<pre-write snapshot value> AND isChangedLsdkForFieldServiceMobilePref=true.
Notes: partial_patch_semantics: Per-field isChanged<Field> gate. 200 with body:true does not confirm the write; always read-back.
deploy-field-access-permsetCreate PermissionSet 'PreWorkBrief_Field_Access' + FieldPermissions row for WorkOrder.PreWorkBriefPromptTemplate (grant Read). Native CRUD replaces the skill's assumed MDAPI-deploy path. Idempotent: DUPLICATE_DEVELOPER_NAME on the PermissionSet insert is swallowed and existing permset is reused.
Call: POST /services/data/v67.0/sobjects/PermissionSet
Inputs:
Name (String) — 'PreWorkBrief_Field_Access'Label (String) — 'Pre-Work Brief Field Access'Depends on: verify-lds-enabled
Output: Created PermissionSet Id (0PS-prefixed); use as ParentId for the follow-up POST /sobjects/FieldPermissions with SobjectType='WorkOrder', Field='WorkOrder.PreWorkBriefPromptTemplate', PermissionsRead=true.
Rollback: DELETE /sobjects/PermissionSet/{id}
Notes: composite: Follow-up: POST /sobjects/FieldPermissions with ParentId=<permset>, SobjectType='WorkOrder', Field='WorkOrder.PreWorkBriefPromptTemplate', PermissionsRead=true.
assign-perms-technicianGrant PSL + FieldServiceMobileStandardPermSet + PreWorkBrief_Field_Access to the pilot technician. Three writes (PermissionSetLicenseAssign + two PermissionSetAssignment). Idempotent: DUPLICATE_VALUE swallowed per row.
Call: POST /services/data/v67.0/sobjects/PermissionSetAssignment
Inputs:
AssigneeId (String) — Pilot technician User Id.PermissionSetId (String) — Repeat call once per permset. PSL is granted via POST /sobjects/PermissionSetLicenseAssign with PermissionSetLicenseId.Depends on: deploy-field-access-permset
Rollback: DELETE /sobjects/PermissionSetAssignment/{id} for each row (and DELETE /sobjects/PermissionSetLicenseAssign/{id} for the PSL).
Notes: idempotency: DUPLICATE_VALUE -> success per row
create-test-workorderCreate a test WorkOrder pointed at Pre_Work_Brief via PreWorkBriefPromptTemplate. Skipped in test-data-mode=existing (point-existing-workorder branch takes over). Idempotency tag Subject with 'B4Expertise_<run_id>_create-test-workorder' for post-run cleanup.
Call: POST /services/data/v67.0/sobjects/WorkOrder
Inputs:
Subject (String) — Tag with 'B4Expertise_<run_id>_create-test-workorder' for post-run cleanup.Status (String) — e.g. 'New'PreWorkBriefPromptTemplate (String) — WorkOrder.PreWorkBriefPromptTemplate is a lookup to GenAiPromptTemplate — pass the 0hf-prefix template Id, NOT the DeveloperName. Resolve the Id from the verify-template-deployed response body (GET /einstein/prompt-templates/Pre_Work_Brief): read the top-level "id", or the "Id" value under the "fields" object. Passing DeveloperName 'Pre_Work_Brief' returns 400 INVALID_INPUT "Enter a valid Pre-Work Brief prompt template ID".Depends on: verify-field-on-layout
Rollback: DELETE /sobjects/WorkOrder/{id}
create-service-appointmentCreate the ServiceAppointment for the test WorkOrder with SchedStartTime/SchedEndTime inside today's window (so the technician can pull it up on device today).
Call: POST /services/data/v67.0/sobjects/ServiceAppointment
Inputs:
ParentRecordId (String) — WorkOrder Id from create-test-workorder.create-test-workorderSchedStartTime (String) — ISO datetime inside today's window.SchedEndTime (String)Depends on: create-test-workorder
Rollback: DELETE /sobjects/ServiceAppointment/{id}
assign-resourceCreate AssignedResource linking the pilot technician's ServiceResource to the test ServiceAppointment. Resolve ServiceResource via SELECT Id FROM ServiceResource WHERE RelatedRecordId='<pilot-user-id>' AND IsActive=true.
Call: POST /services/data/v67.0/sobjects/AssignedResource
Inputs:
ServiceAppointmentId (String)ServiceResourceId (String)Depends on: create-service-appointment
Rollback: DELETE /sobjects/AssignedResource/{id}
point-existing-workorderExisting-test-data branch: PATCH an EXISTING real WorkOrder's PreWorkBriefPromptTemplate to the Pre_Work_Brief template Id AND PATCH its ServiceAppointment's SchedStartTime/SchedEndTime into today's window. Replaces create-test-workorder -> create-service-appointment -> assign-resource when test-data-mode=existing.
Call: PATCH /services/data/v67.0/sobjects/WorkOrder/{Id}
Inputs:
Id (String) — Path — WorkOrder Id supplied by coordinating skill.PreWorkBriefPromptTemplate (String) — 0hf-prefix GenAiPromptTemplate Id (NOT DeveloperName). Resolve via verify-template-deployed's response body. DeveloperName 'Pre_Work_Brief' returns 400 INVALID_INPUT on PATCH.Depends on: verify-field-on-layout
Rollback: Snapshot prior PreWorkBriefPromptTemplate + SA SchedStart/End before PATCH; PATCH back on rollback.
Notes: composite: Follow-up: PATCH /sobjects/ServiceAppointment/{SA-Id} with SchedStartTime + SchedEndTime inside today's window.; branch: Executes only when test-data-mode=='existing'. Mutex with create-test-workorder / create-service-appointment / assign-resource.
activate-prompt-templateFlip Pre_Work_Brief from Published to Active via the einstein-gpt-connect-api version-status endpoint. Empty request body. On success the response is isSuccessful:true, statusCode:"200", additionalData.wrappedMap.summary.overallSeverity:"SAFE"; template-level IsActive flips to true and ActiveVersionId is populated (the version's own Status stays Published — "Published" at the version level is "Active" at the template level). Idempotent: re-activating an already-Active version returns 200 SAFE. Endpoint is @ConnectHidden(from=Apex) — call via dispatch / native REST, not ConnectApi.
Call: PUT /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName}/versions/{versionId}/status?action=activate&ignoreWarnings=false
Inputs:
promptTemplateDevName (String) — Path parameter. Fixed 'Pre_Work_Brief' for this workflow.versionId (String) — Path parameter. 3vN-prefix version Id from resolve-template-version.resolve-template-versionaction (String) — Query parameter. 'activate' (this step) or 'deactivate' (rollback). No default.ignoreWarnings (boolean) — Query parameter. Default false. Set true to accept a WARNING-severity safe-change evaluation and force activation anyway; leave false when you want the platform's safe-change rules to block risky activations.Depends on: resolve-template-version
Output: isSuccessful:true, statusCode:"200", errorMessages:[], hasWarning:false, warningMessages:[], templateId echoed, templateType:"einstein_gpt__fieldServicePreWorkBrief", versionId echoed, additionalData.wrappedMap.summary.overallSeverity:"SAFE" (or "WARNING"/"ERROR"). Post-write side-effects: fields.IsActive flips false→true; fields.ActiveVersionId populated with the passed versionId.
Rollback: PUT /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName}/versions/{versionId}/status?action=deactivate
Notes: empty_body: The request body is empty ({}). No fields.; apex_hidden: Endpoint is @ConnectHidden(from=Apex) — NOT callable from ConnectApi.EinsteinLLM. Call via dispatch / sf api request rest --method PUT / any native REST client.; access_check: x-sfdc.org-access-check: EinsteinGPT.orgHasEinsteinGPTEnabled — Einstein GPT must be enabled on the org.; idempotency: Re-activating an already-Active version returns 200 SAFE without error. Safe to re-run.; api_version: Available since v65.0 (API 258 onward). Earlier versions (v62-v66 partial) or the wrong URL shape (/activate rather than /versions/{id}/status?action=activate) return non-2xx.
assign-fs-einstein-psl-adminGrant the EinsteinFieldServicePsl PSL ("Einstein for Field Service") to the admin. This PSL licenses UserPermission ShowPreWorkBriefGA, the gate for the fieldServicePreWorkBrief template type. Idempotent: swallow DUPLICATE_VALUE as already-assigned success.
Call: POST /services/data/v67.0/sobjects/PermissionSetLicenseAssign
Inputs:
AssigneeId (String) — 18-char admin User Id (005-prefixed).PermissionSetLicenseId (String) — 0PL-prefixed PSL Id. Resolve via SELECT Id FROM PermissionSetLicense WHERE DeveloperName='EinsteinFieldServicePsl'.Depends on: verify-permset-admin
Rollback: DELETE /sobjects/PermissionSetLicenseAssign/{id}
Notes: idempotency: DUPLICATE_VALUE -> success (already assigned)
assign-fs-einstein-user-adminGrant the EinsteinFieldServiceUser permset (PermissionsShowPreWorkBriefGA=true) to the admin. This grants UserPermission ShowPreWorkBriefGA which makes the fieldServicePreWorkBrief template type valid in getPromptTemplateTypes / insertPromptTemplate. LOAD-BEARING: must land BEFORE deploy-prompt-template-header or the type is "not valid". Idempotent.
Call: POST /services/data/v67.0/sobjects/PermissionSetAssignment
Inputs:
AssigneeId (String)PermissionSetId (String) — 0PS-prefixed PermissionSet Id. Resolve via SELECT Id FROM PermissionSet WHERE Name='EinsteinFieldServiceUser'.Depends on: assign-fs-einstein-psl-admin
Rollback: DELETE /sobjects/PermissionSetAssignment/{id}
Notes: idempotency: DUPLICATE_VALUE -> success; skill_gotcha: Without this the deploy fails "Prompt Template Type is not valid" (silent on a full FS eval org where the perm is ambient).
add-field-to-layoutAdd WorkOrder.PreWorkBriefPromptTemplate to the technician's Work Order page layout via a Tooling API Layout.Metadata round-trip (NOT a gap — the earlier "no whole-layout write API" note was wrong for the dispatch surface; /headless/metadata is unrouted but Tooling REST passes through, and this is NOT SOAP MDAPI). Round-trip: (1) resolve the layout Id — GET /tooling/query?q=SELECT Id, Name, TableEnumOrId FROM Layout WHERE TableEnumOrId='WorkOrder' (00h-prefixed Id); (2) read full metadata — GET /tooling/sobjects/Layout/{id}, keep the Metadata object; (3) insert a layoutItem {behavior:'Edit', field:'PreWorkBriefPromptTemplate'} into a layoutSections[].layoutColumns[].layoutItems[] (e.g. the "Information" section); (4) PATCH /tooling/sobjects/Layout/{id} with {"Metadata": <full round-tripped object>} — HTTP 204 = success. A Tooling Metadata write is FULL-REPLACE, so round-trip the ENTIRE Metadata object and change only the added item. TWO write-time footguns (each makes the PATCH 400): (a) feedLayout.rightComponents[].componentType reads back as a string but the writer rejects it ("Cannot deserialize instance of complexvalue from VALUE_STRING") — set feedLayout:null for the write (resets the Chatter feed VIEW layout to default); (b) the ServiceReportRelatedList related list fails write validation ("Mass quick actions don't support ServiceReport") — drop that one relatedLists entry. Both are full-replace side effects (feed view reset; Service Reports related list removed), acceptable for surfacing the field and reversible in the Layout Editor. Field-level security is granted separately by deploy-field-access-permset (FieldPermissions) — this step is layout placement only.
Call: PATCH /services/data/v67.0/tooling/sobjects/Layout/{layoutId}
Inputs:
layoutId (String) — 00h-prefixed Layout Id. Resolve via GET /tooling/query?q=SELECT Id FROM Layout WHERE TableEnumOrId='WorkOrder'.Metadata (object) — Full Layout Metadata object round-tripped from GET /tooling/sobjects/Layout/{id}, with one added layoutItem {behavior:'Edit', field:'PreWorkBriefPromptTemplate'} in a layoutSections column. Set feedLayout:null and drop the ServiceReportRelatedList relatedLists entry (see description footguns). Full-replace semantics — omitted keys reset to default.Depends on: read-workorder-layout
Output: HTTP 204 No Content = layout updated. Confirm via verify-field-on-layout (describe/layouts scan).
Rollback: Re-PATCH /tooling/sobjects/Layout/{id} with the pre-write Metadata snapshot captured in step (2).
Notes: transport: Tooling REST via native passthrough on dispatch — NOT Metadata API SOAP. /headless/metadata remains unrouted.; full_replace: A Tooling Metadata write replaces the whole layout; round-trip the entire Metadata object, changing only the added item.; write_footguns: feedLayout must be nulled (writer rejects the round-tripped componentType string); ServiceReportRelatedList must be dropped ("Mass quick actions don't support ServiceReport"). Both are full-replace side effects.
verify-provisioningRead PermissionSetLicense for EinsteinFieldServicePsl. Zero rows means the org is unprovisioned; coordinating skill routes to STOP. Idempotent read.
Call: GET /services/data/v67.0/query
Inputs:
q (String) — SOQL: SELECT Id, DeveloperName FROM PermissionSetLicense WHERE DeveloperName='EinsteinFieldServicePsl'Output: records[0].Id = the 0PL-prefixed PSL Id used by assign-psl-admin / assign-perms-technician.
verify-permset-adminSOQL confirm the admin holds EinsteinGPTPromptTemplateManager before the prompt-template deploy. Guard against the silent-dropdown-missing failure mode.
Call: GET /services/data/v67.0/query
Inputs:
q (String) — SELECT Id FROM PermissionSetAssignment WHERE AssigneeId='<admin>' AND PermissionSet.Name='EinsteinGPTPromptTemplateManager'Depends on: assign-perms-admin
Output: totalSize>=1 -> gate cleared.
detect-existing-templateRead Pre_Work_Brief via the runtime catalog. Two roles: (1) idempotency gate — 200 with fields.DeveloperName='Pre_Work_Brief' -> skip deploy-prompt-template-header / -version; 404 -> proceed; (2) pre-activation pre-read — captures fields.IsActive + fields.ActiveVersionId. GenAiPromptTemplate is NOT SOQL/Tooling queryable; this Connect API is the canonical read path.
Call: GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName}
Inputs:
promptTemplateDevName (String) — Fixed 'Pre_Work_Brief' for this workflow.Depends on: verify-showpreworkbrief-perm
Output: fields.Id = 0hf-prefixed template Id; fields.IsActive boolean; fields.ActiveVersionId (populated when Active, else null); childRelationships.GenAiPromptTemplateVersions[].fields.Id.value = 3vN-prefix version Ids (Published even when template Inactive).
Notes: skill_gotcha: SOQL/Tooling on GenAiPromptTemplate returns INVALID_TYPE 400. This Connect API is the ONLY read path.
verify-template-deployedPost-deploy read-back on Pre_Work_Brief. Confirm fields.Id populated and childRelationships.GenAiPromptTemplateVersions carries the deployed version with Status='Published'. Same endpoint as detect-existing-template — the pre/post-deploy contract. Emits the 0hf-prefix template Id downstream steps need (create-test-workorder / point-existing-workorder read fields.Id from this response).
Call: GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName}
Inputs:
promptTemplateDevName (String)Depends on: deploy-prompt-template-header
Output: fields.Id present (0hf-prefix — downstream WorkOrder.PreWorkBriefPromptTemplate lookup consumes this); childRelationships.GenAiPromptTemplateVersions[].fields.Status == 'Published'; fields.IsActive == false pre-activation (flip happens in activate-prompt-template).
verify-lds-enabledRead-back on Field Service settings; confirm body.body.lsdkForFieldServiceMobilePref==true after the write. Same endpoint as read-fieldservice-settings — the pre/post-write contract. Required because deploy-lds-setting returns 200 whether or not its paired isChanged flag was set.
Call: GET /headless/invoke/platform/document-builder
Depends on: deploy-lds-setting
Output: body.body.lsdkForFieldServiceMobilePref == true after the write. Drift here proves deploy-lds-setting was missing the paired isChangedLsdkForFieldServiceMobilePref flag.
verify-field-on-layoutScan WorkOrder layouts describe (GET /sobjects/WorkOrder/describe/layouts) for a layoutComponent with value='PreWorkBriefPromptTemplate' in the technician's layout sections. Present -> add-field-to-layout landed; absent -> the Tooling Metadata PATCH did not take (re-check the round-trip and the two write footguns).
Call: GET /services/data/v67.0/sobjects/WorkOrder/describe/layouts
Depends on: add-field-to-layout
Output: Boolean: is PreWorkBriefPromptTemplate present on the technician's layout? If false and add-field-to-layout is unresolved, surface the layout-editor deep-link to the human instead of hard-failing.
verify-workorder-scheduledSOQL smoke: SELECT Id, SchedStartTime FROM ServiceAppointment WHERE WorkOrderId='<test-wo>' AND SchedStartTime = TODAY. Idempotency + landed-in-today's-window contract.
Call: GET /services/data/v67.0/query
Inputs:
q (String)Depends on: assign-resource
Output: totalSize==1 -> chain landed today. Zero -> SA outside today's window or missing.
verify-activationRead the runtime prompt-template catalog to confirm activation landed. Two equivalent reads — pick either. (a) Detail read GET /einstein/prompt-templates/{devName}, confirm fields.IsActive.value==true AND fields.ActiveVersionId.value is populated. (b) Catalog list GET /einstein/prompt-templates?pageSize=200, confirm promptRecords[] contains an entry with fields.DeveloperName.value=='Pre_Work_Brief' AND fields.IsActive.value==true. The catalog-list variant proves the template appears in the runtime catalog (agents / mobile clients can now see it).
Call: GET /services/data/v67.0/einstein/prompt-templates/{promptTemplateDevName}
Inputs:
promptTemplateDevName (String)Depends on: activate-prompt-template
Output: fields.IsActive.value==true AND fields.ActiveVersionId.value populated -> activation landed. Optional catalog-list fallback GET /einstein/prompt-templates?pageSize=200 -> promptRecords[?fields.DeveloperName.value=='Pre_Work_Brief'].fields.IsActive.value==true confirms runtime-catalog visibility.
verify-showpreworkbrief-permConfirm the admin effectively holds UserPermission ShowPreWorkBriefGA before the prompt-template deploy — the true gate for the fieldServicePreWorkBrief type. Guards against the "Prompt Template Type is not valid" failure.
Call: GET /services/data/v67.0/query
Inputs:
q (String) — SELECT Id FROM PermissionSetAssignment WHERE AssigneeId='<admin>' AND PermissionSet.Name='EinsteinFieldServiceUser'Depends on: assign-fs-einstein-user-admin
Output: totalSize>=1 -> gate cleared (ShowPreWorkBriefGA granted).
© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/field-service-prework-brief-deployer-configure of forcedotcom/sf-skills.
Open the folder on GitHubat commit 4bbae5c
Field Service Prework Brief Deployer Configure next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Field Service Prework Brief Deployer Configure this skillforcedotcom/sf-skills | 1.1k | — | ~12k | Automated safety check: Pass | Apache-2.0 | |
| Prompt Improverseverity1/claude-code-prompt-improver | 1.9k | 1 repos | ~1.7k | Automated safety check: Pass | MIT | |
| Prompt Engineering Patternsynulihao/AgentSkillOS | 618 | 14 repos | ~1.7k | Automated safety check: Pass | None | |
| Patch CreationPiebald-AI/tweakcc | 2.5k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit | 260 | 3 repos | ~1.4k | Automated safety check: Pass | Custom licence | |
| Codex Fable5baskduf/FableCodex | 437 | — | ~1.6k | Automated safety check: Pass | AGPL-3.0 |
severity1/claude-code-prompt-improver
This skill enriches vague prompts with targeted research and clarification before execution.
ynulihao/AgentSkillOS
Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.
Piebald-AI/tweakcc
Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.
maslennikov-ig/claude-code-orchestrator-kit
Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.
baskduf/FableCodex
Apply a Claude Fable 5 inspired operating style inside Codex.
wshobson/agents
Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.
forcedotcom/sf-skills
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.
forcedotcom/sf-skills
Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.
forcedotcom/sf-skills
Apply a Salesforce sandbox post-copy automation JSON config against a target org.
forcedotcom/sf-skills
Apply a Salesforce sandbox post-copy automation JSON config against a target org.
forcedotcom/sf-skills
Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.
forcedotcom/sf-skills
Lightning Web Components with PICKLES methodology and 165-point scoring.
Categories
Deploy the deterministic half of Einstein Pre-Work Brief on Field Service Mobile to a target org — prompt template, Lightning Data Service, licenses and permission sets, the Work Order layout field…. Field Service Prework Brief Deployer Configure is an agent skill from forcedotcom/sf-skills. Deploy the deterministic half of Einstein Pre-Work Brief on Field Service Mobile to a target org — prompt template, Lightning Data Service, licenses and permission sets, the Work Order layout field, and a scheduled test Work Order.
Field Service Prework Brief Deployer Configure fits situations like: A user asks to deploy; configure Einstein Pre-Work Brief on Field Service Mobile.
Run `npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a claude-code`. Or copy the skill folder (skills/field-service-prework-brief-deployer-configure in forcedotcom/sf-skills) into .claude/skills/field-service-prework-brief-deployer-configure in your project. Claude Code loads it when a task matches its description.
Run `npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a codex`. Or copy the skill folder (skills/field-service-prework-brief-deployer-configure in forcedotcom/sf-skills) into .agents/skills/field-service-prework-brief-deployer-configure in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill field-service-prework-brief-deployer-configure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/field-service-prework-brief-deployer-configure, .gemini/skills/field-service-prework-brief-deployer-configure, .github/skills/field-service-prework-brief-deployer-configure and .opencode/skills/field-service-prework-brief-deployer-configure in your project.
Going by SKILL.md and its folder, Field Service Prework Brief Deployer Configure needs the command-line tools its instructions call (sf).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Field Service Prework Brief Deployer Configure is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 12k tokens (SKILL.md is roughly 47k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Field Service Prework Brief Deployer Configure: Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 618 stars), Patch Creation (Piebald-AI/tweakcc, 2.5k stars) and Senior Prompt Engineer (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,067 GitHub stars. The repository holds 252 skills in this directory. The repository was last updated on October 9, 2026.
Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.