clerk-orgs

Configure Clerk Organizations with RBAC, member management, and Next.js safety patterns for B2B tenants.

Updated May 4, 2026
One-click install
npx skills add https://github.com/Endsi3g/Uprising-AOS --skill clerk-orgs-endsi3g
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-orgs
Source: https://github.com/Endsi3g/Uprising-AOS/tree/main/.agents/skills/clerk-orgs
Command: npx skills add https://github.com/Endsi3g/Uprising-AOS --skill clerk-orgs-endsi3g

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you set up Clerk Organizations so users can work within separate teams (tenants) with correct org-scoped routing and access control.

Core Features & Use Cases

  • Multi-tenant Organization Setup: Create organizations, switch org context, and scope routes and data using orgId and orgSlug.
  • Org Role-Based Access Control (RBAC): Enforce access with has({ role }) and has({ permission }), including canonical System Permission slugs.
  • Member Lifecycle Management: Invite members, manage roles, and list/revoke invitations using Clerk APIs or built-in UI components.
  • Enterprise SSO per Organization: Configure per-org SAML/OIDC with strategy: 'enterprise_sso' and access provider metadata from the correct nested fields.
  • Next.js Org Safety Patterns: Add slug invariants and protect routes in middleware and server actions to prevent cross-org data writes.

Quick Start

Enable Organizations in the Clerk Dashboard, then implement an org-aware dashboard by reading orgId/orgSlug from auth() and gating org-specific pages using has({ role: 'org:admin' }).

Frequently Asked Questions about clerk-orgs

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

FAQPage Schema
How do I set up multi-tenant organizations in Clerk for a Next.js B2B app?

Multi-tenant Clerk Organizations allow B2B users to operate in separate team workspaces. Enable Organizations in Clerk Dashboard, read orgId from auth(), and gate Next.js routes using has({ role: 'org:admin' }) to scope data and navigation per tenant.

How does role-based access control work with Clerk Organizations?

Clerk Organization RBAC uses has({ role }) and has({ permission }) checks to enforce access. It supports canonical System Permission slugs like org:sys_* to ensure administrators can securely control access patterns within their specific organization.

Can I configure enterprise SSO for individual Clerk organizations?

Yes, enterprise SSO can be configured per-organization using strategy: 'enterprise_sso' for SAML or OIDC. Access provider metadata by reading from the correct nested fields to enable organization-specific identity provider integration.

What is the best way to prevent cross-organization data writes in Next.js?

Prevent cross-organization data writes by applying Next.js org safety patterns. Implement slug invariants and protect server actions and middleware routes using orgSlug and orgId checks to ensure data operations remain strictly scoped to the active tenant.

How do I manage member invitations and roles in a Clerk multi-tenant workspace?

Manage member lifecycles by inviting members, assigning roles, and listing or revoking invitations through Clerk APIs or built-in UI components. This requires Organizations to be enabled with a chosen membership mode to handle access correctly.

Do I need to enable a specific membership mode to use Clerk Organizations?

Yes, you must enable Organizations in the Clerk Dashboard and select a membership mode before implementation. This prerequisite allows the system to properly handle org switching, membership management, and admin-controlled access patterns.