
Better Auth Core
This walks you through the Better Auth setup in TypeScript apps: wiring up the server instance with your database driver or adapter, mounting handlers, creating the client, and working with sessions. You'll configure environment variables, set up social or email/password auth, and call server-side APIs with the right headers. The skill pushes you toward a clean separation between client and server, keeps the data layer pluggable, and includes TypeScript inference helpers. It's practical if you're adding authentication to a full-stack TypeScript project and want the plumbing done correctly without hunting through docs.
- skills.sh installs
- 368
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill better-auth-core --agent claude-codeInstalls into .claude/skills of the current project.
Files
Better Auth Core (TypeScript)
Goals
- Set up a Better Auth instance with environment variables and data layer wiring.
- Wire server handlers and a client instance.
- Use sessions and server-side API methods safely.
- Keep data-layer choices pluggable (drivers or adapters).
Quick start
- Install
better-auth. - Set
BETTER_AUTH_SECRET(32+ chars) andBETTER_AUTH_URL. - Create
auth.tsand exportauth. - Provide
database(driver or adapter) or omit for stateless sessions. - Mount a handler (
auth.handleror a framework helper). - Create a client with
createAuthClient.
import { betterAuth } from "better-auth";
export const auth = betterAuth({
database: myDatabaseOrAdapter, // driver or adapter; omit for stateless mode
emailAndPassword: { enabled: true },
socialProviders: {
github: {
clientId: process.env.GITHUB_CLIENT_ID as string,
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
},
},
});
Sponsors
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Category
- Backend & APIs
- First seen
- Jun 3, 2026
More from bobmatnyc/claude-mpm-skills
All 158- Homebrew Formula Maintenance366
- Better Auth Integrations363
- Reporting Pipelines363
- Better Auth Plugins362
- Git Worktrees360
- Nextjs Core357
- Fastapi Local Dev356
- Vb Winforms356
- Headlessui355
- Jest Typescript354
- Vercel Networking Domains353
- Svelte352
- Sec Edgar Pipeline351
- Env Manager350
- Mongodb350
- Vb Core350
- Phoenix Api Channels348
- Digitalocean Containers Images347
- Hono Jsx347
- Langgraph346
- Pr Quality Checklist346
- Ecto Patterns345
- Vercel Observability345
- Media Transcoding344
Recommended
More Backend & APIs1
better-auth-pluginsbobmatnyc/claude-mpm-skillsBetter Auth plugin system for TypeScript. Use when adding advanced auth features (2FA, magic link, passkey, username, JWT, organizations) via server and client 362skills.sh installs
2
biorxiv-databasedavila7/claude-code-templatesEfficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or cate358skills.sh installs
3
bun-drizzle-integrationsecondsky/claude-skillsUse when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations.353skills.sh installs
4
email-gatewayjezweb/claude-skillsMulti-provider email sending for Cloudflare Workers and Node.js applications. Build transactional email systems with Resend (React Email support), SendGrid (ent342skills.sh installs
5
graphqlbobmatnyc/claude-mpm-skillsGraphQL query language and runtime for APIs enabling clients to request exactly the data they need with strongly-typed schemas and single endpoint architecture.340skills.sh installs
6
bun-http-serversecondsky/claude-skillsUse when building HTTP servers with Bun.serve, handling requests/responses, implementing routing, creating REST APIs, or configuring fetch handlers.336skills.sh installs