companion-template-syn…
Pull newest GitHub Actions versions from companion repos back into `.companions/templates/`.…
This document verifies that the `jwx-dev-v4:guide` skill enables an answering agent to navigate the **scattered** documentation surface — jwx core docs, the examples repo, companion-module docs, and the Go module cache — and synthesize them into correct, compiling jwx code.
> /plugin marketplace add lestrrat-go/jwx > /plugin install jwx-dev-v4@jwx-v4
How it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
This document verifies that the `jwx-dev-v4:guide` skill enables an answering agent to navigate the **scattered** documentation surface — jwx core docs, the examples repo, companion-module docs, and the Go module cache — and synthesize them into correct, compiling jwx code.
This document verifies that the `jwx-dev-v4:guide` skill enables an answering agent to navigate the **scattered** documentation surface — jwx core docs, the examples repo, companion-module docs, and the Go module cache — and synthesize them into correct, compiling jwx code.
The skill is intended for end-users who **do not have any of these repos locally checked out**. It must direct agents to the right source for each question and let them combine sources when one source alone is insufficient.
A passing test confirms agents can effectively use:
1. **jwx core narrative docs** — `https://github.com/lestrrat-go/jwx/blob/develop/v4/docs/*.md` 2. **Go module cache** — `$(go env GOMODCACHE)/github.com/lestrrat-go/jwx/v4@<ver>/` (and the same for any companion module the user has imported) 3. **pkg.go.dev** — `https://pkg.go.dev/github.com/lestrrat-go/jwx/v4/...` and `https://pkg.go.dev/github.com/jwx-go/<companion>/v4` 4. **Examples repo (topical index)** — `https://github.com/jwx-go/examples/blob/develop/v4/README.md` and its linked `*_example_test.go` files 5. **Companion-module own READMEs** — `https://github.com/jwx-go/<companion>` (repo root README)
/plugin uninstall jwx-dev-v4@jwx-v4 /plugin install jwx-dev-v4@jwx-v4 /reload-plugins
diff -q agents/plugin/skills/guide/SKILL.md \
~/.claude/plugins/cache/jwx-v4/jwx-dev-v4/<version>/skills/guide/SKILL.mdNo output = match.
Do **not** rely on the current Claude session that authored the skill. Either:
The test agent must have at least: `Skill`, `WebFetch`, `Read`, `Write`, `Edit`, `Bash`. It must not be told the answers; it must be told only the user's question and instructed to use the `jwx-dev-v4:guide` skill.
For every case, the test agent must **construct a runnable Go program from scratch in a temporary directory** and verify it compiles. This is the load-bearing part of the test — text-only answers are easy to bluff; a `go build` either succeeds or doesn't.
Recipe the agent should follow:
WORKDIR="$(mktemp -d)" cd "$WORKDIR" go mod init example.com/jwx-self-test/case-N # write main.go with all required imports + func main() so it links # encoding/json/v2 is behind GOEXPERIMENT=jsonv2 on Go 1.26 and in the standard # library from Go 1.27 on. Probe the toolchain instead of hardcoding a version. if ! GOEXPERIMENT= go list encoding/json/v2 >/dev/null 2>&1; then export GOEXPERIMENT=jsonv2 fi go mod tidy go build ./...
The test passes a case only when `go build` exits 0. A successful build proves:
If `go build` fails, the agent iterates: read the error, consult docs again, fix. Up to three fix attempts per case. Report the trajectory.
The test agent has network access via `WebFetch` and `go mod tidy`. It must not clone any jwx-related repo (jwx core or companions). For cases that exercise the offline path (Case 5), deny network access entirely after the initial `go mod tidy` and verify the agent recovers via the Go module cache for **both jwx core and the relevant companion** when applicable.
Cases are split into two families: **single-source** cases (one doc carries the answer) and **multi-source / index-navigation** cases (the answer requires combining or navigating across sources).
**User question**: "How do I write a custom validator that checks the `scope` claim contains `read:users` and rejects the token otherwise?"
**Why this requires docs**: SKILL.md doesn't cover `jwt.Validator`/`jwt.WithValidator`. `docs/01-jwt.md` "Use a custom validator" is the source.
**Pass criteria**:
**User question**: "Encrypt a single JWE for two recipients, each with a different `kid` in its per-recipient header. Each recipient must independently decrypt the message."
**Why this requires docs**: SKILL.md only shows single-recipient `jwe.Encrypt`. Multi-recipient assembly + `jwe.WithJSON` + `jwe.WithPerRecipientHeaders` live in `docs/03-jwe.md`.
**Pass criteria**:
**User question**: "Echo middleware that pulls a bearer JWT from `Authorization: Bearer …`, verifies against a JWKS endpoint, stashes the verified token on the request context."
**Why this requires docs**: SKILL.md mentions `docs/21-frameworks.md` exists but contains no Echo-specific guidance.
**Pass criteria**:
Go module implementing various JWx (JWA/JWE/JWK/JWS/JWT, otherwise known as JOSE) technologies. If you are using this module in your product or your company, please add your product and/or company name in the Wiki! It really helps keeping up our motivation.
Repo: lestrrat-go/jwx
Pull newest GitHub Actions versions from companion repos back into `.companions/templates/`.…
Extension modules under `github.com/jwx-go/*` (asmbase64, compsig, ed448, es256k, examples,…
<!-- Agent-consumed file. Keep terse, unambiguous, machine-parseable. -->
<!-- Agent-consumed file. Keep terse, unambiguous, machine-parseable. -->
<!-- Agent-consumed file. Keep terse, unambiguous, machine-parseable. -->