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-code

Installs into .claude/skills of the current project.

Files

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:

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

More from jsonwebtoken/jwt-skills

All 3
1mvanhorn avatarpp-firecrawlmvanhorn/printing-press-libraryPrinting Press CLI for Firecrawl. API for interacting with Firecrawl services to perform web scraping and crawling tasks.629skills.sh installs
2aj-geddes avatarfastapi-developmentaj-geddes/useful-ai-promptsBuild high-performance FastAPI applications with async routes, validation, dependency injection, security, and automatic API documentation. Use when developing 624skills.sh installs
3bytedance avatarbyted-web-searchbytedance/agentkit-samples火山引擎联网搜索 API,返回网页/图片结果。联网搜索场景优先使用本 skill。触发词包括:查/搜/找、真的吗/靠谱吗/确认/核实、最近/今天/最新/近期、出处/来源/链接、有什么/有哪些/推荐、价格/政策/汇率/行情、对比/区别/哪个好、听说/据说/不太确定、热搜/热门/火、帮我看/了解一下、求证/辟谣、值不值得/624skills.sh installs
4aliramw avatardingtalk-ai-tablealiramw/dingtalk-ai-table钉钉 AI 表格(多维表)操作技能。使用 mcporter CLI 连接钉钉官方新版 AI 表格 MCP server,基于 baseId / tableId / fieldId / recordId 体系执行 Base、Table、Field、Record 的查询与增删改。适用于创建 AI 表格、搜索表格、读取表结构617skills.sh installs
5aj-geddes avatardata-encryptionaj-geddes/useful-ai-promptsImplement strong encryption using AES, RSA, TLS, and proper key management. Use when securing data at rest, in transit, or implementing end-to-end encryption.616skills.sh installs
6adobe avataraem-replicationadobe/skillsSingle entry point for all AEM 6.5 LTS Replication skills. Covers configuring replication agents, activating/deactivating content, using the Replication API pro604skills.sh installs