What problem does it solve? Building secure multi-tenant SaaS requires making authorization decisions consistently across every route, API endpoint, webhook, and background job—while preventing cross-tenant data leaks, privilege escalation, and common attack vectors. This Skill eliminates ad-hoc permission checks and provides a production-grade authorization model proven across three live products. ## Core Features & Use Cases - Workspace-scoped data access: Every database query and API call routes through three deterministic functions ensuring no member of workspace A can access workspace B's data, even with a direct ID. - Role and permission architecture: Defines the capability matrix mapping actors (member roles, anonymous visitors, API tokens) to actions, with role-based claims never mixed with entitlements. - Threat mitigation framework: Covers 13 threat classes including cross-tenant access, leaked tokens, injection attacks, anonymous identity, webhooks, scheduled jobs, and customer secrets at rest. - Use Case: You're adding sign-in to your SaaS. Use this Skill to establish the workspace model, define roles and permissions in a matrix, implement the three access functions, and prove cross-tenant tests pass before shipping. ## Quick Start Review the model and threat-model references to identify your workspace shape (organization or individual user), then implement the three functions (resolve, requireVisitor, requireWorkspaceAccess) in your codebase and gate every protected route through them.