organization-best-practices

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

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/Ishaq74/atomic --skill organization-best-practices-ishaq74
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: organization-best-practices
Source: https://github.com/Ishaq74/atomic/tree/main/.github/skills/organization
Command: npx skills add https://github.com/Ishaq74/atomic --skill organization-best-practices-ishaq74

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires better-auth.

What problem does it solve? Setting up multi-tenant organization management with members, invitations, roles, and teams in a Better Auth application requires coordinating many plugin options and API calls, and mistakes can lead to broken access control or data loss. ## Core Features & Use Cases - Organization & Member Management: Create organizations, set active organizations, add or remove members, and assign single or multiple roles with configurable limits. - Invitations & Teams: Send invitation emails, generate shareable invitation URLs, and organize members into teams with configurable limits. - RBAC & Dynamic Access Control: Check permissions, create custom roles, and enforce owner-protection rules such as preventing removal of the last owner. - Use Case: You are building a SaaS app where users create workspaces, invite teammates by email, and assign custom roles like moderator with granular permissions. ## Quick Start Set up the Better Auth organization plugin with teams enabled and an invitation email flow for my 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 the Better Auth organization plugin?

Add the organization() plugin to your server config and organizationClient() to your client config, then run npx @better-auth/cli migrate. Verify the organization, member, and invitation tables exist in your database.

How do I send organization invitation emails with Better Auth?

Configure the sendInvitationEmail callback in the organization plugin options and call authClient.organization.inviteMember with the email and role. Alternatively, use getInvitationURL to generate a shareable link you deliver yourself.

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

Yes, enable dynamicAccessControl in the organization plugin, then use authClient.organization.createRole with a permission map. Pre-defined roles like owner, admin, and member cannot be deleted.

Why can't I remove a member from my organization?

The last owner cannot be removed from an organization. Transfer ownership first by updating another member's role to owner, then demote or remove the previous owner.

Does the Better Auth organization plugin support teams?

Yes, enable teams in the plugin options, then use createTeam, addTeamMember, and removeTeamMember. You can configure maximum teams per organization and maximum members per team.