organization-best-practices

Configure multi-tenant organizations, roles, teams, and invitations using Better Auth's organization plugin.

Updated May 26, 2026
One-click install
npx skills add https://github.com/Albo-Club/albo-os --skill organization-best-practices-albo-club
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: organization-best-practices
Source: https://github.com/Albo-Club/albo-os/tree/main/.agents/skills/organization-best-practices
Command: npx skills add https://github.com/Albo-Club/albo-os --skill organization-best-practices-albo-club

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires better-auth.

What problem does it solve? Building multi-tenant B2B SaaS features—organizations, member management, invitations, roles, and access control—from scratch is complex and error-prone. This Skill provides proven patterns for implementing all of it with Better Auth's organization plugin. ## Core Features & Use Cases - Organization & Member Management: Create organizations, set active orgs, add or remove members, and assign single or multiple roles with configurable limits. - Invitations & Teams: Send invitation emails, generate shareable invite URLs, and organize members into teams with configurable limits. - RBAC & Dynamic Access Control: Check permissions, create custom roles, and enforce owner-protection and deletion safeguards. - Use Case: You are building a SaaS app where users create workspaces, invite teammates by email, and assign admin or custom roles. Use this Skill to wire up the organization plugin, invitation emails, and permission checks correctly. ## Quick Start Set up the Better Auth organization plugin with invitation emails, custom roles, and teams for my multi-tenant app.

Frequently Asked Questions about organization-best-practices

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

FAQPage Schema
How do I set up organizations with Better Auth?

Add the organization() plugin to your Better Auth server config and organizationClient() to the client config, then run the Better Auth CLI migrate command to create the organization, member, and invitation tables in your database.

How do I send organization invitation emails in Better Auth?

Configure the sendInvitationEmail callback in the organization plugin options, which receives the email, organization, inviter, and invitation data. Call your email provider inside it with an acceptance link containing the invitation ID.

Can I create custom roles and permissions in Better Auth organizations?

Yes, enable dynamicAccessControl in the organization plugin, then use createRole with a permission object mapping resources to actions. Pre-defined roles like owner, admin, and member cannot be deleted, and assigned roles must be reassigned before deletion.

Why can't I remove the last owner from an organization?

Better Auth protects the last owner: they cannot be removed, leave, or lose the owner role. Transfer ownership first by updating another member's role to owner, then demote or remove the previous owner.

Does Better Auth organization plugin support teams?

Yes, enable teams in the plugin options, then use createTeam, addTeamMember, and removeTeamMember. You can configure maximumTeams, maximumMembersPerTeam, and prevent removing the last team.