pattern-multi-tenant

Implement tenant isolation strategies with TenantResolver and TenantContext.

Updated Mar 2, 2026
One-click install
npx skills add https://github.com/akourmaz/translate2 --skill pattern-multi-tenant
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pattern-multi-tenant
Source: https://github.com/akourmaz/translate2/tree/main/.agents/skills/pattern-multi-tenant
Command: npx skills add https://github.com/akourmaz/translate2 --skill pattern-multi-tenant

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Patterns for serving multiple clients (tenants) in a single application, with data and configuration isolation to avoid cross-tenant leakage and simplify governance.

Core Features & Use Cases

  • Tenant isolation strategies: Database per Tenant, Schema per Tenant, and Row-Level (shared schema) isolation.
  • Tenant resolution and context: determine the current tenant from subdomain, path, header, or JWT claims, and store it in a TenantContext for per-request and background processing.
  • Provisioning and administration: automatic tenant provisioning, per-tenant migrations, and admin tooling for cross-tenant operations.
  • Security and governance: enforced tenant boundaries, audit logging, and tenant-scoped configuration.

Quick Start

Choose an isolation strategy, implement a TenantResolver and TenantContext, and wire tenant-aware repositories to begin multi-tenant support.

Frequently Asked Questions about pattern-multi-tenant

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is multi-tenant isolation in SaaS applications?

Multi-tenant isolation serves multiple clients in a single application while strictly separating their data and configuration. It prevents cross-tenant data leakage and simplifies governance through enforced boundaries, audit logging, and tenant-scoped configuration.

How do I resolve the current tenant from an incoming SaaS request?

Tenant resolution determines the current tenant from subdomain, path, header, or JWT claims. The extracted identity is stored in a TenantContext, making it accessible for per-request processing and background tasks.

What are the best strategies for data isolation in a multi-tenant SaaS architecture?

The supported isolation strategies are Database per Tenant, Schema per Tenant, and Row-Level isolation using a shared schema. Choosing the right strategy depends on your scalability requirements and strictness of data separation.

Does this multi-tenancy pattern support automatic tenant provisioning and migrations?

Yes, multi-tenancy patterns include automatic tenant provisioning and per-tenant migrations. It also provides administrative tooling for secure cross-tenant operations and management.

How do I start implementing tenant-aware repositories for my SaaS app?

To begin multi-tenant support, choose an isolation strategy, implement a TenantResolver and TenantContext, and wire tenant-aware repositories to enforce database boundaries for queries.