← スキル一覧に戻る

auth-personalization
by maneeshanif
⭐ 0🍴 0📅 2025年12月7日
SKILL.md
name: auth-personalization description: Add Better Auth signup/signin, personalize chapter content, and persist user preferences. Use when implementing authentication, user sessions, or personalized content delivery.
Auth Personalization Skill
Instructions
-
Auth plumbing
- Install Better Auth client/server SDKs
- Configure redirect URIs and cookie/CSRF settings
- In FastAPI, add auth dependency to protect endpoints
- Verify tokens server-side
-
Data model
- Neon tables:
users(id, email, name, role)preferences(user_id, difficulty, focus_tags, lang)
- Reuse
sessionstable if present from RAG service
- Neon tables:
-
UX
- Docusaurus: add login/logout buttons
- Display session state in header
- Guard personalization features behind login
- Provide preferences UI (dropdowns/tags) saved via backend
-
Personalization logic
- Pass user prefs into RAG prompt context:
difficulty→ adjust answer tonefocus_tags→ rerank payload
- Store last chapters read for resume suggestions
- Pass user prefs into RAG prompt context:
Examples
// Better Auth client setup
import { createAuthClient } from "better-auth/client";
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_API_URL,
});
# FastAPI auth dependency
from fastapi import Depends, HTTPException
async def get_current_user(token: str = Depends(oauth2_scheme)):
# Verify Better Auth token
# Return user or raise 401
pass
Definition of Done
- Users can sign up/sign in via Better Auth; session recognized by backend
- Preferences persisted in Neon; API to update/fetch works
- RAG responses reflect preferences (tone/focus) when provided
- Basic UI for login + prefs exists in Docusaurus
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です