auth-architect

auth-architect is an agent for Claude Code from smicolon/ai-kit. It costs 28 tokens per session (1,760 once invoked), scanned A, original, MIT.

An authentication architecture agent for designing Better Auth implementations, including providers, security flows, and enterprise patterns.

In plain words
What is it for?
Use it to design authentication architecture, provider setup, security flows, and enterprise authentication patterns.
Why use it?
It helps plan how login, identity providers, and security-related flows should fit together before implementation.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; names the TodoWrite tool.

Good fit Use it to design authentication architecture, provider setup, security flows, and enterprise authentication patterns.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/smicolon/ai-kit/auth-architect
Install

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.

Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

Wrote 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.

agentmods badge for auth-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/smicolon/ai-kit/auth-architect/github.svg)](https://agentmods.dev/agents/smicolon/ai-kit/auth-architect)
Your own site
<a href="https://agentmods.dev/agents/smicolon/ai-kit/auth-architect"><img src="https://agentmods.dev/badge/agents/smicolon/ai-kit/auth-architect/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.

agentmods 80×15 button for auth-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/smicolon/ai-kit/auth-architect"><img src="https://agentmods.dev/badge/agents/smicolon/ai-kit/auth-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,760 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01760
Opus 5.5 $0.00011 $0.00704
Sonnet 5.5 $0.00006 $0.00352
Haiku 4.5 $0.00003 $0.00176

Measured 1mo ago against content hash 3414bfd3b354, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

auth-architect scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/better-auth/agents/auth-architect.md · 285 lines

How it starts

The opening of the file, as written. The whole thing — 285 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auth Architect

You are a senior authentication architect specializing in Better Auth implementations. Design secure, scalable authentication systems for React applications.

Better Auth Overview

Better Auth is a framework-agnostic TypeScript authentication library that provides:

  • Core Authentication: Email/password, sessions, password reset
  • Social Providers: OAuth 2.0/OIDC (Google, GitHub, Discord, etc.)
  • Advanced Security: 2FA, passkeys/WebAuthn, rate limiting
  • Enterprise: Multi-tenancy, SSO, organization management

Architecture Patterns

Basic Setup Structure

src/
├── lib/
│   └── auth.ts              # Better Auth server instance
├── auth/
│   ├── client.ts            # Auth client for React
│   └── hooks.ts             # Custom auth hooks
├── routes/
│   ├── __root.tsx           # Auth context in router
│   ├── _auth.tsx            # Protected route layout
│   ├── _auth.dashboard.tsx  # Protected pages
│   ├── login.tsx
│   ├── register.tsx
│   └── forgot-password.tsx
└── features/
    └── auth/
        ├── components/
        │   ├── LoginForm.tsx
        │   ├── RegisterForm.tsx
        │   ├── SocialLoginButtons.tsx
        │   └── TwoFactorForm.tsx
        └── types.ts

Server Configuration

// lib/auth.ts
import { betterAuth } from 'better-auth'
import { prismaAdapter } from 'better-auth/adapters/prisma'
import { twoFactor } from 'better-auth/plugins/two-factor'
import { passkey } from 'better-auth/plugins/passkey'
import { organization } from 'better-auth/plugins/organization'
import { prisma } from './prisma'

export const auth = betterAuth({
  database: prismaAdapter(prisma, {
    provider: 'postgresql',
  }),

  emailAndPassword: {
    enabled: true,
    requireEmailVerification: true,
    sendResetPasswordToken: async (user, url) => {
      await sendEmail({
        to: user.email,
        subject: 'Reset your password',
        html: `<a href="${url}">Reset password</a>`,
      })
    },
  },

  session: {
    expiresIn: 60 * 60 * 24 * 7, // 7 days
    updateAge: 60 * 60 * 24, // 1 day
    cookieCache: {
      enabled: true,
      maxAge: 60 * 5, // 5 minutes
    },
  },

  socialProviders: {
    google: {
      clientId: process.env.GOOGLE_CLIENT_ID!,
      clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
    },
    github: {
      clientId: process.env.GITHUB_CLIENT_ID!,
      clientSecret: process.env.GITHUB_CLIENT_SECRET!,
    },
  },

  plugins: [
    twoFactor({
      issuer: 'MyApp',
    }),
    passkey(),
    organization(),
  ],
})

export type Auth = typeof auth

Read the full file on GitHub · 285 lines

Changes

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.

  1. 1mo ago Changed · +1 lines 3414bfd3b354
  2. 1mo ago Changed · +5 lines · +4 tokens per session f502db95d022
  3. 1mo ago First seen · 279 lines · 24 tokens per session scan A 88b8b304888f

Subscribe to this mod's changes

auth-architect is an agent published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 1,760 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

cos-architect

Use this agent when making structural decisions: database schema changes, API contract design, service boundaries, dependency choices, or any change that affects the system's fundamental architecture. Also use when evaluating technical debt or refactoring proposals. Context: User wants to add a new domain entity user…

winstonkoh87/Athena-Public · 178 tokens

lovers-integrator

Integration harmony agent. Use when modules exist but connections between them need review. Invoke when: integrating components, reviewing API boundaries, checking data flow between systems.

axiomantic/spellbook · 36 tokens

sap-pm-consultant

SAP Plant Maintenance consultant agent. Dispatched for deep PM module expertise — equipment management, work orders, preventive maintenance, notifications, and best practices.

vigneshbarani24/sap-superpowers · 36 tokens

system-architect

Use this agent when designing technical architecture, evaluating algorithms, or analyzing system performance and scalability. Specializes in distributed systems, data structures, and architectural patterns.

arpitnath/claude-capsule-kit · 38 tokens

Pimcore Expert

Expert Pimcore development assistant specializing in CMS, DAM, PIM, and E-Commerce solutions with Symfony integration.

archubbuck/workspace-architect · 26 tokens

Laravel Expert Agent

Expert Laravel development assistant specializing in modern Laravel 12+ applications with Eloquent, Artisan, testing, and best practices.

archubbuck/workspace-architect · 27 tokens