jwt-inspector
Skill13 starsChanged 5 months agoMITView on GitHub
Decode and security-audit a JSON Web Token — flag alg=none, missing/excessive expiry, symmetric-alg confusion risk, missing claims — and attempt an offline HMAC secret crack against a wordlist to detect weak signing keys. Use when the user asks to "decode this JWT", "is this token secure?", "audit a JWT", or "check if this token uses a weak secret".
In this repository7 other files it gives its agents.
- cors-auditorSkill
- dependency-checkSkill
- dockerfile-scanSkill
- http-sec-auditSkill
- prompt-injection-testerSkill
- sast-liteSkill
- secret-scannerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Every reported issue fails the build.
- Distinctive: line 61
Run the inspector and read the decoded payload to understand the token.
- Distinctive: line 63
If a secret was cracked, stress that the key is compromised — rotate it and move to an asymmetric algorithm (RS256/ES256) where feasible.
- Distinctive: line 65
Never treat a decoded payload as trusted: decoding ≠ verifying.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
JWT Inspector
Decode and audit JSON Web Tokens with no third-party dependencies. It splits the token, decodes header + payload, evaluates them against a set of security checks, and (for HMAC tokens) tries a fast offline crack of the signing secret against a wordlist.
When to use this skill
- "Decode / inspect this JWT."
- "Is this token configured securely?"
- "Does this JWT use a weak/guessable secret?"
- Auditing auth tokens during a security review.
Checks performed
- alg=none (critical) — unsigned, forgeable token.
- Symmetric alg (HS)* — HMAC verification key == signing secret; HS/RS confusion and brute-force risk.
- Missing
exp/ token never expires; excessively long lifetime. iatin the future, missingnbf, missingiss/aud/sub.- Weak HMAC secret (critical) — cracked from a built-in or supplied wordlist.
How to run it
# Decode + audit
python skills/jwt-inspector/inspector.py "<token>"
# Read token from stdin
echo "<token>" | python skills/jwt-inspector/inspector.py -
# Try cracking the HMAC secret with a custom wordlist
python skills/jwt-inspector/inspector.py "<token>" --secret-list rockyou.txt
# JSON output
python skills/jwt-inspector/inspector.py "<token>" --json
# Only fail CI on high/critical (claim-hygiene notes are LOW)
python skills/jwt-inspector/inspector.py "<token>" --min-severity highExit codes: 0 clean · 1 issues reported · 2 malformed input.
Every reported issue fails the build. The default reports everything down to
info (including exp-past); raise --min-severity to low/medium/high
to filter advisory notes out of both the report and the exit code.
Recommended workflow for Claude
- Run the inspector and read the decoded payload to understand the token.
- Report findings ordered by severity; explain the impact of each.
- If a secret was cracked, stress that the key is compromised — rotate it and move to an asymmetric algorithm (RS256/ES256) where feasible.
- Never treat a decoded payload as trusted: decoding ≠ verifying. Remind the user that signature verification with the correct key is what matters.
Note
Cracking only runs for HMAC algorithms and only against the provided wordlist — it is a weak-key detector, not a brute-forcer. Only inspect tokens you are authorized to handle.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

