Skip to content

forcedotcom/sf-skills / plugins/builder/service-itsm/skills/service-itsm-agentic-setup-agentforce-studio-configure

service-itsm-agentic-setup-agentforce-studio-configure

Unverified

Enable the Agentforce for IT Service Salesforce Go feature toggles (Agentforce Studio, Einstein Generative AI, the parent umbrella, and the Fulfiller/Employee agent templates) using the Salesforce CLI (sf). Turns ON org prefs via the Setup Discovery feature/{apiName}/enable Connect API route. Write-capable, idempotent, dependency-ordered, confirm-to-write required. Use when asked to enable Agentforce Studio, turn on Agentforce for IT Service, enable Einstein generative AI, or configure the org-level Agentforce for IT Service prerequisites. Triggers: enable agentforce studio, turn on agentforce for it service, enable einstein generative ai, configure agentforce org prefs. DO NOT TRIGGER: read-only prerequisite check (service-itsm-agentic-setup-agentforce-studio-validate), create/activate an agent (service-itsm-agentic-setup-fulfiller-agent-configure), or assigning permission sets.

FileKindSize
SKILL.mdskill md22.7 KB
references/cli-invocation.mdmarkdown14.9 KB
scripts/classify-enable-plan.mjsexecutablescript10.6 KB
scripts/classify-final-report.mjsexecutablescript4.5 KB
scripts/record-enable-result.mjsexecutablescript2.8 KB

scripts/record-enable-result.mjs

View on GitHub
#!/usr/bin/env node
// Deterministic per-toggle enable-result recorder (authoring standard A9).
//
// Classifying a single `/enable` POST response as ENABLED vs FAILED, and
// accumulating that into a running results file across the enable loop, is a
// fixed decision — it must not be left to the model to eyeball each response
// in prose across a variable-length loop.
//
// Usage:
//   node record-enable-result.mjs <response.json> <apiName> <results.json>
//
// <response.json> is a FILE PATH to the raw stdout captured from a single:
//   sf api request rest ".../feature/<apiName>/enable" --method POST --body '{}' --target-org <alias>
// <results.json> is a FILE PATH this script reads (if present) and rewrites —
// an accumulator object keyed by apiName, so it can be called once per
// toggle, immediately after each individual (still-visible) Bash enable call.
//
// Prints the updated accumulator object to stdout on success. Exit code is
// always 0 on usable args — a failed enable is a recorded FAILED result, not
// a script failure.

import { readFileSync, writeFileSync, existsSync } from 'node:fs';

const [responsePath, apiName, resultsPath] = process.argv.slice(2);
if (!responsePath || !apiName || !resultsPath) {
  process.stderr.write('usage: node record-enable-result.mjs <response.json> <apiName> <results.json>\n');
  process.exit(2);
}

function readJson(path) {
  try {
    const text = readFileSync(path, 'utf8').trim();
    if (!text) return { ok: false, empty: true };
    return { ok: true, data: JSON.parse(text) };
  } catch {
    return { ok: false, empty: false };
  }
}

function asErrorArray(data) {
  if (Array.isArray(data)) return data.filter((e) => e && (e.errorCode || e.message));
  if (data && (data.errorCode || data.message)) return [data];
  return [];
}

function errorSnippet(errs) {
  return errs.map((e) => `${e.errorCode ?? 'ERROR'}: ${e.message ?? ''}`.trim()).join(' | ').slice(0, 500);
}

const res = readJson(responsePath);
let entry;
if (!res.ok) {
  entry = { status: 'FAILED', reason: res.empty ? 'Enable call produced an empty body.' : 'Enable call produced a non-JSON body.' };
} else {
  const errs = asErrorArray(res.data);
  if (errs.length) {
    entry = { status: 'FAILED', reason: errorSnippet(errs) };
  } else if (res.data?.success === true) {
    entry = { status: 'ENABLED', reason: null };
  } else {
    entry = { status: 'FAILED', reason: `Unexpected response shape (no success:true, no error body): ${JSON.stringify(res.data).slice(0, 500)}` };
  }
}

let results = {};
if (existsSync(resultsPath)) {
  const existing = readJson(resultsPath);
  if (existing.ok && existing.data && typeof existing.data === 'object') results = existing.data;
}
results[apiName] = entry;

writeFileSync(resultsPath, JSON.stringify(results, null, 2), 'utf8');
process.stdout.write(JSON.stringify(results, null, 2) + '\n');
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall