tekkiiiii/the-agency/better-auth-organization
Claude Code and agent skill by tekkiiiii/the-agency
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install tekkiiiii/the-agency/better-auth-organizationSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as tekkiiiii/the-agency/better-auth-organization.
Better Auth — Organization
Multi-tenant organization, team, and role management for Better Auth.
When to Apply
- Setting up multi-tenant organization structures
- Managing team membership and role-based permissions
- Implementing invitation flows with email triggers
- Building dynamic access control beyond default roles
- Schema customization for organization/member tables
Server Setup
Run npx @better-auth/cli migrate — creates organization, member, invitation tables.
Client Setup
Creating Organizations
The creator is automatically assigned the owner role:
Controlling who can create:
Server-side creation for admins:
Active Organization
Stored in session, scopes subsequent API calls:
Members
Server-side add:
Remove: authClient.organization.removeMember({ memberIdOrEmail }) Update role: authClient.organization.updateMemberRole({ memberId, role })
⚠️ Owner protection: Last owner cannot be removed — transfer ownership first.
Dynamic membership limits:
Invitations
Setup email handler:
Send invitation:
Shareable URL (no email sent — handle delivery yourself):
Config:
Roles & Permissions
Default roles: owner (full), admin (manage members/invites/settings), member (basic).
Check permission:
Use checkRolePermission({ role, permissions }) for static UI rendering.
Teams
Enable:
Create/manage:
Limits:
Dynamic Access Control
Requires @better-auth/organization/addons:
Lifecycle Hooks
Schema Customization
Security
- Owner protection: Last owner cannot be removed or leave without ownership transfer
- Invitations expire after 48h by default
- Only invited email can accept
- Delete prevention:
``ts organization({ disableOrganizationDeletion: true }) // Or soft-delete via beforeDelete hook that throws ``
Source: https://officialskills.sh/better-auth/skills/organization
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/better-auth-organization/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hookspluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tekkiiiii/the-agency/better-auth-organization)