multi-tenancy

Installation
SKILL.md

Multi-tenancy

Tenant isolation is one rule — "you only touch what belongs to an organization you are in" — that must hold in every query, every server function and every screen. This skill is about writing that rule once and about the places it is forgotten.

Analogy: an office building with several companies. The lobby is shared, each floor is private. The security model isn't a guard on every desk — it's one badge system that every door consults. The failures are never the front doors; they are the service elevator, the cleaning contractor with a master key, and the show floor left open for visitors.

Discovery (max 3 questions, only if unknown)

  1. Can one person ever belong to two organizations — a freelancer, an agency, a consultant, a founder with two companies?
  2. Who creates an organization — anyone who signs up, or only you?
  3. Is there a shared demo or sample account that strangers can enter?

Step 1 — Decide the membership model now

Model Shape Choose when
Single-org users.org_id The answer to question 1 is a certain, permanent no
Memberships memberships(user_id, org_id, role) + an active-org selection Any doubt at all
Installs
1
GitHub Stars
4
First Seen
Oct 7, 2026