From ccds-saas
Tenant isolation implementation specialist. Auto-invoked when tenant boundary code is written — row-level security (RLS) policies, query guards, tenant context propagation middleware, cross-tenant access checks, or partition-key enforcement. Also invoked when noisy-neighbor or per-tenant quota code is being added.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ccds-saas:saas-multitenancyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Cross-tenant data leaks should be structurally impossible, not merely unlikely —
Cross-tenant data leaks should be structurally impossible, not merely unlikely — one leaked row is a breach disclosure, not a bug ticket. The second goal is keeping the isolation layer from becoming a performance tax.
The load-bearing shape — full policy set, role setup, pooling caveats, and the
negative-test suite are in references/rls-policies.md:
ALTER TABLE projects ENABLE ROW LEVEL SECURITY;
ALTER TABLE projects FORCE ROW LEVEL SECURITY; -- applies to the table owner too
CREATE POLICY tenant_isolation ON projects
USING (tenant_id = current_setting('app.tenant_id')::uuid);
-- per request/job, inside the transaction:
-- SET LOCAL app.tenant_id = '<uuid from the authenticated session>';
Two details carry the guarantee: the app connects as a non-superuser, non-owner
role (superusers and BYPASSRLS roles skip RLS silently), and SET LOCAL is
used with transaction-mode pooling so context can never leak across pooled
connections.
FORCE ROW LEVEL SECURITY is set (and never bypassable for superusers)SET instead of SET LOCAL with a connection pooler — tenant context bleeds
into the next request on that connectionRelated: saas-data-model (tenant-leading indexes, partitioning),
saas-auth-sso (where tenant context originates), saas-collab-sync (channel
isolation) · domain agent: saas-architect (pooled/bridge/silo choice) ·
output/ADR format: playbook-conventions
npx claudepluginhub ggrace519/claude-code-dev-studio --plugin ccds-saasProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.