360 Secure SkillHub
360 安全技能中心

Jwt Toolkit

零依赖的 JWT 解码与检查工具:用 python3 脚本从命令行参数、文件或标准输入读取令牌,自动去除 Bearer 前缀,输出头部、载荷、算法信息、常见声明标签和过期状态,支持文本与 JSON 输出;不含签名验证或令牌签发。

johnnywang2001
johnnywang2001
热度 83.48
最近更新 2026-05-11 17:31:45
分类:安全依赖:代码执行 / 读写文件应用场景:调试排错 / API 集成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add jwt-toolkit
Metadata
name
jwt-toolkit
description
Decode, inspect, and validate JWT (JSON Web Token) tokens from the command line. Shows header, payload, algorithm, expiry status, and known claim labels. Use when debugging auth tokens, checking if a JWT is expired, inspecting JWT claims, decoding Bearer tokens, or analyzing token structure. Triggers on "decode JWT", "inspect token", "JWT expired", "parse JWT", "check Bearer token", "token claims".

JWT Toolkit

Zero-dependency JWT decoder and inspector. Decodes any JWT token and shows header, payload claims, algorithm info, expiry status, and signature details.

Quick Start

# Decode a JWT token
python3 scripts/jwt_decode.py eyJhbGciOiJIUzI1NiIs...

# Read token from file
python3 scripts/jwt_decode.py --file token.txt

# Read from stdin (pipe from curl, etc.)
echo "eyJ..." | python3 scripts/jwt_decode.py --stdin

# JSON output for scripting
python3 scripts/jwt_decode.py eyJ... --format json

# Also handles "Bearer " prefix automatically
python3 scripts/jwt_decode.py "Bearer eyJhbGciOiJIUzI1NiIs..."

Features

  • Decodes header and payload with human-readable claim labels
  • Shows algorithm details and security warnings (e.g., none algorithm)
  • Checks token expiry with remaining time or time-since-expired
  • Recognizes 20+ standard and common claims (iss, sub, aud, roles, scope, etc.)
  • Strips "Bearer " prefix automatically
  • JSON and text output formats
  • No external dependencies — pure Python stdlib