Jwx Guide V4
lestrrat-go/jwx
Guide for developing Go applications with github.com/lestrrat-go/jwx v4 — parse/sign JWTs, work with JWS/JWE/JWK, pick algorithms, and avoid the common footguns.
Development guide for the jwt JSON Web Token library for Go (github.com/kataras/jwt).
$ npx skills add kataras/jwt --skill jwt -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install kataras/jwt jwt --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/kataras/jwt.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skill/jwt .claude/skills/jwt && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "jwt" agent skill from https://github.com/kataras/jwt/tree/main/skill/jwt into .claude/skills/jwt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jwt", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/kataras/jwt/tree/main/skill/jwtType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add kataras/jwt --skill jwt -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install kataras/jwt jwt --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kataras/jwt.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skill/jwt .agents/skills/jwt && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "jwt" agent skill from https://github.com/kataras/jwt/tree/main/skill/jwt into .agents/skills/jwt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jwt", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add kataras/jwt --skill jwt -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install kataras/jwt jwt --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kataras/jwt.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skill/jwt .cursor/skills/jwt && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "jwt" agent skill from https://github.com/kataras/jwt/tree/main/skill/jwt into .cursor/skills/jwt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jwt", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/kataras/jwt.git --path skill/jwt--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add kataras/jwt --skill jwt -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install kataras/jwt jwt --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kataras/jwt.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skill/jwt .gemini/skills/jwt && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "jwt" agent skill from https://github.com/kataras/jwt/tree/main/skill/jwt into .gemini/skills/jwt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jwt", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install kataras/jwt jwtInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add kataras/jwt --skill jwt -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/kataras/jwt.git skills-src && mkdir -p .github/skills && cp -r skills-src/skill/jwt .github/skills/jwt && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "jwt" agent skill from https://github.com/kataras/jwt/tree/main/skill/jwt into .github/skills/jwt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jwt", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add kataras/jwt --skill jwt -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install kataras/jwt jwt --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kataras/jwt.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skill/jwt .opencode/skills/jwt && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "jwt" agent skill from https://github.com/kataras/jwt/tree/main/skill/jwt into .opencode/skills/jwt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jwt", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
jwtDevelopment guide for the jwt JSON Web Token library for Go (github.com/kataras/jwt).
JWT is an agent skill from kataras/jwt. Development guide for the jwt JSON Web Token library for Go (github.com/kataras/jwt). Use this skill when signing or verifying JWTs, choosing a signing algorithm (HMAC, RSA, RSA-PSS, ECDSA, EdDSA), reading or validating standard or custom claims, setting expiry and clock-skew tolerance, rotating keys with a kid-based registry, fetching or publishing a JWKS, blocklisting (revoking) tokens, encrypting a payload, or extracting a token from an HTTP request.
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/api-map.md`, `references/keys-and-jwks.md` and `references/security.md`).
It sits in Backend & APIs, covering Authentication. It works with GitHub and Go. The repository describes itself as: A fast and simple JWT implementation with Generics support for Go 1.27+. The licence is MIT.
Read from SKILL.md and the folder at commit 87a77ff. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are go).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
JWT loads about 1.5k tokens when it runs, and up to ~19k if it reads all its reference files. Until then it costs about 115 tokens; SKILL.md has 647 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from kataras/jwt at commit 87a77ff, republished under its MIT licence (© kataras). 647 words, ~1,487 tokens.
.claude/skills/jwt/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.github.com/kataras/jwt is a zero-dependency JWT and JWKS implementation for Go, built on RFC 7519 (JWT) and RFC 7518 (JWA). It signs and verifies compact tokens over HMAC, RSA, RSA-PSS, ECDSA and EdDSA, decodes claims into a struct or a map, and ships the pieces most applications end up writing by hand: a kid-based multi-key registry, JWKS fetch and publish, a server-side blocklist, standard-claims validators, and HTTP token extraction.
package main
import (
"fmt"
"time"
"github.com/kataras/jwt"
)
// Generate this once and keep it outside source control (env var, secret manager).
// 32 bytes is the RFC 7518 minimum for HS256.
var sharedKey = jwt.MustGenerateRandom(32)
type FooClaims struct {
Foo string `json:"foo"`
}
func main() {
token, err := jwt.Sign(jwt.HS256, sharedKey, FooClaims{Foo: "bar"}, jwt.MaxAge(15*time.Minute))
if err != nil {
panic(err)
}
verifiedToken, err := jwt.Verify(jwt.HS256, sharedKey, token)
if err != nil {
panic(err)
}
var claims FooClaims
if err = verifiedToken.Claims(&claims); err != nil {
panic(err)
}
fmt.Println(claims.Foo) // bar
}github.com/kataras/jwtThe algorithm is always a parameter you supply to Sign and Verify, never a value read out of the token. Verify checks the token's header against the literal algorithm name you passed; passing a fixed algorithm you chose (never one derived from client input) is what stops the classic RS256/HS256 algorithm-confusion attack. A custom HeaderValidator that trusts the token's own "alg" field reopens it.
HMAC key length is not checked. Sign and Verify for HS256/384/512 only type-assert the key to []byte; a two-byte secret works and is brute-forceable. RFC 7518 wants 32/48/64 bytes; use jwt.MustGenerateRandom(32) (or larger) rather than a short literal.
jwt.NONE is a real, selectable algorithm that produces and accepts an empty signature. Never let request input choose the alg argument to Verify. Enrich and UnverifiedToken.Enrich refuse it explicitly, but Sign and Verify do not stop you from passing it yourself.
Claims' expiry field is named Expiry (JSON "exp"), not ExpiresAt. ExpiresAt() is a method that reads Expiry as a time.Time. jwt.Claims{ExpiresAt: ...} does not compile; Claims has no such field.
TokenValidator order is significant. Verify runs validators in order and stops at the first one that returns a non-nil error; a validator meant to rescue an error (Skew, Future) has to be listed before any stricter validator (Expected, RequireExpiry, your own), or the stricter one already saw the unrescued error and returned before the rescuer ran.
Keys, the kid-based registry, is not safe for concurrent writes. Register every key during startup, before any goroutine calls Verify/SignToken/VerifyToken concurrently.
Blocklist.InvalidateToken keys on the token's "jti" claim. A token with no "jti" falls back to using the whole raw token, signature included, as the map key, so blocklisting it pins a full bearer credential in memory until expiry. Give any token you might revoke a "jti".
Verifying a token against a fetched JWKS checks the signature only. It does not check that the token was issued to your application rather than some other client of the same identity provider; add jwt.Expected{Issuer: ..., Audience: ...} yourself, or use jwt.NewCognitoKeySet for AWS Cognito, which returns one already populated. Prefer jwt.KeySet (NewRemoteKeySet/NewCognitoKeySet) over calling FetchPublicKeys/FetchJWKS yourself on a timer; it already handles background refresh, rate-limited refresh on an unrecognized kid, and safe concurrent reads.
None of the exported symbols' doc comments are compiled or tested: this package has no func Example* tests, so a code sample inside a doc comment (including in doc.go, which is prose, not code) is illustrative, not verified. Do not assert that a symbol exists or has a given signature without checking the .go source yourself. When a reference document below disagrees with the source, the source wins and the document is a bug.
Load the one that matches the task; each is self-contained.
| Reference | Load it when |
|---|---|
| api-map.md | Writing code against the library and you need the real signature of an exported symbol, grouped by task |
| security.md | Choosing an algorithm, sizing a key, reviewing algorithm-confusion/none/expiry-skew risk, or checking what Verify does and does not validate for you |
| keys-and-jwks.md | Managing more than one signing key, rotating keys by kid, fetching or publishing a JWKS, or verifying tokens from Auth0, AWS Cognito, Google or Microsoft |
| validators.md | Composing TokenValidators, using Blocklist/Expected/Leeway/Skew/RequireExpiry, or mapping a verification error to an HTTP response with Classify |
| testing.md | Writing or running a test, overriding jwt.Clock, or understanding the -tags safe build |
© kataras, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in skill/jwt of kataras/jwt.
Open the folder on GitHubat commit 87a77ff
JWT next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| JWT this skillkataras/jwt | 212 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Jwx Guide V4lestrrat-go/jwx | 2.4k | — | ~5.3k | Automated safety check: Pass | MIT | |
| Jwx Companion Bulklestrrat-go/jwx | 2.4k | — | ~1.9k | Automated safety check: Pass | MIT | |
| GitHub OAuth Nango IntegrationAgentWorkforce/relay | 866 | 1 repos | ~3.4k | Automated safety check: Pass | Apache-2.0 | |
| Auth Setupbutterbase-ai/butterbase-skills | 534 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Apikerhodgef/apiker | 127 | — | ~1.4k | Automated safety check: Pass | MIT |
lestrrat-go/jwx
Guide for developing Go applications with github.com/lestrrat-go/jwx v4 — parse/sign JWTs, work with JWS/JWE/JWK, pick algorithms, and avoid the common footguns.
lestrrat-go/jwx
Apply bulk operations across all jwx companion modules. An agent skill from lestrrat-go/jwx.
AgentWorkforce/relay
A skill your agent uses when implementing GitHub OAuth + GitHub App authentication with Nango - provides two-connection pattern for user login and repo access with webhook handling
butterbase-ai/butterbase-skills
A skill your agent uses when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys
hodgef/apiker
Develop, review, and extend the Apiker library — a framework for building serverless REST APIs on Cloudflare Workers + Durable Objects.
context-labs/whip
Golang OpenAPI/Swagger docs with swaggo/swag — annotations (@Summary, @Param, @Success, @Router, @Security), swag init, framework integrations (gin, echo, fiber, chi), security definitions, struct…
kataras/jwt
A skill your agent uses when writing or editing any prose in this repository - the book's preface, its chapters and epilogue, the brand kit notes, the agent skill documents, the changelog, and the…
Categories
Development guide for the jwt JSON Web Token library for Go (github.com/kataras/jwt). JWT is an agent skill from kataras/jwt.com/kataras/jwt).
JWT fits situations like: choosing a signing algorithm (HMAC; validating standard; setting expiry and clock-skew tolerance; rotating keys with a kid-based registry.
Run `npx skills add kataras/jwt --skill jwt -a claude-code`. Or copy the skill folder (skill/jwt in kataras/jwt) into .claude/skills/jwt in your project. Claude Code loads it when a task matches its description.
Run `npx skills add kataras/jwt --skill jwt -a codex`. Or copy the skill folder (skill/jwt in kataras/jwt) into .agents/skills/jwt in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kataras/jwt --skill jwt -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/jwt, .gemini/skills/jwt, .github/skills/jwt and .opencode/skills/jwt in your project.
SKILL.md names no scripts, command-line tools or credentials: JWT is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
JWT is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with JWT: Jwx Guide V4 (lestrrat-go/jwx, 2.4k stars), Jwx Companion Bulk (lestrrat-go/jwx, 2.4k stars), GitHub OAuth Nango Integration (AgentWorkforce/relay, 866 stars) and Auth Setup (butterbase-ai/butterbase-skills, 534 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
kataras (a GitHub user) maintains it in kataras/jwt, which has 212 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 13, 2026.
Source: kataras/jwt on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.