saas-multi-tenant

saas-multi-tenant is a skill for Claude Code, Codex from roedyrustam/vibes-plug. It costs 52 tokens per session (2,661 once invoked), scanned A, original, MIT.

A guide to building SaaS software for multiple organizations, called tenants, while keeping each organization's data separate.

In plain words
What is it for?
Use it to design tenant-aware databases, PostgreSQL or Supabase Row Level Security, organization roles, and administrator access across tenants.
Why use it?
It reduces the risk of one organization's users seeing or changing another organization's data and explains different isolation approaches.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design tenant-aware databases, PostgreSQL or Supabase Row Level Security, organization roles, and administrator access across tenants.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/saas-multi-tenant
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 roedyrustam/vibes-plug --skill saas-multi-tenant
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Claude Code, Codex.

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 saas-multi-tenant

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/saas-multi-tenant/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/saas-multi-tenant)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/saas-multi-tenant"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/saas-multi-tenant/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for saas-multi-tenant

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/saas-multi-tenant"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/saas-multi-tenant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,661 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.00052 $0.02661
Opus 5 $0.00026 $0.01331
Sonnet 5 $0.00010 $0.00532
Haiku 4.5 $0.00005 $0.00266

Measured 6d ago against content hash 51b8a90414a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

saas-multi-tenant 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 6d 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.

skills/saas-multi-tenant/SKILL.md · 258 lines

How it starts

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

SaaS Multi-Tenant Expert (2026 Edition)

English | Bahasa Indonesia


English

Orchestration & Integration

Connects and orchestrates with relevant domain skills like brainstorming, zero-to-prod-orchestrator, and project-context-mapper to ensure cohesive execution.

Description

Expert guide for designing and implementing multi-tenant SaaS architectures with full tenant isolation, Supabase/PostgreSQL Row Level Security (RLS), schema-per-org patterns, RBAC, and Super Admin access controls.

Trigger Conditions

  • Building a SaaS application that serves multiple organizations (workspaces/tenants).
  • Implementing Row Level Security (RLS) policies in Supabase or PostgreSQL.
  • Designing a data model that isolates tenant data securely.
  • Implementing role-based access control (RBAC) within a tenant.
  • Building the Super Admin management panel for cross-tenant operations.
  • Choosing between shared schema vs. schema-per-org isolation strategies.

Tenant Isolation Strategies

Strategy Isolation Level Cost Complexity Best For
Shared Schema + RLS Row-level Low Medium Standard SaaS (< 1M tenants)
Schema per Org Table-level Medium High Compliance-heavy (HIPAA, finance)
DB per Org Database-level High Very High Enterprise, regulated industries

Strategy 1: Shared Schema + RLS (Recommended for Most SaaS)

Core Schema Design
-- Central workspaces (tenants) table
CREATE TABLE workspaces (
    id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    name        TEXT NOT NULL,
    slug        TEXT UNIQUE NOT NULL,
    plan        TEXT NOT NULL DEFAULT 'free' CHECK (plan IN ('free', 'pro', 'enterprise')),
    created_at  TIMESTAMPTZ NOT NULL DEFAULT now()
);

-- Users belong to multiple workspaces via memberships
CREATE TABLE workspace_members (
    workspace_id    UUID REFERENCES workspaces(id) ON DELETE CASCADE,
    user_id         UUID REFERENCES auth.users(id) ON DELETE CASCADE,
    role            TEXT NOT NULL DEFAULT 'member' CHECK (role IN ('owner', 'admin', 'member', 'viewer')),
    created_at      TIMESTAMPTZ NOT NULL DEFAULT now(),
    PRIMARY KEY (workspace_id, user_id)
);

-- All tenant data has workspace_id
CREATE TABLE projects (
    id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    workspace_id    UUID NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE,
    name            TEXT NOT NULL,
    created_by      UUID REFERENCES auth.users(id),
    created_at      TIMESTAMPTZ NOT NULL DEFAULT now()
);

Read the full file on GitHub · 258 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. 6d ago First seen · 258 lines · 52 tokens per session scan A 51b8a90414a7

Subscribe to this mod's changes

saas-multi-tenant is a skill published in the GitHub repository roedyrustam/vibes-plug (50 stars, last pushed 2d ago), licensed MIT. It adds 52 tokens to every session and 2,661 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

drizzle-orm

Expert knowledge for Drizzle ORM - the lightweight, type-safe SQL ORM for edge and serverlessUse when "drizzle, drizzle orm, drizzle-kit, drizzle schema, drizzle migration, drizzle relations, sql orm typescript, edge database, d1 database, orm, database, typescript, sql, edge, serverless, d1, postgres, mysql, sqlite"…

omer-metin/skills-for-antigravity · 82 tokens

postgres-patterns

PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.

Jamkris/everything-gemini-code · 28 tokens

postgresql-development-cloudbase

Use when building, debugging, or evaluating CloudBase PostgreSQL / CloudBase PG / PG mode apps, including Postgres schema setup, queryPgDatabase/managePgDatabase, JS SDK v3 app.rdb() CRUD/RPC, PG HTTP API fallback, RLS-style permissions, username-password auth, and Web CMS/admin CRUD flows backed by CloudBase PG.

sutchan/Agent-Skills-Hub · 77 tokens

database-migrations

Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate).

majiang213/OpenClaw-MAS · 56 tokens

postgres-patterns

PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.

majiang213/OpenClaw-MAS · 28 tokens

postgres-patterns

PostgreSQL database patterns for query optimization, schema design, indexing, and security. Quick reference for common patterns, index types, data types, and anti-pattern detection. Based on Supabase best practices.

affaan-m/ECC · 45 tokens