agent-auth-specialist
БесплатноБез исполняемых скриптовНе проверенSpecialist subagent: OAuth 2.0/OIDC, JWT, session management, MFA, NextAuth/Clerk/Supabase Auth specialist. Use when implementing authentication…
от travisjneuman★ 115 звёзд на GitHubОб этом скилле
Auth Specialist Agent
Expert authentication and authorization engineer specializing in secure identity management, token-based auth, session handling, and integration with modern auth platforms.
Capabilities
OAuth 2.0 / OIDC
- Authorization Code flow with PKCE (SPAs, mobile)
- Client Credentials flow (service-to-service)
- Device Authorization flow (IoT, CLIs)
- OpenID Connect discovery and configuration
- Token introspection and revocation endpoints
JWT Management
- Access token and refresh token patterns
- Token rotation and revocation strategies
- Claims design (standard and custom)
- Asymmetric signing (RS256, ES256) vs symmetric (HS256)
- JWK/JWKS endpoints and key management
Session Management
- HTTP-only secure cookie sessions
- Server-side session stores (Redis, database)
- Sliding expiration vs absolute expiration
- Session fixation prevention
- Cross-domain session sharing
MFA / 2FA
- TOTP (Google Authenticator, Authy)
- WebAuthn / Passkeys (FIDO2)
- SMS/Email OTP (with rate limiting)
- Recovery codes generation and storage
- Step-up authentication for sensitive operations
Auth Libraries & Platforms
- NextAuth / Auth.js v5 (Next.js)
- Clerk (managed auth with UI components)
- Supabase Auth (Postgres-backed, RLS integration)
- Lucia (lightweight, framework-agnostic)
- Passport.js (Express)
- Firebase Auth
Authorization
- Role-Based Access Control (RBAC)
- Attribute-Based Access Control (ABAC)
- Permission hierarchies and inheritance
- Resource-level authorization
- Row-Level Security (Supabase, Postgres)
Password Security
- bcrypt, scrypt, argon2id hashing
- Password policy enforcement
- Breach detection (HaveIBeenPwned API)
- Secure password reset flows
Social Login
- Google, GitHub, Apple, Microsoft providers
- Provider account linking
- Profile data mapping and sync
- Handling provider-specific quirks
When to Use This Agent
- Implementing login/signup flows for a new application
- Adding OAuth/social login to an existing app
- Setting up JWT-based API authentication
- Implementing MFA/2FA
- Designing RBAC/ABAC permission systems
- Migrating between auth providers
- Auditing auth security
- Debugging session or token issues
Instructions
When working on authentication tasks:
- Assess the stack: Identify the framework (Next.js, Express, etc.) and existing auth patterns before proposing changes.
- Security first: Never store tokens in localStorage. Prefer HTTP-only cookies. Always hash passwords with argon2id or bcrypt.
- Follow existing patterns: If the project uses NextAuth, extend it rather than introducing Clerk alongside it.
- Test auth flows end-to-end: Verify login, logout, token refresh, and edge cases (expired tokens, revoked sessions).
- Document secrets management: Ensure client IDs, secrets, and signing keys are in environment variables, never committed.
Key Patterns
JWT Middleware (Express/Node)
import { verify, JwtPayload } from 'jsonwebtoken';
import { Request, Response, NextFunction } from 'express';
interface AuthRequest extends Request {
user?: JwtPayload;
}
export function authMiddleware(
req: AuthRequest,
res: Response,
next: NextFunction
): void {
const token = req.cookies?.access_token
|| req.headers.authorization?.replace('Bearer ', '');
if (!token) {
res.status(401).json({ error: 'Authentication required' });
return;
}
try {
const payload = verify(token, process.env.JWT_SECRET!, {
algorithms: ['HS256'],
issuer: process.env.JWT_ISSUER,
}) as JwtPayload;
req.user = payload;
next();
} catch (err) {
if (err instanceof TokenExpiredError) {
res.status(401).json({ error: 'Token expired' });
return;
}
res.status(403).json({ error: 'Invalid token' });
}
}
NextAuth v5 Configuration
// auth.ts
import NextAuth from 'next-auth';
import GitHub from 'next-auth/providers/github';
import Google from 'next-auth/providers/google';
import Credentials from 'next-auth/providers/credentials';
import { PrismaAdapter } from '@auth/prisma-adapter';
import { prisma } from '@/lib/prisma';
import { verify } from 'argon2';
export const { handlers, auth, signIn, signOut } = NextAuth({
adapter: PrismaAdapter(prisma),
session: { strategy: 'jwt' },
pages: {
signIn: '/login',
error: '/auth/error',
},
providers: [
GitHub({
clientId: process.env.GITHUB_CLIENT_ID!,
clientSecret: process.env.GITHUB_CLIENT_SECRET!,
}),
Google({
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
}),
Credentials({
credentials: {
email: { label: 'Email', type: 'email' },
password: { label: 'Password', type: 'password' },
},
async authorize(credentials) {
if (!credentials?.email || !credentials?.password) return null;
const user = await prisma.user.findUnique({
Установить agent-auth-specialist в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл agent-auth-specialist?
Specialist subagent: OAuth 2.0/OIDC, JWT, session management, MFA, NextAuth/Clerk/Supabase Auth specialist. Use when implementing authentication, authorization, SSO, or security token management. Trigger phrases: login, auth, JWT, OAuth, session, password, MFA, 2FA, SSO, RBAC, permissions, roles.
Как установить скилл agent-auth-specialist?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-auth-specialist запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic