
Jwt Encode
This does one thing well: it generates signed JWTs from the command line without you needing to spin up a test server or paste secrets into some random website. It picks the best available toolchain (Node's jose library, Python's PyJWT, or raw OpenSSL for HMAC), handles the boilerplate around iat and exp claims, and crucially keeps secrets out of your shell history by using inline environment variables. The security guardrails are sensible, it warns you about unsigned tokens, and it'll generate test RSA or ECDSA keys if you need asymmetric signing. Handy for local development, integration tests, or debugging auth flows when you need a valid token right now.
- skills.sh installs
- 640
- GitHub stars
- 20
- last updated
- Aug 21, 2026
Install
$ npx -y skills add jsonwebtoken/jwt-skills --skill jwt-encode --agent claude-codeInstalls into .claude/skills of the current project.
Files
JWT Encode
Create and sign JWTs for testing and development.
Steps
- Gather inputs: claims/payload, algorithm (default: HS256), secret or key, expiration (default: 1 hour).
- Build header:
{"alg": "HS256", "typ": "JWT"}. Addkidif provided. - Build payload: Always include
iatandexpunless the user opts out. Add user-specified claims. - Sign the token using the best available method (see below).
- 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:
node --input-type=module -e "await import('jose')" 2>/dev/null || npm install -g jose
Then sign the token:
Sponsors
Details
- Repository
- github.com/jsonwebtoken/jwt-skills
- Categories
- Backend & APIs, Testing & QA, DevOps & CI/CD
- First seen
- Jun 3, 2026