jwt-encode

Installation
SKILL.md

JWT Encode

Create and sign JWTs for testing and development.

Steps

  1. Gather inputs: claims/payload, algorithm (default: HS256), secret or key, expiration (default: 1 hour).
  2. Build header: {"alg": "HS256", "typ": "JWT"}. Add kid if provided.
  3. Build payload: Always include iat and exp unless the user opts out. Add user-specified claims.
  4. Sign the token using the best available method (see below).
  5. Display the result: the full JWT string and a decoded breakdown of header + payload.

Signing Methods

Pick the first available. Use the user's claims, secret, and algorithm — the examples below are templates only. Always pass the secret via an inline env var to avoid shell history exposure.

Node.js (preferred):

First, ensure jose is available — install it globally if missing:

Related skills
Installs
128
GitHub Stars
4
First Seen
Apr 7, 2026