organization-best-practices

Configure multi-tenant organization governance with RBAC using Better Auth's organization plugin.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/bartolomeomueller/hr --skill organization-best-practices-bartolomeomueller
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: organization-best-practices
Source: https://github.com/bartolomeomueller/hr/tree/main/.agents/skills/organization-best-practices
Command: npx skills add https://github.com/bartolomeomueller/hr --skill organization-best-practices-bartolomeomueller

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configure multi-tenant organizations, manage members and invitations, define custom roles and permissions, set up teams, and implement RBAC using Better Auth's organization plugin. Use when users need org setup, team management, member roles, access control, or the Better Auth organization plugin.

Core Features & Use Cases

  • Setup: Add organization() plugin to server config, add organizationClient() plugin to client config, run migrations, and verify that organization, member, invitation tables exist in your database.
  • Creating Organizations: The creator is automatically assigned the owner role and can manage creation policies, invitations, and memberships.
  • Active Organizations: Stored in the session and scopes subsequent API calls. Set active organization with a dedicated setter.
  • Members: Add and manage members with roles; update member roles and enforce membership limits.
  • Invitations: Configure invitation emails and generate shareable invitation URLs.
  • Roles & Permissions: Create and manage custom roles with granular permissions; check permissions for UI rendering and server checks.
  • Teams: Enable teams, create teams, manage team members, and set active teams with per-team member limits.
  • Dynamic Access Control: Enable dynamic access control and define custom roles with per-resource permissions.
  • Lifecycle Hooks: Define before/after hooks for organization, member, and invitation lifecycles to customize behavior.
  • Schema Customization: Override schema for organizations and members, including custom field mappings and additional fields.
  • Security Considerations: Enforce owner protections, secure deletion lifecycle, and robust invitation security.
  • Complete Configuration Example: A comprehensive integrated setup illustrating all options.

Quick Start

Use the pdf skill to extract all text from the attached file 'invoice-q3.pdf'.

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 with RBAC using Better Auth?

Set up multi-tenant organizations with RBAC by adding the organization plugin to your server config and the organizationClient plugin to your client config, then running migrations to generate the required organization, member, and invitation database tables.

How do I manage member invitations and roles in a multi-tenant application?

Manage member invitations and roles by configuring invitation emails, generating shareable invitation URLs, and assigning custom roles with granular permissions to new members joining the multi-tenant organization.

Can I create custom roles and granular permissions for multi-tenant team management?

Yes, you can create custom roles and granular permissions for multi-tenant team management by enabling dynamic access control to define per-resource permissions for organization members and specific teams.

How does Better Auth scope API calls for active organizations?

Better Auth scopes API calls for active organizations by storing the active organization in the user session, ensuring subsequent API requests automatically apply the correct multi-tenant context.

What are the limitations or security considerations for organization lifecycle hooks?

Security considerations for organization lifecycle hooks include enforcing owner protections, securing the deletion lifecycle, and implementing robust invitation security to prevent unauthorized multi-tenant access control changes.

Does the Better Auth organization plugin support schema customization for members?

Yes, the Better Auth organization plugin supports schema customization, allowing you to override default schema for organizations and members with custom field mappings and additional database fields.