Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/smicolon/ai-kit/better-auth-patternsnpx skills add smicolon/ai-kit --skill better-auth-patternsgit clone --depth 1 https://github.com/smicolon/ai-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/smicolon/ai-kit/better-auth-patterns)<a href="https://agentmods.dev/skills/smicolon/ai-kit/better-auth-patterns"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/better-auth-patterns.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00034 | $0.02935 |
| Opus 5 | $0.00017 | $0.01468 |
| Sonnet 5 | $0.00007 | $0.00587 |
| Haiku 4.5 | $0.00003 | $0.00294 |
Grade A, and why
Better Auth Patterns scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
return fetch(url, { How it starts
The opening of the file, as written. The whole thing — 526 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Better Auth Patterns
This skill enforces Better Auth best practices for authentication in React applications.
Server Configuration
Basic Setup
// lib/auth.ts
import { betterAuth } from 'better-auth'
import { prismaAdapter } from 'better-auth/adapters/prisma'
import { prisma } from './prisma'
export const auth = betterAuth({
database: prismaAdapter(prisma, {
provider: 'postgresql',
}),
emailAndPassword: {
enabled: true,
requireEmailVerification: true,
},
session: {
expiresIn: 60 * 60 * 24 * 7, // 7 days
updateAge: 60 * 60 * 24, // Extend daily
},
})
export type Auth = typeof auth
Social Providers
import { betterAuth } from 'better-auth'
export const auth = betterAuth({
// ... database config
socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
scopes: ['email', 'profile'],
},
github: {
clientId: process.env.GITHUB_CLIENT_ID!,
clientSecret: process.env.GITHUB_CLIENT_SECRET!,
scopes: ['user:email'],
},
discord: {
clientId: process.env.DISCORD_CLIENT_ID!,
clientSecret: process.env.DISCORD_CLIENT_SECRET!,
},
},
})
Two-Factor Authentication
import { twoFactor } from 'better-auth/plugins/two-factor'
export const auth = betterAuth({
// ... base config
plugins: [
twoFactor({
issuer: 'MyApp',
totpWindow: 1,
backupCodes: {
enabled: true,
count: 10,
},
}),
],
})
Passkeys (WebAuthn)
import { passkey } from 'better-auth/plugins/passkey'
export const auth = betterAuth({
// ... base config
plugins: [
passkey({
rpId: 'myapp.com',
rpName: 'My App',
origin: 'https://myapp.com',
attestation: 'none',
authenticatorSelection: {
authenticatorAttachment: 'platform',
userVerification: 'preferred',
residentKey: 'preferred',
},
}),
],
})
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · +70 lines 09dffc36079d
- 4d ago First seen · 456 lines · 34 tokens per session scan A fde91229df4b
Better Auth Patterns is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 2,935 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
agent-release-swarm
Agent skill for release-swarm - invoke with $agent-release-swarm.
agent-code-analyzer
Agent skill for code-analyzer - invoke with $agent-code-analyzer.
add-resend
Add Resend (email) channel integration via Chat SDK.
add-macos-statusbar
Add a macOS menu bar status indicator for NanoClaw. Shows a bolt icon with a green/red dot indicating whether NanoClaw is running, with Start, Stop, and Restart controls. macOS only.
git-commit
Generate well-formatted git commit messages following conventional commit standards.
excel-basic-statistics-and-routing
Skill "excel-basic-statistics-and-routing" from OpenSenseNova/SenseNova-Skills, covering skill steps, 保存区间提取与汇总结果 and 保存筛选与统计结果.