SKILL-051 Teams, organizations, and multi-tenancy Locked skill

Membership model

Authorize through the membership, not the user. Its role and status are the source of truth — and never let the last owner leave.

01

What this skill helps you build

The join between a user and an organization that carries role and status — the single record every authorization check should hinge on.

The production takeaway

Authorize through the membership, not the user. Its role and status are the source of truth — and never let the last owner leave.

02

Inside this skill

The full skill expands these implementation areas with decisions, edge cases, prompts, tests, and framework-specific code.

Teams, organizations, and multi-tenancy
What this helps you build

The membership record that ties a user to an organization and carries the two facts every multi tenant app keeps asking about: what can this person do here role and are they allowe

🔒
Teams, organizations, and multi-tenancy
When to use this

Reach for an explicit membership model the moment a user can belong to more than one organization, or an organization can have more than one user — which is to say, almost every B2

🔒
Teams, organizations, and multi-tenancy
The core idea

A membership is the join between a User and an Organization , and it is the thing you authorize against — not the user, and not the org. A user is just an identity. An organization

🔒
03

Unlock the full implementation

Paid access includes the complete skill body, implementation prompt, common mistakes, production checklist, and code examples where this skill includes them.