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 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00034 | $0.02935 |
| Opus 5.5 | $0.00014 | $0.01174 |
| Sonnet 5.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 3mo ago.
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.
- 3mo ago Changed · +70 lines 09dffc36079d
- 3mo 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 (7 stars, last pushed 2mo ago), licensed MIT. It adds 34 tokens to every session and 2,935 once invoked, about $0.0001 per session on Opus 5.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.
Better Auth Patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Better Auth Patternssmicolon/ai-kit | Skill | 7 | 2mo ago | MIT | A | 34 | Claude Code |
| add-dial-toolnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 118 | Claude Code |
| add-telegramnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 12 | Claude Code |
| add-gchatnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 13 | Claude Code |
| add-signalnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 22 | Claude Code |
| add-matrixnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 19 | Claude Code |
| onecli-gatewaynanocoai/nanoclaw | Skill | 31k | today | MIT | A | 81 | Claude Code |