route-tester

Test authenticated HTTP routes using cookie-based refresh_token JWTs.

3|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/joshka0/foxctl --skill route-tester-joshka0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: route-tester
Source: https://github.com/joshka0/foxctl/tree/main/docs/knowledge/route-tester
Command: npx skills add https://github.com/joshka0/foxctl --skill route-tester-joshka0

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Route testing becomes slow and error-prone when endpoints require authenticated cookie-based JWTs, especially during debugging of 401/403 failures and verification of request/response behavior.

Core Features & Use Cases

  • Cookie-based JWT authentication for tests: Uses a refresh_token cookie (Keycloak-issued) instead of Bearer headers, matching your real auth flow.
  • One-command route verification: Generates an authenticated request, prints response status/body, and provides a reproducible curl command.
  • Environment-aware options (recommended vs mock): Supports Keycloak-backed testing via test-auth-route.js and offers development-only mock authentication patterns for fast iteration.
  • Use Case: After changing an endpoint, run a POST test with the expected payload, then immediately validate the authenticated response and (optionally) confirm related database effects.

Quick Start

Use the route-tester skill to test an authenticated endpoint by running the provided test-auth-route.js command against your full route URL with the expected HTTP method and JSON body.

Frequently Asked Questions about route-tester

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test authenticated HTTP routes that use cookie-based JWTs?

Testing cookie-based JWT authenticated HTTP routes involves generating a refresh token, signing it with your JWT secret, sending it as an authenticated cookie, and validating the request and response payloads. This Skill automates that exact workflow.

Can I use mock headers for Keycloak route testing during development?

Yes, you can use development-only mock authentication headers for fast iteration during Keycloak route testing. This allows you to bypass the full Keycloak token generation process while still validating your endpoint logic.

What's the best way to debug 401 and 403 failures on API routes requiring cookie authentication?

Debugging 401 and 403 API failures on cookie authenticated routes is best handled by generating a valid refresh token, sending the authenticated cookie request, and reviewing the reported status, body, and reproduction instructions to identify the issue.

Does this route testing approach support different HTTP methods like POST, PUT, and DELETE?

Yes, this route testing approach supports GET, POST, PUT, and DELETE testing scenarios. You can reproduce curl commands, handle query parameters, and validate request and response payloads across your service ports and route prefixes.

How do I generate a Keycloak refresh token for API route validation?

To generate a Keycloak refresh token for API route validation, you use the test-auth-route.js command against your route URL. This generates the token cookie required to authenticate your request and validate the response.

Why does my route test fail when using a Bearer header instead of a cookie JWT?

Route tests fail with Bearer headers when endpoints require a refresh_token cookie for authentication. You must sign a Keycloak-issued token with your configured JWT secret and send it as an authenticated cookie to match the real auth flow.