service-omni-supervisor-users-create
Use to create N Omni-Channel supervisor users on a Salesforce org via Anonymous Apex, using the supervisor{i}.<suffix>@example.com pattern with SOQL-based…
от forcedotcom★ 1 200 звёзд на GitHub
Установить service-omni-supervisor-users-create в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
service-omni-supervisor-users-create
Create N supervisor users on a Salesforce org for the classic Omni-Channel Supervisor Configuration (OmniSupervisorConfig), which binds named user records via OmniSupervisorConfigUser. Users follow a deterministic supervisor{i}.<suffix>@example.com pattern so the coordinator can rediscover them across runs. It is the supervisor counterpart to service-omni-agent-users-create and shares its detection, password, and idempotency model; the only differences are the username/alias prefixes and the debug-log marker. Binding these users into a config (service-omni-supervisor-config-deploy) and granting them supervisor access (service-omni-supervisor-permset-assign) are separate leaves.
Inputs
Confirm once, up front:
org-alias(required, no default) — must resolve viasf org display.- Supervisor count (optional, default
1, range1..5; the coordinator typically requests 1). - Profile name (optional, default
Standard User). The coordinator overrides this to a Service Cloud profile so supervisors consume Service Cloud licenses; supervisor access itself comes from the standardContactCenterSupervisorpermission set assigned later.
Usernames and passwords are never accepted from the operator — both are generated (usernames from the org suffix, passwords via Anonymous Apex).
Preconditions and safety
- Target org authenticated via
sfCLI (My Domain URL, not.lightning.force.com), Service Cloud license present,sfCLI ≥ 2.139.6. - The executing user has
PermissionsModifyAllDataandPermissionsManagePasswordPolicies(standard on System Administrator). - Production guardrail: the detect script computes
safe_to_writeasIsSandboxORTrialExpirationDate != nullOROrganizationTypein {Developer Edition, Base Edition}, and the skill blocks with no override when it is false. CDOs, scratch orgs, and dev orgs are permitted.
Password handling (fail-closed). Passwords are set by Anonymous Apex System.setPassword (sf user password generate cannot target Apex-inserted users). The literal appears in the inline executeAnonymous debug log and, only when a debug-log TraceFlag is active for the running user, in a queryable ApexLog. The wrapper therefore fails closed before the first System.setPassword: it proves via a SOQL-filtered Tooling API query (ExpirationDate > now) that no active TraceFlag exists. If safety cannot be positively proven, it sets no password at all; the user is left ACTIVE, flagged password_status:"reset_required", and a security_warning explains why. It never deletes logs. A user whose password could not be set is kept ACTIVE and flagged for reset — never deactivated.
Run
# read-only preview (never writes)
bash scripts/detect-and-create.sh plan <org-alias> [count] [profile-name]
# detect, enforce safe_to_write, then insert only the missing supervisors
bash scripts/detect-and-create.sh run <org-alias> [count=1] [profile-name="Standard User"]
detect-and-create.sh is the canonical entry point: it re-runs detection, enforces the production guard, and only then inserts. Do not call scripts/run-create.sh directly — it is internal and does not enforce the guard.
Behavior
Detection. The detector derives an 8-char suffix from Organization.Id, resolves the profile by name, and queries User for supervisor{i}.<suffix>@example.com, splitting occupied slots into active existing_users and inactive_users.
Insertion. The Apex loads assets/create-supervisors.apex.template, substitutes __COUNT__/__PROFILE_ID__/__SUFFIX__, and inserts only the missing indexes, re-checking inside the transaction to prevent a single run from double-inserting; across concurrent runs this check is not a guarantee (both can pass their pre-query before either commits), so duplicate protection there relies on the global username-uniqueness constraint plus the DUPLICATE_USERNAME retry (see references/apex-template-notes.md). Created users get the Service Cloud feature (UserPermissionsSupportUser=true); if the profile's license does not allow it, the Apex strips the flag and retries (the permset assign will then block until the user is on a suitable license). Each created user is reported via SUPERVISOR_CREATED|<id>|<username>|<email> (no password in the marker — it is set by the separate System.setPassword submission).
Inactive occupants. An inactive user occupying a supervisor slot is not a reusable supervisor and cannot be recreated (usernames are globally unique). It is surfaced as a required manual reactivation and never counted toward the requested slots — counting it would under-provision the config.
Verification. After insertion the detector re-runs and must show missing_count == 0.
Output contract
detect-and-create.sh emits a single JSON object with status ∈ created | partial | reused | action_needed | blocked, plus detect, create (`null
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash - 02
Read - 03
Write - 04
Edit - 05
Glob - 06
Grep
Вложенные файлы
- assets/create-supervisors.apex.template
- references/apex-patterns.md
- references/apex-template-notes.md
- scripts/detect-and-create.sh
- scripts/detect-existing.sh
- scripts/run-create.sh
FAQ
Что делает скилл service-omni-supervisor-users-create?
Use to create N Omni-Channel supervisor users on a Salesforce org via Anonymous Apex, using the supervisor{i}.<suffix>@example.com pattern with SOQL-based idempotency (re-runs skip existing usernames). Passwords are set via System.setPassword and handled fail-closed: the wrapper proves no active debug TraceFlag before setting a password, and otherwise leaves the user ACTIVE and reset_required. Triggers: create supervisor users, provision supervisor accounts, scaffold supervisor personas. Do not use on production customer orgs (blocked by the safe_to_write guard), to bind supervisors to OmniSupervisorConfig (service-omni-supervisor-config-deploy), or to assign the ContactCenterSupervisor permission set (service-omni-supervisor-permset-assign).
Как установить скилл service-omni-supervisor-users-create?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл service-omni-supervisor-users-create запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…