clerk-orgs

Configure Clerk Organizations with RBAC, invitations, and Enterprise SSO.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/MichaelFrieze/riffatlas --skill clerk-orgs-michaelfrieze
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-orgs
Source: https://github.com/MichaelFrieze/riffatlas/tree/main/.agents/skills/clerk-orgs
Command: npx skills add https://github.com/MichaelFrieze/riffatlas --skill clerk-orgs-michaelfrieze

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you add Organizations to a Clerk-powered B2B SaaS so users can create teams, switch between orgs, and access the correct org-scoped data safely.

Core Features & Use Cases

  • Organization provisioning & switching: Set up organization selection/creation via OrganizationSwitcher and ensure the app loads with the active org context.
  • Org-scoped authorization (RBAC): Protect routes and UI using built-in roles and canonical System Permission slugs with has({ role }) / has({ permission }).
  • Member & invitation management: Create, list, and revoke org invitations (and gate that functionality with org membership management permissions).
  • Enterprise SSO support per org: Configure SAML/OIDC Enterprise Connections with the correct enterprise_sso strategy and access the provider via enterpriseConnection.

Quick Start

Use the clerk-orgs skill to enable Clerk Organizations in your dashboard, then wire your dashboard pages to read the current org from auth() and render an OrganizationSwitcher that requires or hides Personal Account according to your B2B vs B2C coexistence needs.

Frequently Asked Questions about clerk-orgs

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

FAQPage Schema
How do I add multi-tenant organizations with RBAC to my NextJS app?

To add multi-tenant organizations with RBAC to a NextJS app, use Clerk to enable organization provisioning, secure org switching, and route protection using has() checks with canonical role and permission slugs.

How do I protect routes in a multi-tenant B2B SaaS using Clerk?

Protect routes in a multi-tenant B2B SaaS by gating access with Clerk's has({ role }) and has({ permission }) checks, ensuring regular users face restricted access while admins manage permissions.

Can I configure Enterprise SSO for individual organizations in Clerk?

Yes, you can configure Enterprise SSO for individual organizations in Clerk by setting up SAML or OIDC Enterprise Connections using the enterprise_sso strategy and accessing the provider via enterpriseConnection.

How do I manage member invitations for scoped teams in a Clerk application?

Manage member invitations for scoped teams by creating, listing, and revoking org invitations through Clerk, gating these actions with organization membership management permissions to control access.

What is the best way to handle organization switching for B2B SaaS users?

The best way to handle organization switching for B2B SaaS users is implementing Clerk's OrganizationSwitcher, reading the active org context via auth(), and hiding Personal Account options for strict B2B scenarios.

Why does my Clerk multi-tenant app load data outside the active organization context?

Your Clerk multi-tenant app loads data outside the active organization context when membership is optional instead of required, failing to properly scope queries to the active org ID retrieved from auth().