organization-best-practices — Claude Code skill: how to install
Sets up multi-tenant organizations, invitations, and permissions in Better Auth. Helps manage teams and custom RBAC rules without digging through documentation.
npx skills add better-auth/skills --skill organization-best-practices -a claude-code
npx skills add better-auth/skills --skill organization -a claude-codeWhat organization-best-practices does
Configuring multi-tenancy requires adding organization() to the server and organizationClient() to the client. The database needs a migration via npx auth@latest migrate or schema pushes for Drizzle or Prisma.
This skill outlines member invitations, shareable URLs, and scoping requests to an active session organization. It also covers team structures and dynamic roles with @better-auth/organization/addons.
Creating an organization via auth.api.createOrganization with a userId cannot be combined with session headers. Another hard constraint: the last remaining owner cannot be removed before transferring ownership.
What it helps with
- set up server and client organization plugins in Better Auth
- configure member invitations via email and shareable links
- implement granular role-based access control and custom permissions
- manage sub-teams and enforce membership limits per organization
Example prompts for the agent
- Show how to configure the Better Auth organization plugin with custom member limits.
- Write the code to create an organization on behalf of a user using auth.api.
- How do I set up dynamic access control and custom roles with Better Auth?
How to install organization-best-practices
1Skills CLI (Vercel)
npx skills add better-auth/skills --skill organization-best-practices -a claude-codenpx skills add better-auth/skills --skill organization -a claude-code2Manually: put the files in place
~/.claude/skills/organization/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/organization/
1Skills CLI (Vercel)
npx skills add better-auth/skills --skill organization -a codex2Manually: put the files in place
.agents/skills/organization/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add better-auth/skills --skill organization -a cursor2Manually: put the files in place
.cursor/skills/organization/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install better-auth/skills organization2Manually: put the files in place
.github/skills/organization/SKILL.md1Skills CLI (Vercel)
npx skills add better-auth/skills --skill organization -a gemini-cli2Platform CLI
gemini skills install https://github.com/better-auth/skills --path better-auth/organizationManually: put the files in place
.devin/skills/organization/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add better-auth/skills --skill organization -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set5
The whole set →Similar
Questions about organization-best-practices
How do I install organization-best-practices in Claude Code?
Run npx skills add better-auth/skills --skill organization-best-practices -a claude-code in your project terminal.
What does organization-best-practices do?
It provides architecture patterns and API guidance for multi-tenancy, member invitations, teams, and RBAC in Better Auth.
Can an organization be left without an owner?
No, the system does not allow removing the last owner. Ownership must be transferred to another member before removal.