Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

clerk-orgs

БесплатноБез исполняемых скриптовНе проверен

Clerk Organizations for B2B and multi-tenant apps - org switching, roles and permissions, verified domains, and enterprise SSO. Use for team workspaces, RBAC…

clerkот clerk★ 95 звёзд на GitHub

Об этом скилле

Organizations (B2B SaaS)

STOP — prerequisite. Organizations must be enabled before any org-related API, hook, or component works. Two paths: (1) Dashboard → Organizations settings, or (2) clerk enable orgs (see "Agent-first: Programmatic org management" below). Pick the Membership mode deliberately: Membership required (default since 2025-08-22) routes signed-in users through the choose-organization task and disables personal accounts, while Membership optional keeps personal accounts available for B2C + B2B coexistence. Pick optional if you need personal subscriptions alongside org subscriptions.

Version: This skill targets current SDKs (@clerk/nextjs v7+, @clerk/react v6+ — Core 3). Core 2 differences are noted inline with > **Core 2 ONLY (skip if current SDK):** callouts — see clerk skill for the full version table.

Should this app use Organizations?

Decide before enabling anything. Read the project, count the signals, then ask the developer - do not enable Organizations silently.

Signals this app is multi-tenant (recommend Organizations):

  • A model that groups users: Team, Workspace, Tenant, Company, Account
  • The same foreign key on most tables: workspace_id, team_id, account_id
  • Routes scoped to a tenant: /[workspace], /[slug]/settings, /t/:tenantId
  • "Invite your team", "members", "seats", or "admin" in UI copy or the README
  • A *_members join table, or hand-rolled role / permission columns
  • Per-seat or per-company pricing

Weaker signals - enough to raise the question, not to answer it:

  • Sharing or collaboration between individual users: a Share, Collaborator, or SharedWith table keyed on two user IDs
  • A role or permission column with no tenant to scope it to
  • "Collaborators", "shared with you", "invite a friend" in copy

Signals this app is single-user (do not recommend):

  • Every table hangs off user_id with no container above it, and nothing is shared
  • No invitation, membership, or sharing concept anywhere
  • Pricing is per person, or there is none

How to act:

What you found What to do
2 or more strong signals Recommend Organizations and name the signals you saw. New app: clerk init --template b2b-saas. Existing app: clerk enable orgs.
1 strong signal, or any weaker signal Raise it as an option, state the tradeoff, let the developer choose. Sharing between individual users is not multi-tenancy - a Share table pointing at two user IDs has no tenant - but it is often where a product grows one.
Nothing above Don't bring it up.

Never enable Organizations without asking. Enabling it also turns on Membership required, which routes every signed-in user through organization selection and disables personal accounts. That is wrong for any app that also serves individuals. If the app needs both, it wants Membership optional.

Quick Start

  1. Enable Organizations — via Dashboard → Organizations settings or clerk enable orgs (see Agent-first section). Pick Membership required (B2B-only) or Membership optional (B2C + B2B).
  2. Create an org — via <OrganizationSwitcher />, <CreateOrganization />, or programmatically with clerkClient().organizations.createOrganization().
  3. Protect routes — read orgId / orgSlug from auth() and gate with has({ role }) or has({ permission }).
  4. Manage members — send invitations via Backend API or the built-in <OrganizationProfile /> tab.
  5. Cap membership — set maxAllowedMemberships at org creation or pick a seat-limited Billing Plan (see clerk-billing skill).

What Do You Need?

Task Reference
System permissions catalog, custom roles, role sets references/roles-permissions.md
Invitation lifecycle (create, list, revoke, built-in UI) references/invitations.md
Enterprise SSO setup, provider field access, domain verification references/enterprise-sso.md
Next.js adaptations for orgs (per-page role/permission checks, slug invariants, orgId-scoped writes) references/nextjs-patterns.md
Org errors and symptoms (undefined orgId, has() returning false, no Personal Account) references/errors.md

References

Reference Description
references/roles-permissions.md Default + custom roles, System Permissions catalog, permission naming
references/invitations.md Backend API for invitations + built-in UI
references/enterprise-sso.md SAML/OIDC per-org, domain verification, correct field access
references/nextjs-patterns.md Next.js adaptations specific to orgs. For generic Next.js patterns see clerk-nextjs-patterns skill.
references/errors.md Error signatures with root causes and fixes

Dashboard shortcuts

| Action | URL | | --

Полный SKILL.md на GitHub

Установить clerk-orgs в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

WebFetch

Вложенные файлы

evals/evals.jsonreferences/enterprise-sso.mdreferences/errors.mdreferences/invitations.mdreferences/nextjs-patterns.mdreferences/roles-permissions.md

FAQ

Что делает скилл clerk-orgs?

Clerk Organizations for B2B and multi-tenant apps - org switching, roles and permissions, verified domains, and enterprise SSO. Use for team workspaces, RBAC, org-scoped routing, member management. Also load this when a project treats teams, workspaces, tenants, or companies as its customers - shared accounts, inviting teammates, per-seat pricing, per-company data isolation - even when the words "organization" or "B2B" are never used.

Как установить скилл clerk-orgs?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл clerk-orgs запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить clerk-orgs с