agentsclimarketplace

Jwt

Skill a5c-ai/babysitter/library/specializations/web-development/skills/jwt

JWT implementation, token management, refresh patterns, and security.From its SKILL.md

Install
npx -y skills add a5c-ai/babysitter --skill jwt

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.2 KB, 179 tokens by cl100k_base, as published. Nobody here has run it

JWT Skill

Expert assistance for JWT authentication implementation.

Capabilities

  • Generate and verify tokens
  • Implement refresh tokens
  • Handle token storage
  • Configure expiration
  • Secure token handling

Implementation

import jwt from 'jsonwebtoken';

function generateTokens(user: User) {
  const accessToken = jwt.sign(
    { id: user.id, role: user.role },
    process.env.JWT_SECRET!,
    { expiresIn: '15m' }
  );

  const refreshToken = jwt.sign(
    { id: user.id },
    process.env.REFRESH_SECRET!,
    { expiresIn: '7d' }
  );

  return { accessToken, refreshToken };
}

function verifyToken(token: string) {
  return jwt.verify(token, process.env.JWT_SECRET!);
}

Target Processes

  • jwt-authentication
  • auth-implementation
  • api-security

What ships with it: 1 file

325 B alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.