route-tester

Test authenticated routes with cookie-based JWT authentication patterns.

5|3|Updated Nov 4, 2025
One-click install
npx skills add https://github.com/PedroGiudice/Claude-Code-Projetos --skill route-tester-pedrogiudice
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: route-tester
Source: https://github.com/PedroGiudice/Claude-Code-Projetos/tree/main/.claude/skills/route-tester
Command: npx skills add https://github.com/PedroGiudice/Claude-Code-Projetos --skill route-tester-pedrogiudice

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides patterns for testing authenticated routes in your project using cookie-based JWT authentication, helping you verify route protection and behavior after changes.

Core Features & Use Cases

  • Recommended test pattern: test-auth-route.js handles authentication complexity automatically.
  • Manual curl patterns: reproduce requests with signed cookies for debugging.
  • Mock authentication (development only): bypass Keycloak for rapid local testing.

Quick Start

  • Basic test: bun run scripts/test-auth-route.js http://localhost:3000/blog-api/api/endpoint
  • POST with data: bun run scripts/test-auth-route.js http://localhost:3000/blog-api/777/submit POST '{"responses":{"4577":"13295"},"submissionID":5,"stepInstanceId":"11"}'
  • Manual curl (from script output): curl -b "refresh_token=<TOKEN>" http://localhost:3000/blog-api/api/endpoint

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 API routes with JWT cookies?

Testing authenticated routes with JWT cookies involves sending signed tokens in request headers or cookies to verify endpoint protection. This Skill automates that process using a test script that handles cookie-based JWT authentication, eliminating manual token setup for each request.

Can I test Keycloak-protected endpoints without running the full auth server locally?

Yes. This Skill includes mock authentication patterns for development that bypass Keycloak entirely, letting you test route behavior and authorization logic rapidly without spinning up the full authentication service.

What's the fastest way to validate route protection after code changes?

Use the included test-auth-route.js script with your endpoint URL—it runs authenticated requests with signed cookies in a single command, showing whether routes reject or allow access as expected.

How do I reproduce an authenticated request manually for debugging?

The test script outputs ready-to-use curl commands with signed refresh tokens embedded, so you can copy-paste them into your terminal to replay requests and inspect responses without rerunning the automated test.

Does this work for POST requests with request body data?

Yes. Pass the HTTP method and JSON payload as arguments to the test script—for example, POST with form submission data—and it sends authenticated requests with both cookies and body content.

What authentication methods does this Skill support?

This Skill supports cookie-based JWT authentication, including tokens from Keycloak or mock authentication for local testing. It validates route access by attaching signed cookies to requests.