domain-separation

domain-separation is a skill for Claude Code from serac-labs/serac. It costs 38 tokens per session (2,353 once invoked), scanned A, original, Apache-2.0.

A ServiceNow setup for separating one system’s data and processes between customers or business units, using a hierarchy of domains. It covers user membership, domain-aware queries, and tenant selection.

In plain words
What is it for?
Use it to create domain hierarchies, assign users to domains, onboard managed-service customers, and write queries that respect or cross domain boundaries.
Why use it?
It helps prevent users from seeing or changing records outside the domains they are allowed to access. It also provides a common structure for managing multiple customers in one ServiceNow instance.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skills plugin — 56 skills shipped together

Good fit Use it to create domain hierarchies, assign users to domains, onboard managed-service customers, and write queries that respect or cross domain boundaries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/serac-labs/serac/domain-separation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add serac-labs/serac --skill domain-separation
Clone the repo
git clone --depth 1 https://github.com/serac-labs/serac

Made for: Claude Code.

Or install skills, the plugin that ships this one along with the rest of its 56 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for domain-separation

README.md
[![agentmods](https://agentmods.dev/badge/skills/serac-labs/serac/domain-separation.svg)](https://agentmods.dev/skills/serac-labs/serac/domain-separation)
Your own site
<a href="https://agentmods.dev/skills/serac-labs/serac/domain-separation"><img src="https://agentmods.dev/badge/skills/serac-labs/serac/domain-separation.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,353 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.02353
Opus 5 $0.00019 $0.01177
Sonnet 5 $0.00008 $0.00471
Haiku 4.5 $0.00004 $0.00235

Measured 7d ago against content hash 9475dea6ce95, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

domain-separation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/skills/domain-separation/SKILL.md · 401 lines

How it starts

The opening of the file, as written. The whole thing — 401 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Domain Separation for ServiceNow

Domain Separation enables multi-tenancy by partitioning data and processes between domains.

Domain Architecture

TOP (Global)
    ├── Domain A (Customer 1)
    │   ├── Sub-domain A1
    │   └── Sub-domain A2
    └── Domain B (Customer 2)
        └── Sub-domain B1

Key Tables

Table Purpose
domain Domain definitions
sys_user_has_domain User domain membership
domain_path Domain hierarchy paths
sys_db_object Table domain settings

Domain Configuration (ES5)

Create Domain

// Create domain (ES5 ONLY!)
var domain = new GlideRecord("domain")
domain.initialize()

domain.setValue("name", "Acme Corp")
domain.setValue("description", "Domain for Acme Corporation")

// Parent domain (empty for top-level)
domain.setValue("parent", parentDomainSysId)

// Domain visibility
domain.setValue("active", true)

domain.insert()

Domain-Aware Queries

// Query respecting domain separation (ES5 ONLY!)
function getDomainAwareRecords(tableName, query) {
  var gr = new GlideRecord(tableName)

  // Domain separation is automatic when enabled
  // Records are filtered to user's visible domains

  if (query) {
    gr.addEncodedQuery(query)
  }
  gr.query()

  var records = []
  while (gr.next()) {
    records.push({
      sys_id: gr.getUniqueValue(),
      sys_domain: gr.getValue("sys_domain"),
      sys_domain_path: gr.getValue("sys_domain_path"),
    })
  }

  return records
}

Cross-Domain Access

// Access records across domains (requires elevated privileges) (ES5 ONLY!)
function getCrossdomainRecords(tableName) {
  var gr = new GlideRecord(tableName)

  // Disable domain separation for this query
  gr.setQueryReferences(false)

  // Query all domains
  gr.queryNoDomain()

  var records = []
  while (gr.next()) {
    records.push({
      sys_id: gr.getUniqueValue(),
      domain: gr.sys_domain.getDisplayValue(),
    })
  }

  return records
}

Read the full file on GitHub · 401 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 401 lines · 38 tokens per session scan A 9475dea6ce95

Subscribe to this mod's changes

domain-separation is a skill published in the GitHub repository serac-labs/serac (78 stars, last pushed 12d ago), licensed Apache-2.0. It adds 38 tokens to every session and 2,353 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

opensrc

Fetch dependency source code to give AI agents deeper implementation context. Use when the agent needs to understand how a library works internally, read source code for a package, fetch implementation details for a dependency, or explore how an npm/PyPI/crates.io package is built. Triggers include "fetch source for"…

vercel-labs/opensrc · 103 tokens

multi-tenant-architecture

Designs tenant isolation, hostname routing, custom-domain lifecycle, and plan limits on Cloudflare or Vercel. Use when asked to "isolate tenant data", "support custom domains", "build a white-label platform", or assess PSL registration. For general module structure use codebase-architecture; for SEO content use…

mblode/agent-skills · 74 tokens

technical-integrations

Hunt existing integration patterns and design vendor/framework-agnostic API, RFC, SDK, and integration plans for new external vendor integrations.

vincentkoc/dotskills · 31 tokens

axiom-network-framework-ref

Reference — Comprehensive Network.framework guide covering NetworkConnection (iOS 26+), NWConnection (iOS 12-25), TLV framing, Coder protocol, NetworkListener, NetworkBrowser, Wi-Fi Aware discovery, and migration strategies.

ComeOnOliver/skillshub · 55 tokens

axiom-networking

Use when implementing Network.framework connections, debugging connection failures, migrating from sockets/URLSession streams, or adopting structured concurrency networking patterns - prevents deprecated API usage, reachability anti-patterns, and thread-safety violations with iOS 12-26+ APIs.

ComeOnOliver/skillshub · 56 tokens

axiom-push-notifications

Use when implementing remote or local push notifications, requesting notification permission, managing APNs device tokens, adding notification actions/categories, building service extensions, or debugging push delivery failures. Covers APNs, FCM, Live Activity push transport, broadcast push, communication…

ComeOnOliver/skillshub · 62 tokens