Agent skill · Security

saas-multi-tenant

Design and implement multi-tenant SaaS architectures with row-level security, tenant-scoped queries, shared-schema isolation, and safe cross-tenant admin patterns in PostgreSQL and TypeScript.

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorMIT
Install
npx skills add sickn33/agentic-awesome-skills --skill saas-multi-tenant --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 13 KB
Bundled scripts: none
Path: skills/saas-multi-tenant/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# SaaS Multi-Tenant Architecture ## When to Use This Skill - The user is building a SaaS application where multiple customers share the same database - The user asks about tenant isolation, row-level security, or data leakage prevention - The user needs to scope every database query to a specific tenant without manual WHERE clauses - The user asks about shared-schema vs schema-per-tenant vs database-per-tenant tradeoffs - The user is implementing admin endpoints that must access data across tenants - The user needs to add `tenant_id` columns to an existing single-tenant application - The user asks about PostgreSQL RLS policies for tenant isolation - The user is building tenant-aware middleware in Express, Fastify, or Next.js API routes Do NOT use this skill when: - The user is building a single-user application with no shared infrastructure - The user asks about authentication only without tenant scoping (use an auth skill instead) - The user needs general database schema design without multi-tenancy requirements ## Core Workflow 1. Determine the tenancy model. Ask the user about their scale expectations and isolation requirements. For most SaaS apps under 1000 tenants, shared-sche

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Core Workflow
  3. Examples
  4. Example 1: PostgreSQL RLS Policy for Tenant Isolation
  5. Example 2: Express Middleware That Sets Tenant Context per Request
  6. Example 3: Prisma Middleware for Automatic Tenant Scoping
  7. Never Do This
  8. Edge Cases
  9. Best Practices
  10. Limitations
More from agentic-awesome-skills
All skills →
About this skill
What does the saas-multi-tenant skill do?

Design and implement multi-tenant SaaS architectures with row-level security, tenant-scoped queries, shared-schema isolation, and safe cross-tenant admin patterns in PostgreSQL and TypeScript.

How do I install it?

Run `npx skills add sickn33/agentic-awesome-skills --skill saas-multi-tenant --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going