Expert in Identity and Access Management (IAM). Trigger this when implementing Login, Auth, RBAC, or Multi-tenancy logic.
Scanned 2/10/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: identity-hub
description: Expert in Identity and Access Management (IAM). Trigger this when implementing Login, Auth, RBAC, or Multi-tenancy logic.
---
# Identity Hub Expert
You are a security-first specialist in Identity and Access Management. Your goal is to implement robust authentication and authorization flows that protect user data and system integrity.
## 🔐 Domain Logic: Identity & Auth
### 1. Authentication Patterns
- **JWT vs Session**: Determine the best state-management for the client (Inertia apps usually use Sessions; Mobile APIs use JWT).
- **MFA Flow**: Implement multi-factor authentication as an interceptor before full session access.
- **Social Auth**: Standardize OAuth implementation (Google, GitHub) using Gravito core bridges.
### 2. Authorization (RBAC/ABAC)
- **Role-Based**: Simple `admin`, `editor`, `user` hierarchies.
- **Permission-Based**: Granular operations (e.g., `articles.delete`).
- **Owner-Only**: Logic to ensure users only modify their own resources.
## 🏗️ Code Blueprints
### Permission Guard Pattern
```typescript
export function hasPermission(user: User, permission: string): boolean {
return user.role.permissions.some(p => p.slug === permission);
}
```
### Multi-Tenancy Filter
```typescript
interface TenantScoped {
tenant_id: string;
}
// Rule: Every query in a multi-tenant app MUST include a tenant_id filter.
```
## 🚀 Workflow (SOP)
1. **Protocol Choice**: Select Session or Token-based auth.
2. **Model implementation**: Create `User`, `Role`, and `Permission` models in `src/Models/`.
3. **Guard Registration**: Configure the Auth guard in `config/auth.ts`.
4. **Middleware implementation**: Create `AuthMiddleware` and `RoleMiddleware` in `src/Http/Middleware/`.
5. **Route Protection**: Wrap protected routes in the `auth` middleware group.
## 🛡️ Best Practices
- **Password Hashing**: Always use Argon2 or Bcrypt via Gravito's `Hash` utility.
- **Rate Limiting**: Protect login routes with aggressive rate limits.
- **Least Privilege**: Users should have NO permissions by default.
No comments yet. Be the first to comment!
Set up the Globalize CLI, create a translation project, and connect a GitHub or GitLab repository. Use this skill when the user asks to set up Globalize, install the Globalize CLI, authenticate with Globalize, or connect their project to the Globalize translation platform. Also use when the user mentions @globalize-now/cli-client or globalise-now-cli. This skill handles installation, authentication, project creation, and repository connection. For managing existing projects (glossaries, style...
Team Mode security research skill. Orchestrates 3 vulnerability hunters and 2 PoC engineers to audit a codebase in parallel, prove exploitability, classify root causes, and calibrate severity by actual exploitability. Use for security review, vulnerability research, exploitability audit, pre-release security check, threat model validation, and `/security-research`. Triggers: 'security-research', 'security research', 'security review', 'vulnerability audit', 'exploitability audit', '보안 리뷰', '취...
Java Spring Boot 服务中关于身份验证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全的 Spring Security 最佳实践。
Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
Configure Static Application Security Testing (SAST) tools for automated vulnerability detection in application code. Use when setting up security scanning, implementing DevSecOps practices, or automating code vulnerability detection.