AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Better Auth

skill-ashish7802-awesome-api-skills-better-auth · by ashish7802

A Claude skill from ashish7802/awesome-api-skills.

No reviews yet
0 installs
27 views
0.0% view→install

Install

$ agentstack add skill-ashish7802-awesome-api-skills-better-auth

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ashish7802-awesome-api-skills-better-auth)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Better Auth? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Better Auth API Skill

Quick Start

Better Auth provides framework-agnostic auth (Next.js, Express, SvelteKit) deeply integrated with modern ORMs like Drizzle and Prisma.

npm install better-auth

Common Workflows

OAuth and Magic Links

Configure plugins to enable OAuth (GitHub, Google) or Magic Links. Better Auth natively handles session creation and saves profiles to your database using the provided database adapter.

Production Patterns

Two-Factor Authentication

Utilize the twoFactor plugin to require TOTP before issuing a valid session cookie. Ensure you construct your UI to gracefully handle the requires_two_factor response state.

Error Recovery

Handle BetterAuthError. When creating users, handle conflicts gracefully (e.g., Email already exists) and prompt the user to log in instead.

Security Notes

Better Auth handles CSRF and secure cookies out of the box. Ensure your trustedOrigins configuration accurately reflects your production domains to prevent session hijacking.

Performance Considerations

Session validation happens on the Edge or Server. Optimize your database queries (e.g., adding indexes to the session_token column) to ensure ultra-fast session lookups on every request.

Testing Guidance

Better Auth can be mocked easily by overriding the getSession function in your unit tests, or by provisioning a test database specifically for your test runner.

Troubleshooting

If sessions randomly invalidate, ensure you are not clearing cookies improperly across subdomains and that the secret configuration variable remains static across deployments.

References

Related Skills

  • [Clerk](/skills/clerk)
  • [Neon](/skills/neon)

Why use this skill

Use this when your agent works with better-auth — structured patterns beat pasted docs and prevent common hallucinations.

AI pitfalls

  • Using outdated SDK or API versions from training data
  • Inventing environment variable names
  • Omitting error handling and retry logic

Production checklist

  • [ ] Secrets in environment variables, not source code
  • [ ] Error handling and logging in place
  • [ ] Rate limits and timeouts configured

Related skills

  • [clerk](../clerk/SKILL.md) — related to
  • [neon](../neon/SKILL.md) — related to

> Last Verified: 2026-07-02

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.