security-patterns
Implements authentication, authorization, encryption, secrets management, and security hardening patterns. Use when designing auth flows, managing secrets, configuring CORS, implementing rate limiting, or when asked about JWT, OAuth, password hashing, API keys, RBAC, or security best practices.
npx skills add CloudAI-X/claude-workflow-v2 --skill security-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Security Patterns ### When to Load - **Trigger**: Auth flows, encryption, secrets management, CORS configuration, input validation, rate limiting - **Skip**: No security surface involved in the current task ## Security Implementation Workflow Copy this checklist and track progress: ``` Security Implementation Progress: - [ ] Step 1: Choose authentication strategy - [ ] Step 2: Implement authorization model - [ ] Step 3: Set up password hashing - [ ] Step 4: Configure secrets management - [ ] Step 5: Enable encryption (transit + rest) - [ ] Step 6: Configure CORS - [ ] Step 7: Add rate limiting - [ ] Step 8: Validate against anti-patterns checklist ``` ## Authentication Patterns ### JWT (JSON Web Tokens) ```typescript import jwt from "jsonwebtoken"; function generateTokens(user: User) { const accessToken = jwt.sign( { sub: user.id, role: user.role }, process.env.JWT_SECRET!, { expiresIn: "15m", algorithm: "HS256" }, ); const refreshToken = jwt.sign( { sub: user.id, tokenVersion: user.tokenVersion }, process.env.JWT_REFRESH_SECRET!, { expiresIn: "7d" }, ); return { accessToken, refreshToken }; } // WRONG: localStorage (XSS vulnerable) | CORRECT: httpOnly cookie for refresh, memory
- When to Load
- Security Implementation Workflow
- Authentication Patterns
- JWT (JSON Web Tokens)
- JWT Verification Middleware
- Session-Based Auth
- OAuth 2.0 / OIDC Flow Summary
- API Key Authentication
- Authorization Models
- RBAC (Role-Based Access Control)
- Resource-Level Authorization
- Password Handling
- Password Policies
- Secrets Management
What does the security-patterns skill do?
Implements authentication, authorization, encryption, secrets management, and security hardening patterns. Use when designing auth flows, managing secrets, configuring CORS, implementing rate limiting, or when asked about JWT, OAuth, password hashing, API keys, RBAC, or security best practices.
How do I install it?
Run `npx skills add CloudAI-X/claude-workflow-v2 --skill security-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From CloudAI-X/claude-workflow-v2, a repository with 1,397 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
