Install any skill in seconds. Free to start, no credit card required.
Get Started Free →cloudai-x/security-patterns
Implements authentication, authorization, encryption, secrets management, and security hardening patterns.
Passed 19 of 22 test cases with the skill, and 13 of 22 without it.
and 3 more in the full report
6 fixed13 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
I'm building an Express REST API with TypeScript and need to implement authentication. Please write a TypeScript module that handles user login token creation and verification middleware. Show how to generate access and refresh tokens, set the refresh token in a secure HTTP response cookie, and verify incoming requests via middleware. Provide a brief step-by-step checklist tracking the security steps completed.
| Checked | Without skill | With skill |
|---|---|---|
| Includes the Security Implementation Progress checklist tracking workflow steps. | Passed | Passed |
| Pins the HS256 algorithm when verifying tokens with jwt.verify. | Missed | Passed |
The instructions your model reads when the skill loads.
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
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" },
test cases passed, vs 13 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.