sk-security
OfficialHarden auth, RBAC, and security headers
Software Engineering#rate limiting#security headers#rbac#audit logging#password reset#nextauth#route acl
AuthorTimeKast
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Centralizes secure authentication and authorization for the TimeKast Starter Kit, preventing role/route mistakes and closing common security gaps around NextAuth, RBAC checks, rate limiting, audit logging, and password reset flows.
Core Features & Use Cases
- NextAuth v5 split-config pattern: keeps Edge-safe callbacks in auth.config.ts while Node-only logic (adapter, providers, DB sync) lives in auth.ts.
- Single, correct Route ACL location: enforces Route ACL via authorized() (so auth.user.role is populated) instead of scattering checks across middleware and components.
- SSOT RBAC model: uses ROLE_CONFIG and helpers to define hierarchy, display metadata, invitation rules, and role validation in one place.
- Two-layer authorization model: separates Route ACL (ROUTE_ACL/isRouteAllowed) from resource permissions (PERMISSIONS/hasPermission) to avoid mixing responsibilities.
- Password reset with anti-enumeration guarantees: hashes reset tokens, enforces expiration and one-time use, and ensures requestPasswordReset returns success regardless of user existence.
- Auth hardening infrastructure: ships rate-limit buckets, audit logging helpers, and project-level security headers configuration guidance.
- Practical integration guidance: explains what to wire to kit auth, RBAC guards, and shipped headers to avoid silent auth/ACL failures.
Quick Start
Plug this skill into your kit’s NextAuth integration by wiring the Edge-safe callbacks in src/lib/auth/auth.config.ts and placing route authorization only in authorized() so role-aware ACL works end-to-end.
Dependency Matrix
Required Modules
None requiredComponents
Standard packageđŸ’» Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: sk-security Download link: https://github.com/TimeKast/AgendaInteligente/archive/main.zip#sk-security Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.