Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

email-and-password-best-practices — Claude Code skill setup

Configures email verification, password reset flows, and password policies in Better Auth. Helpful when adding credential authentication to your backend.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add better-auth/skills --skill email-and-password-best-practices -a claude-code
npx skills add better-auth/skills --skill emailAndPassword -a claude-code
Open on GitHub

What email-and-password-best-practices does

This skill guides the setup of email and password authentication in Better Auth. It details how to hook into sendVerificationEmail, enforce mandatory address confirmation before sign-in, and implement password resets while invalidating active sessions with revokeSessionsOnPasswordReset.

The guidance covers token lifetimes, which default to one hour and are single-use. It also demonstrates how to replace the built-in Node.js scrypt hashing with Argon2id via @node-rs/argon2, including specific memory and iteration parameters.

Switching password hashing on an existing database will immediately lock out users with legacy hashes unless you plan a migration flow first. On serverless infrastructure, background email tasks require passing promises to handlers like waitUntil.

What it helps with

  • enforce email verification before allowing sign-in
  • implement password reset with session invalidation
  • replace default scrypt hashing with Argon2id
  • define minimum and maximum password length boundaries

Example prompts for the agent

  • Configure email verification and block unverified sign-ins in Better Auth
  • Set up password reset in Better Auth with single-use tokens and session revocation
  • Implement Argon2id custom password hashing for Better Auth

How to install email-and-password-best-practices

1Skills CLI (Vercel)

npx skills add better-auth/skills --skill email-and-password-best-practices -a claude-code
npx skills add better-auth/skills --skill emailAndPassword -a claude-code

2Manually: put the files in place

~/.claude/skills/emailAndPassword/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/emailAndPassword/

From the same set5

The whole set →

Similar

threat-model-analyst official github Runs STRIDE-A threat modeling for a repository or system. It can also update an earlier report against the current code or a chosen commit. GitHub Copilot 1,500installs agent-owasp-compliance official github Checks an AI agent codebase against the 10 OWASP ASI risks. Use it before production deployment, for security review, or when preparing an audit report. GitHub Copilot 1,500installs verified-agent-identity BillionsNetwork This skill gives an agent an Ethereum DID on the Billions Network and a way through 402 Payment Required responses. Use it when an agent has to prove who owns it or pay for API access. Claude Code CX Codex Cursor +1 8,200installs labarchive-integration K-Dense-AI This skill guides work with LabArchives ELN API and Inventory API v1, including regional endpoints, request signing, and local request planning. Claude Code CX Codex Cursor +1 1,900installs pymatgen K-Dense-AI Analyzes, validates, converts, and transforms materials structures and computed data with pymatgen. Use it for phase diagrams, symmetry checks, electronic-structure files, and bounded Materials Project queries. Claude Code CX Codex Cursor +1 1,900installs github-code-review ruvnet Runs a swarm of specialized AI agents to inspect GitHub pull requests for security, performance, and architecture issues. Claude Code CX Codex Cursor +1 1,300installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs

Questions about email-and-password-best-practices

How to install email-and-password-best-practices in Claude Code?

Run npx skills add better-auth/skills --skill email-and-password-best-practices -a claude-code.

What does email-and-password-best-practices do?

It provides configuration guidance for email and password authentication in Better Auth, covering verification links, reset flows, session revocation, and custom hashers.

What happens if you switch from scrypt to Argon2id?

Better Auth defaults to scrypt. Switching hashing algorithms on a database with existing users breaks their sign-ins unless you handle credential migration.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor