jwt_403_debug_expert

jwt_403_debug_expert is a skill for Claude Code, Codex from aiappsgbb/awesome-gbb. It costs 43 tokens per session (626 once invoked), scanned A, original, MIT.

A troubleshooting guide for 401 and 403 access errors at an Azure API gateway. It checks the signed identity information in a JWT, permission scopes, and the intended token audience.

In plain words
What is it for?
Use it to inspect gateway logs, compare token claims with access-contract permissions, and verify that Azure Foundry's managed identity is requesting the right token.
Why use it?
It helps locate whether access is failing because of an expired or incorrect token, missing permission, wrong gateway target, or an unconfigured access agreement.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect gateway logs, compare token claims with access-contract permissions, and verify that Azure Foundry's managed identity is requesting the right token.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aiappsgbb/awesome-gbb/jwt_403_debug_expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aiappsgbb/awesome-gbb --skill jwt_403_debug_expert
Clone the repo
git clone --depth 1 https://github.com/aiappsgbb/awesome-gbb

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jwt_403_debug_expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiappsgbb/awesome-gbb/jwt_403_debug_expert.svg)](https://agentmods.dev/skills/aiappsgbb/awesome-gbb/jwt_403_debug_expert)
Your own site
<a href="https://agentmods.dev/skills/aiappsgbb/awesome-gbb/jwt_403_debug_expert"><img src="https://agentmods.dev/badge/skills/aiappsgbb/awesome-gbb/jwt_403_debug_expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00626
Opus 5 $0.00022 $0.00313
Sonnet 5 $0.00009 $0.00125
Haiku 4.5 $0.00004 $0.00063

Measured 7d ago against content hash 40491ef39983, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

jwt_403_debug_expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/azure-sre-agent/references/plugins/gbb-citadel/skills/jwt_403_debug_expert/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

jwt_403_debug_expert

When to use

The SRE Agent should invoke this skill when:

  • A user reports a 401 or 403 from the Citadel gateway
  • A hosted agent's BYOK call returns "Authentication failed with provider … (HTTP 401)" but the underlying provider is the Citadel-routed AOAI
  • After running citadel-spoke-onboarding, the new spoke can't reach the gateway

Investigation flow

  1. Get the correlation ID of the failing request from the user or from the application's logs.

  2. Pull the request from APIM diagnostics:

    ApiManagementGatewayLogs
    | where TimeGenerated > ago(2h)
    | where CorrelationId == "<id>"
    | project TimeGenerated, OperationId, ApiId, ProductId, ResponseCode, BackendStatusReason, LastErrorReason, RequestHeaders, ResponseHeaders
    
  3. Decode the JWT if present (claims only — NEVER the signature):

    • aud — must match the gateway URL configured in the Access Contract
    • iss — must be https://login.microsoftonline.com/<tenant>/v2.0
    • oid — the calling principal's object ID
    • scp / roles — must include the operation scope (e.g. llm:read)
    • exp — must not be in the past
  4. Match against the Access Contract:

    Symptom Root cause Fix
    aud mismatch Token issued for wrong audience Re-issue token with correct audience
    Missing scope claim Access Contract didn't grant this scope Re-run citadel-spoke-onboarding with the needed scope in gbb_access_contracts
    exp in past Token expired (default ~1h for MI) Refresh; check caller's token-cache TTL
    No Authorization header Caller using product-key path but no key Set Ocp-Apim-Subscription-Key or switch to JWT
    403 with valid JWT Per-product policy denies Check rate-limit-by-key and product subscription state
  5. Output: classification, root cause hypothesis, ONE recommended fix and ONE verification step.

Tools

This skill uses:

  • RunAzCliReadCommands
  • QueryLogAnalyticsByWorkspaceId

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 60 lines · 43 tokens per session scan A 40491ef39983

Subscribe to this mod's changes

jwt_403_debug_expert is a skill published in the GitHub repository aiappsgbb/awesome-gbb (5 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 626 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

printing-press-amend

Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…

mvanhorn/cli-printing-press · 222 tokens

convex-performance-audit

Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.

openclaw/clawhub · 38 tokens

convex-insights

Query a running Convex app's logs + health in natural language (official MCP): failures, slow/expensive functions, deploy causality — scoped, evidence-backed, with a dashboard deep link.

openclaw/clawhub · 45 tokens

ssl-proxy-troubleshoot

Systematic workflow for troubleshooting SSL/proxy connectivity issues with government websites.

HKUDS/OpenSpace · 20 tokens

diagnose-backend-bug

Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…

QoderAI/better-harness · 87 tokens

axiom-networking

Use when implementing or debugging ANY network connection, API call, or socket. Covers URLSession, Network.framework, NetworkConnection, connection diagnostics.

CharlesWiltgen/Axiom · 33 tokens