jwt
Skill1 starsChanged 31 days agoMITView on GitHub
JWT and JOSE: verify and issue JWS, JWE and JWK safely. Covers RFC 7515 JWS, RFC 7516 JWE, RFC 7517 JWK, RFC 7518 JWA, RFC 7519 JWT, RFC 8037 OKP keys, the RFC 8725 JWT Best Current Practices and its rfc8725bis update, RFC 9864 fully specified algorithms (Ed25519 instead of EdDSA), the deprecation of none and RSA1_5, RFC 9068 JWT access tokens with the roles, groups and entitlements claims, RFC 7638 JWK thumbprints, the RFC 7800 cnf claim, and the IANA JOSE and JWT claims registries. Use when validating or signing JWTs, choosing alg values, publishing a JWKS, checking typ, kid, iss, aud, exp or nbf, preventing algorithm confusion or alg none attacks, issuing at+jwt access tokens, naming a new claim, or reviewing a JWT library configuration.
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
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 43
Choose algorithms and keys: Prefer ES256 or Ed25519; use HMAC only with a shared secret of at least the hash size.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
JWT and JOSE
The IETF JOSE specifications define signed (JWS), encrypted (JWE) and key (JWK) formats, and JWT (RFC 7519) puts claims inside them. RFC 8725 and its pending update list the ways JWT validation goes wrong. With this skill the agent issues and verifies JWTs, chooses algorithms and keys, and reviews library settings against those rules.
Follow the workflow below step by step. Every rule here comes from a source in Sources, with the section it cites. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: issuer, verifier, or both. For a verifier, which issuers and which kinds of token (access token, ID token, logout token, custom).
- Protection: signed only, or also encrypted.
- Revision: the pinned revisions in Sources, unless the user names another. Drafts apply only at the posture recorded there.
- Sources: when refreshing this skill or when a rule looks out of date, re-read every URL in Sources first, check the IETF datatracker for a published RFC 8725 successor or a published deprecation of
noneandRSA1_5, re-read both IANA registries, and update the pins.
Invariants
- Algorithms come from an allow-list, never from the token. Allow only algorithms chosen for this issuer and this kind of token, compared case-sensitively (RFC 8725 § 3.1; draft-ietf-oauth-rfc8725bis-10 § 3.1).
noneis never accepted by default (RFC 7518 § 3.6).noneandRSA1_5are disabled by default and enabled, if ever, only per object (draft-ietf-jose-deprecate-none-rsa15-06 § 5).- One key, one algorithm. The header
algMUST be consistent with the key found bykid(RFC 8725 § 3.1; rfc8725bis § 3.1). This blocks the RS256-to-HS256 key confusion attack. - The verification key belongs to the issuer named in
iss, or the token is rejected (RFC 8725 § 3.8). audnames the recipient whenever the issuer serves more than one audience; otherwise reject (RFC 7519 § 4.1.3; RFC 8725 § 3.9).expandnbfare enforced, with only a small leeway for clock skew (RFC 7519 § 4.1.4, § 4.1.5).- Each kind of JWT has its own explicit
typand validation rules that reject the other kinds (RFC 8725 § 3.11, § 3.12). Access tokens useat+jwt(RFC 9068 § 2.1). - An unknown
critextension makes the token invalid (RFC 7515 § 4.1.11). kid,jkuandx5uare attacker input. Sanitizekid; never fetchjkuorx5uoutside an allow-list (rfc8725bis § 3.10).- Every layer of a nested JWT is validated (RFC 8725 § 3.3).
- Keys are strong enough. HMAC keys are at least the hash size (RFC 7518 § 3.2) and never passwords (RFC 8725 § 3.5); RSA keys are at least 2048 bits (RFC 7518 § 3.3).
- New deployments use fully specified algorithms, such as
Ed25519rather than the deprecatedEdDSA(RFC 9864 § 2.2, § 4.1.2; rfc8725bis § 3.2).
Workflow
- List issuers and token kinds. For each, write down the issuer identifier, the key source, the expected
typ, the audience and the allowed algorithms. ✓ No verifier accepts "any algorithm the key supports" or "any issuer". - Choose algorithms and keys. Prefer
ES256orEd25519; use HMAC only with a shared secret of at least the hash size. -> references/algorithms-and-keys.md ✓ Every key has exactly onealg, andnone,RSA1_5andEdDSAare not on any new allow-list. - Publish keys as a JWK Set with
kid,alganduseon each key. Distinctkidvalues let verifiers pick the right key during rollover (RFC 7517 § 4.5). -> references/algorithms-and-keys.md ✓ The JWK Set has no private members (d,p,q) and no duplicatekid. - Issue tokens with an explicit
typ, the claims the profile requires, a shortexpand a distinctaudper recipient. -> references/access-tokens.md ✓ An access token carriestyp: at+jwtandiss,exp,aud,sub,client_id,iatandjti. - Verify tokens by running the checklist: format, header, key lookup, cryptography, claims.
-> references/verification.md
✓ Tokens with
alg: none, an HS256 signature made with the RSA public key, a wrongtyp, a wrongaudor a pastexpare each rejected. - Add encryption only when needed, with OAEP or ECDH-ES, no compression unless required, and limits on PBES2 iterations and decompressed size.
-> references/algorithms-and-keys.md
✓ A JWE with
RSA1_5, or with ap2cabove the limit, is rejected. - Name claims from the registry. Reuse registered claims; give new ones a collision-resistant name. -> references/access-tokens.md ✓ Every custom claim is either registered with IANA or a name you control.
Verify before done
- The verifier passes a fixed
algorithmslist, and that list excludesnone. iss,aud,exp,nbfandtypare checked for every token kind.- Keys come from configuration or the issuer's metadata, never from
jku,x5uorjwkin the token. - A test token signed with HS256 using the RSA public key as secret is rejected.
- HMAC secrets are at least as long as the hash output and RSA keys at least 2048 bits.
- Access tokens use
at+jwtand the RFC 9068 § 2.2 claims; roles, groups and entitlements follow RFC 9068 § 2.2.3.1. - Every draft in use carries its pinned revision and posture.
Reference index
references/verification.md: the step-by-step verification checklist, key confusion, claim checks and a TypeScript example withjose.references/algorithms-and-keys.md: the IANA algorithm statuses, RFC 9864, thenoneandRSA1_5deprecation, key strength, JWE limits, JWK members, thumbprints andcnf.references/access-tokens.md: the RFC 9068 access token profile, roles, groups and entitlements, its validation steps, and the IANA claims registry.
Related skills
oauthfor how access tokens are obtained, presented, bound with DPoP or mTLS, and challenged:npx skills add ScaleDockHQ/scaledock-skills --skill oauthopenid-connectfor ID tokens and their validation:npx skills add ScaleDockHQ/scaledock-skills --skill openid-connect
Sources
Status uses the publishing body's own maturity term. Checked is the date the source was last read.
- RFC 7515: JSON Web Signature (JWS): RFC (Proposed Standard), RFC 7515, checked 2026-10-02.
- RFC 7516: JSON Web Encryption (JWE): RFC (Proposed Standard), RFC 7516, checked 2026-10-02.
- RFC 7517: JSON Web Key (JWK): RFC (Proposed Standard), RFC 7517, checked 2026-10-02.
- RFC 7518: JSON Web Algorithms (JWA): RFC (Proposed Standard, updated by RFC 9864), RFC 7518, checked 2026-10-02.
- RFC 7519: JSON Web Token (JWT): RFC (Proposed Standard, updated by RFC 7797 and RFC 8725), RFC 7519, checked 2026-10-02.
- RFC 8037: CFRG Elliptic Curve Diffie-Hellman (ECDH) and Signatures in JOSE: RFC (Proposed Standard, updated by RFC 9864), RFC 8037, checked 2026-10-02.
- RFC 8725: JSON Web Token Best Current Practices: RFC (Best Current Practice), RFC 8725, checked 2026-10-02.
- JSON Web Token Best Current Practices (rfc8725bis): RFC Editor queue, draft-ietf-oauth-rfc8725bis-10 (2026-08-31; intended Best Current Practice, obsoletes RFC 8725; RFC Editor state Blocked), checked 2026-10-02. Draft posture: build, pinned to -10.
- RFC 9864: Fully-Specified Algorithms for JOSE and COSE: RFC (Proposed Standard), RFC 9864, checked 2026-10-02.
- JOSE: Deprecate 'none' and 'RSA1_5': WG draft, draft-ietf-jose-deprecate-none-rsa15-06 (2026-09-25; in IETF Last Call, intended Proposed Standard), checked 2026-10-02. Draft posture: build, pinned to -06.
- RFC 9068: JWT Profile for OAuth 2.0 Access Tokens: RFC (Proposed Standard), RFC 9068, checked 2026-10-02.
- RFC 7643: SCIM Core Schema: RFC (Proposed Standard, updated by RFC 9865 and RFC 9967), RFC 7643, checked 2026-10-02.
- RFC 7638: JSON Web Key (JWK) Thumbprint: RFC (Proposed Standard), RFC 7638, checked 2026-10-02.
- RFC 7800: Proof-of-Possession Key Semantics for JWTs: RFC (Proposed Standard), RFC 7800, checked 2026-10-02.
- RFC 9449: OAuth 2.0 Demonstrating Proof of Possession (DPoP): RFC (Proposed Standard), RFC 9449, checked 2026-10-02.
- RFC 8705: OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens: RFC (Proposed Standard), RFC 8705, checked 2026-10-02.
- RFC 8414: OAuth 2.0 Authorization Server Metadata: RFC (Proposed Standard), RFC 8414, checked 2026-10-02.
- RFC 6750: OAuth 2.0 Bearer Token Usage: RFC (Proposed Standard, updated by RFC 8996 and RFC 9700), RFC 6750, checked 2026-10-02.
- IANA JSON Object Signing and Encryption (JOSE) registries: IANA registry, last updated 2026-09-29, checked 2026-10-02.
- IANA JSON Web Token (JWT) registries: IANA registry, last updated 2026-07-20, checked 2026-10-02.
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- G1Joshi/Agent-Skills★ 15same name
- sunilgentyala/OmniRed★ 5same name
- emre-guler/websec★ 2same name
- Sorcha-Platform/Sorcha★ 2same name
- anurag-azure/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- a2aSkill
- ag-uiSkill
- ap2Skill
- asyncapiSkill
- authzenSkill
- cedarSkill
- cloudeventsSkill
- eu-ai-actSkill
- fapiSkill
- gnapSkill
- mcp-authorizationSkill
- oauthSkill
- ocsfSkill
- openapi-arazzoSkill
- openapi-overlaySkill
- openapiSkill
- openfeatureSkill
- openid4vcSkill
- openid-connectSkill
- openid-federationSkill
- openidSkill
- opentelemetry-genaiSkill
- owasp-agenticSkill
- problem-detailsSkill
- ratelimit-headersSkill
- scaledock-agent-permissionsSkill
- scaledock-enterprise-identitySkill
- scaledock-http-apiSkill
- scaledock-mcp-serverSkill
- scaledock-repo-standardSkill
- scimSkill
- shared-signalsSkill
- spiffeSkill
- standard-schemaSkill
- typespecSkill
- web-bot-authSkill
- webmcpSkill
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.

