Skip to content

forcedotcom/sf-skills / plugins/builder/service-omni/skills/service-omni-queue-members-assign

service-omni-queue-members-assign

Verified

Use to bind agent users into a Salesforce Queue via GroupMember Data API POSTs, with SOQL-based idempotency (safe re-run — only inserts missing bindings). Binds either the generated demo agents (agent{1..N}.<suffix>@example.com) or an explicit list of real agents passed as usernames/User Ids. Triggers: add agents to a Case/Voice queue, assign agent users to a queue, populate queue membership for Omni routing. Do not use to create the queue (service-omni-queue-deploy), to create the agent users (service-omni-agent-users-create), or to assign permission sets (service-omni-permission-set-assign).

FileKindSize
SKILL.mdskill md6.0 KB
references/api-notes.mdmarkdown9.0 KB
scripts/tests/_bootstrap.pyscript2.3 KB
scripts/tests/test_queue_members_contracts.pyexecutablescript2.4 KB
scripts/verify-and-bind.shexecutablescript14.3 KB

scripts/tests/test_queue_members_contracts.py

View on GitHub
#!/usr/bin/env python3
"""Contract tests for service-omni-queue-members-assign/scripts/verify-and-bind.sh."""
from __future__ import annotations

import json
import subprocess
import sys
import unittest
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent))
from _bootstrap import (  # noqa: E402
    SCRIPT,
    SKILLS_ROOT,
    FakeSf,
    _FAKE_SF_ORG_QUERY_FAILS,
    run,
)


def _last_json(out: str) -> dict:
    dec = json.JSONDecoder()
    obj, i, n = None, 0, len(out)
    while i < n:
        if out[i] in "{[":
            try:
                cand, end = dec.raw_decode(out, i)
                if isinstance(cand, dict):
                    obj = cand
                i = end
                continue
            except json.JSONDecodeError:
                pass
        i += 1
    assert obj is not None, f"no JSON object found in output:\n{out}"
    return obj


class SyntaxTests(unittest.TestCase):
    def test_bash_syntax_valid(self):
        proc = subprocess.run(["bash", "-n", str(SKILLS_ROOT / SCRIPT)],
                              capture_output=True, text=True)
        self.assertEqual(proc.returncode, 0, proc.stderr)


class InputContractTests(unittest.TestCase):
    def test_missing_args_rejected(self):
        rc, out = run([], scrub_sf=True)
        self.assertEqual(rc, 1, out)
        self.assertIn("Usage", out)

    def test_injection_shaped_queue_name_rejected(self):
        rc, out = run(["org", "Bad Name; DROP"], scrub_sf=True)
        self.assertEqual(rc, 1, out)
        self.assertIn("Invalid queue_developer_name", out)


class OrgQueryFailClosedTests(unittest.TestCase):
    def test_org_query_failure_emits_blocked_json_on_stdout(self):
        # Regression (blocker 2): a failing Organization safe_to_write query used to make the command
        # substitution non-zero and `set -e` killed the script before any JSON. It must now fail closed
        # with a structured blocked result on stdout.
        with FakeSf(_FAKE_SF_ORG_QUERY_FAILS) as p:
            rc, out = run(["sandbox", "CaseQueue"], path_prefix=p)
        self.assertEqual(rc, 1, out)
        self.assertTrue(out.strip(), "expected structured JSON, got empty output")
        v = _last_json(out)
        self.assertEqual(v["status"], "blocked", out)
        self.assertIn("Organization", v["blocking_issue"], out)


if __name__ == "__main__":
    unittest.main(verbosity=2)
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall