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: Integration GuideSkill
Summary
The reference an agent needs to configure Better Auth correctly: adapters, session strategy, hooks, plugins, type safety and the gotchas that bite in production.
Features
- Pins documentation lookups to the Better Auth version resolved from the lockfile
- Uses the Better Auth MCP server for versioned doc search when it is available
- Reference coverage of adapters, sessions, cookies, hooks, plugins and the client
- Keeps upgrade guidance separate from installed-version guidance
- Type-safety patterns that derive client types from the server instance
- A Common Gotchas section for the failures that surface in production
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
This is Better Auth's own configuration reference, written for an agent rather than a reader. It is the skill that fires when someone mentions Better Auth, betterauth or auth.ts and wants the server and client set up properly — as opposed to scaffolded from scratch, which is the companion Create Auth skill's job.
Its most valuable habit is version discipline. Before answering anything the skill resolves which Better Auth release the project actually has — a version the user named, otherwise the resolved version in the lockfile, falling back to the package manifest — and then pins its documentation lookups to that line. Where the Better Auth MCP server is available it calls get_doc on /llms.txt to turn that version into a documentation identifier and passes it to every search; without MCP it starts from better-auth.com/llms.txt and follows the matching version index. It reaches for the latest docs only when the installed version genuinely cannot be determined or the user is asking about an upgrade, and when planning an upgrade it keeps guidance for the installed version separate from guidance for the target. That single rule removes the most common failure mode of LLM-written auth code: plausible config borrowed from a different major version.
The body covers the configuration surface in reference form — required environment variables and where auth.ts belongs, the CLI commands, core config options, database adapters, session management and cookie behaviour, user and account config, the email verification and reset flows, security settings, before/after hooks, the plugin system, the client, and how to derive types from the server instance so the client stays honest. A "Common Gotchas" section collects the mistakes that only show up under real traffic.
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.