CodeQL, Semgrep and SARIF static-analysis toolkit from Trail of Bits: taint tracking, fast pattern scans and merged, deduplicated security findings for coding agents.
Better Auth: OrganizationsSkill
Summary
Turns a single-user app multi-tenant with Better Auth's organization plugin: orgs, members, invitations, teams, roles and dynamic access control.
Features
- Organization creation, gating and the active-organization scoping model
- Members, multiple roles per member, role changes and membership limits
- Invitation emails, shareable invite URLs, expiry config and invitation security
- Teams as a second grouping level inside an organization
- Dynamic Access Control: custom roles defined at runtime, not in config
- Lifecycle hooks, schema customization, owner protection and deletion cascade
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Description
Adding organizations is the point at which a side project becomes a product that companies can buy, and it is a much larger change than the plugin line suggests — every query gains a tenant, every permission gains a scope. This official Better Auth skill covers that plugin end to end.
Setup is the short part: add organization() server-side and organizationClient() client-side, migrate, and confirm the organization, member and invitation tables exist. The skill then works through creating organizations (including on a user's behalf, and gating who may create them at all), the active-organization concept that scopes subsequent calls, and membership — adding and removing members server-side, assigning multiple roles to one member, changing roles, and enforcing organization and membership limits.
Invitations get their own treatment: wiring the invitation email, sending and accepting, shareable invitation URLs, and the configuration around expiry and reuse, with a dedicated note on invitation security. Roles and permissions cover the built-in checks; Teams adds a second level of grouping inside an organization with its own membership and limits; and Dynamic Access Control lets custom roles be defined at runtime rather than baked into the config, which is what enterprise buyers usually ask for.
The last third is the part that is easy to skip and expensive to skip. Lifecycle hooks let you react to organization and membership events. Schema customization covers renaming tables and adding your own columns. Security considerations spell out owner protection — you cannot leave an organization ownerless — the cascade behaviour of organization deletion, and how invitations can be abused. It closes with a complete configuration example putting all of it together.
Published by the Better Auth team in their official skills repository, in the portable Agent Skills format.
Related Skills
Microsoft's official Playwright skill — drives a real browser from the command line using accessibility snapshots and element refs, and plans, generates and heals Playwright tests.
Google's official agent skill for writing production Maps Platform code — grounded in freshly fetched docs, with a demo key path that needs no billing account.
Railway's official agent skill: create projects, provision databases and buckets, deploy, manage variables and domains, and read build failures back — from the CLI, API or MCP server.