organization-best-practices

Configure Better Auth multi-tenant organizations with roles, invitations, and teams.

885|108|Updated Apr 30, 2025
One-click install
npx skills add https://github.com/legions-developer/invoicely --skill organization-best-practices-legions-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: organization-best-practices
Source: https://github.com/legions-developer/invoicely/tree/main/.agents/skills/organization
Command: npx skills add https://github.com/legions-developer/invoicely --skill organization-best-practices-legions-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you configure secure multi-tenant organization support so users can create workspaces, invite members, manage teams, and control access with role-based permissions.

Core Features & Use Cases

  • Organizations for multi-tenancy: Enable the Better Auth organization plugin, define org limits per user, and assign the creator an owner role.
  • Membership management: Add, remove, and update member roles while enforcing guardrails like owner protection and membership limits.
  • Invitations & onboarding: Send invitation emails or generate shareable invitation URLs, configure expiration/limits, and optionally cancel pending invites on re-invite.
  • Roles & permissions (RBAC): Check permissions for dynamic access control and create custom roles with fine-grained permission maps.
  • Teams within orgs: Enable teams, create/manage team membership, and control team/member maximums.
  • Operational lifecycle & schema customization: Use hooks for before/after create/delete behavior and customize table/field names via schema options.

Quick Start

Configure Better Auth with the organization plugin on the server, add the organization client plugin on the client, run the Better Auth CLI migration, and confirm your database has the required organization-related tables.

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 multi-tenant organizations and RBAC with Better Auth?

Multi-tenant organizations with Better Auth are set up by adding the organization plugin to your server and client, running database migrations, and configuring roles, permissions, and team structures. This enables users to create workspaces, invite members, and manage scoped access.

Does Better Auth support role-based access control and custom permissions for SaaS applications?

Better Auth supports RBAC for SaaS applications by allowing you to check permissions for dynamic access control and create custom roles with fine-grained permission maps. You can enforce scoped access to organization resources based on these defined roles.

How do I configure an invitation system for organization members in Better Auth?

An invitation system in Better Auth is configured to send invitation emails or generate shareable URLs, with options to set expiration times and limits. You can also cancel pending invites automatically when re-inviting a user to the organization.

Can I create teams within organizations and manage membership limits using Better Auth?

Better Auth enables teams within organizations, allowing you to create and manage team membership. You can enforce operational guardrails by configuring maximums for both the number of teams and the number of members allowed per team.

What's the best way to customize the organization database schema and lifecycle hooks in Better Auth?

The best way to customize organization database schemas and lifecycle hooks in Better Auth is by using schema options for table and field names, and defining hooks for before and after create or delete behaviors to manage production-ready organization lifecycle processes.