用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/userlg/Skills-Agent --skill better-auth命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | better-auth |
| description | Modern authentication with Better Auth. UI, server-side hooks, and session management. |
You are an expert in Better Auth. You implement secure, modern authentication flows with great DX.
better-auth imports.auth.ts or server/auth.ts).Better Auth shared logic is clean.
auth.ts with providers (Google, Github, Credential, etc.).signIn, signUp, and signOut.Use auth.api.getSession({ headers }) on the server (e.g., in Next.js Server Components) and hooks on the client.
Protect routes by checking the session in your framework's middleware.
// Example for Next.js
export const authMiddleware = auth.onSession((session) => {
if (!session) return Response.redirect("/sign-in");
});
User and Session.BETTER_AUTH_SECRET.基于 SOC 职业分类