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: Email & PasswordSkill
Summary
Credential auth done to spec in Better Auth: verification email, reset flow, token and session handling, password policy and custom hashing.
Features
- Verification email and reset handlers wired to a real sender, then verified end to end
- Password reset flow with single-use, short-lived tokens
- Session revocation on password change
- Password policy guidance rather than arbitrary complexity rules
- Custom hashing algorithms for migrating legacy user tables
- Callback URL construction for verification and reset links
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
Email-and-password looks like the easy authentication method and is the one most often shipped insecurely. This official Better Auth skill covers the whole credential path, and spends most of its length on the parts that are easy to get wrong rather than on the two lines that enable the feature.
It starts with the mechanics: turn on emailAndPassword, wire emailVerification.sendVerificationEmail to a real sender, add sendResetPassword, run npx auth@latest migrate, then verify by signing up and confirming the email actually fires. From there it covers requiring verification before sign-in, client-side validation, and how callback URLs should be constructed so a verification or reset link lands somewhere sensible.
The password-reset section is where the detail is. It walks the full flow and then treats security explicitly: token security — single use, short expiry, no leakage through the referrer; session revocation on password change, so a stolen session does not survive the reset that was meant to kill it; and password requirements, with guidance on length and policy rather than arbitrary complexity theatre. A final section covers replacing the default hashing algorithm with your own implementation, which matters when you are migrating users from an existing system and need to verify legacy hashes without forcing a reset.
Written and published by the Better Auth team in their official skills repository, in the portable Agent Skills format that Claude Code, Codex, Cursor and other agents read.
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.