clerk-enterprise-rbac
Skill by jeremylongshore
Configures Clerk enterprise SSO, role-based access control, and organization management. Built for developers adding multi-tenant authorization to Next.js apps that use Clerk.
Install clerk-enterprise-rbac
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/clerk-enterprise-rbac ~/.claude/skills/clerk-enterprise-rbacRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/clerk-enterprise-rbac ~/.gemini/antigravity-cli/skills/clerk-enterprise-rbacAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install clerk-enterprise-rbac in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant through setting up organizations, roles and permissions in Clerk. It covers the built-in org:admin and org:member roles, custom roles and permissions, and organization UI components such as OrganizationSwitcher and OrganizationProfile. It also shows route protection in Clerk middleware, permission checks in server and client components, and member management through the Clerk Backend API. Roles can be managed programmatically, and SAML SSO setup with verified domains is described.
The examples use @clerk/nextjs with the Next.js App Router. The skill is aimed at developers building multi-tenant SaaS apps who need role gates and enterprise sign-in. The source says Organizations and SSO require a paid Clerk plan, so it is intended for teams on those plans.
Written from the project's SKILL.md and checked against it.
What it can do
- Organization UI componentsAdds an organization switcher and profile page to a Next.js app.
- Custom roles and permissionsDefines org permissions such as org:data:read and custom roles built from them.
- Role-based route middlewareProtects routes such as /admin and /manage by organization role using clerkMiddleware.
- Server permission checksUses auth() and has() in server components to show or hide features by permission.
- Client permission checksUses the Protect component and useAuth has() to gate UI in client components.
- Member management APILists organization members and creates invitations through the Clerk Backend API.
- Programmatic role managementCreates organization permissions and roles and updates a member's role via the Backend API.
- SAML SSO setupDescribes SAML connection setup, ACS URL, Entity ID, attribute mapping, and verified domains.
What you need
- Clerk Pro or Enterprise plan
- Organizations feature enabled in Clerk Dashboard
- Next.js 14 or later with App Router
- @clerk/nextjs package
Try asking
- Protect my /admin route so only org:admin members can open it.
- Create a custom Clerk role called Report Manager with a reports permission.
- Show me how to set up a SAML SSO connection with Okta for Clerk.
Good to know
- Organizations and SSO require a paid Clerk plan.
- Roles created through the Backend API are organization-scoped, not instance-wide.
- Roles created in the Dashboard are instance-wide.
- The source describes Dashboard steps for SSO that must be completed outside the code.
Security check
B- Allowed to use Write, Edit without limitsIn
SKILL.md
Checked automatically: skills/.curated/clerk-enterprise-rbac/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: ReadWriteEditGrep
Alternatives to clerk-enterprise-rbac
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
clerk-enterprise-rbac: common questions
Does this require a paid Clerk plan?
Yes. The source says Organizations and SSO require a Clerk Pro or Enterprise plan.
Are roles checked against the database on each request?
The source says roles and permissions are embedded in the session JWT, so authorization checks need no extra network requests. Session claims include org_id, org_role, and org_permissions.
How does SSO enforcement for a company domain work?
The source says users with an email on a verified domain are forced through SSO. Verified domains with SAML SSO also enable just-in-time provisioning on first sign-in.
How do I install clerk-enterprise-rbac?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is clerk-enterprise-rbac free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is clerk-enterprise-rbac safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.
What are alternatives to clerk-enterprise-rbac?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
