More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair JWT Verification & Key Rotation

    1

    Repair JWT verification and key-rotation bugs involving algorithm confusion, kid lookup, JWKS caching, issuer/audience validation, stale keys, refresh races, and fail-open error paths.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair JWT Verification & Key Rotation

    Repair JWT Verification & Key Rotation

    Example session with this skill installed

    Our API caches JWKS for an hour. When a new kid appears, many requests refresh at once; if refresh fails, one path retries verification with any cached RSA key. Repair locally with a fake JWKS provider and preserve issuer/audience and clock-skew policy.

    • Read your context and instructions
    • Compiled the repair jwt verification

    Unknown-key handling can degrade into key guessing and refreshes are uncoordinated. The repair keeps explicit algorithm/kid binding, coalesces refresh by keyset generation, never verifies with an unrelated key, and tests rotation, stale cache, refresh failure, concurrent unknown-kid requests, and existing claim checks.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    JWT verification logic often suffers from race conditions during key rotation, inconsistent trust boundaries, or JWKS caching bugs that cause intermittent authorization failures. Developers struggle to fix these issues without accidentally weakening security policies or leaking sensitive data in logs.

    What it does

    • Identifies inconsistencies in token parsing, key selection, and JWKS refresh logic across the codebase.
    • Patches concurrent refresh bugs and ensures state ownership for keys and caches is deterministic.
    • Strictly enforces existing issuer, audience, and clock-skew policies while repairing the underlying implementation.
    • Generates deterministic local fixtures and loopback endpoints for testing key rollover scenarios.
    • Implements redacted observability to track verification failures without logging secrets or customer data.

    Why this beats prompting it yourself

    General prompts often suggest insecure workarounds like widening clock skew or adding arbitrary sleeps to handle async key loading. This skill applies a formal transaction-based approach to state transitions, ensuring that retries and cleanups are bound to the specific generation that triggered them without compromising the security posture.

    Use cases

    • Fixing race conditions where a JWKS refresh fails to update the local cache before a new token arrives.
    • Standardizing JWT validation across multiple microservices using different libraries.
    • Implementing robust error handling for expired or rotated signing keys without exposing internal stack traces.
    • Creating regression tests for edge cases like "kid" header mismatches or malformed JWKS responses.

    Known limitations

    Does not contact production services or read live secrets. Scope is limited to repository-level repairs and local testing fixtures.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Cannot redesign authorization claims policy, accepted algorithms, issuer/audience policy, clock-skew policy, key source, refresh policy, and public errors; cannot verify production infrastructure or prove every runtime, proxy, network, filesystem, or scheduler ordering.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Run on a clean branch with repository files and disposable local fixtures. Review patches and validation before merge. Keep production services, real credentials, customer payloads, and deployment out of scope.

    Listed2 months ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies and patches logic errors in authentication flows, specifically targeting race conditions during key rotation, JWKS caching failures, and common security vulnerabilities like algorithm confusion.

    The skill is optimized for environments using Go and TypeScript, supporting major JWT libraries and framework-specific authentication middleware found in modern microservices.

    Yes, the skill is designed to work with all major LLM-based coding agents; you simply provide the repository context and let the agent apply the repair logic to your specific implementation.

    You receive the specialized logic for identifying JWT bugs, a suite of deterministic testing fixtures for key rollover, and the patterns needed to implement redacted observability for authentication failures.

    No, the skill operates entirely at the repository level to repair source code and create local test mocks, ensuring it never interacts with your live production secrets or JWKS endpoints.

    Unlike general prompts that might suggest insecure 'quick fixes' like ignoring clock skew, this skill enforces strict security policies and uses transaction-based state transitions to ensure thread-safe key updates.

    New in Security