← Back to list

auth-skill
by Zaibunis
⭐ 0🍴 0📅 Jan 16, 2026
SKILL.md
name: auth-skill description: Implement secure authentication systems including signup, signin, password hashing, JWT tokens, and Better Auth integration.
Authentication Skill
Instructions
-
User Signup
- Validate user input (email, password)
- Hash passwords before storage
- Prevent duplicate accounts
-
User Signin
- Verify credentials securely
- Compare hashed passwords
- Handle invalid login attempts
-
Password Security
- Use strong hashing algorithms (bcrypt / argon2)
- Apply salting
- Never store plain-text passwords
-
JWT Authentication
- Generate access tokens on login
- Set token expiration
- Verify tokens on protected routes
-
Better Auth Integration
- Configure Better Auth providers
- Handle sessions and tokens
- Enable secure logout and refresh flows
Best Practices
- Enforce strong password policies
- Use HTTPS for all auth routes
- Store secrets in environment variables
- Implement token expiration and rotation
- Protect routes with middleware
Example Structure
// Signup
const hashedPassword = await bcrypt.hash(password, 10);
await db.user.create({
email,
password: hashedPassword,
});
// Signin
const isValid = await bcrypt.compare(password, user.password);
if (!isValid) throw new Error("Invalid credentials");
// JWT
const token = jwt.sign(
{ userId: user.id },
process.env.JWT_SECRET,
{ expiresIn: "1h" }
);
Score
Total Score
40/100
Based on repository quality metrics
✓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
Reviews
💬
Reviews coming soon