multi-tenant-architecture

Enforce organization-based data scoping to prevent cross-tenant leakage.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/Fivents/one-id --skill multi-tenant-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: multi-tenant-architecture
Source: https://github.com/Fivents/one-id/tree/main/.claude/skills/multi-tenant-architecture
Command: npx skills add https://github.com/Fivents/one-id --skill multi-tenant-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures all operations are scoped by organizationId to prevent cross-tenant data leakage.

Core Features & Use Cases

  • Enforces organization-based data isolation across queries and mutations.
  • Provides guardrails to validate membership before data access and to avoid trusting client-provided organizationId.
  • Applies consistent Prisma patterns to scope data by organizationId in common models such as Event, Person, Membership, Totem subscriptions.

Quick Start

Configure your data access layer to always scope queries by organizationId and validate membership before access.

Frequently Asked Questions about multi-tenant-architecture

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

FAQPage Schema
How do I prevent cross-tenant data leakage in a multi-tenant Prisma application?

To prevent cross-tenant data leakage in a multi-tenant Prisma application, enforce organization-based data scoping by consistently applying organizationId to all queries and mutations. Validate membership server-side and never trust client-provided organization identifiers.

Why should I not trust client-provided organizationId for data isolation?

You should not trust client-provided organizationId for data isolation because clients can manipulate requests to access other tenants' data. Always require server-side membership validation before data access to enforce organization-based scoping and prevent cross-tenant leakage.

How do I scope Prisma queries by organizationId across all data access patterns?

Scope Prisma queries by organizationId across all data access patterns by configuring your data access layer to consistently filter common models like Event, Person, and Membership. Ensure this scope is applied and validated server-side for every operation.

What is the best way to enforce tenant data isolation in a multi-tenant architecture?

The best way to enforce tenant data isolation is through organization-based data scoping. Apply consistent Prisma patterns to scope data by organizationId, validate user membership before granting access, and ensure server-side enforcement across all queries and mutations.

Do I need membership validation before querying tenant data in Prisma?

Yes, you need membership validation before querying tenant data in Prisma to maintain secure multi-tenant architecture. Validating membership ensures users belong to the target organizationId, preventing unauthorized cross-tenant data access and enforcing strict data isolation.

When do I need organization-based data scoping for multi-tenant applications?

You need organization-based data scoping for multi-tenant applications whenever multiple organizations share the same database. It prevents cross-tenant data leakage by ensuring all Prisma queries and mutations are strictly filtered by organizationId and validated server-side.