route-tester

Automate validation of authenticated API endpoints in the ActionPhase backend.

1|Updated Nov 7, 2017
One-click install
npx skills add https://github.com/jhouser/actionphase --skill route-tester-jhouser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: route-tester
Source: https://github.com/jhouser/actionphase/tree/main/.claude/skills/route-tester
Command: npx skills add https://github.com/jhouser/actionphase --skill route-tester-jhouser

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, curl.

What problem does it solve?

Manually testing authenticated API endpoints can be cumbersome, especially with JWT tokens and complex request bodies. This skill streamlines the process of testing ActionPhase backend routes, ensuring correct functionality, proper authentication, and accurate data handling, saving developers time and reducing errors.

Core Features & Use Cases

  • Automated Authentication: Uses api-test.sh to handle JWT login and token management for seamless testing.
  • Comprehensive API Testing: Provides patterns for GET, POST, PUT, and DELETE requests, including query parameters and JSON bodies.
  • Debugging & Verification: Guides on debugging common HTTP errors (401, 403, 404, 500) and verifying database changes.
  • Use Case: When developing a new API endpoint, use this skill to quickly log in as a test user, send authenticated curl requests with the correct data, and verify the API's response and any resulting database changes, ensuring the endpoint works as expected before frontend integration.

Quick Start

Ask for the command to log in as a test player and list all games.

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 endpoints with JWT tokens?

Testing authenticated API endpoints involves obtaining a JWT token via login, then including it in the Authorization header of subsequent curl requests. This skill automates token management and provides curl patterns for GET, POST, PUT, and DELETE operations against authenticated routes in Go backends using Chi and JWT middleware.

How do I debug 401 and 403 errors when testing API routes?

401 and 403 errors typically indicate missing, expired, or invalid JWT tokens. This skill guides verification of token lifecycle, correct Authorization header formatting, and token validity to isolate authentication failures from authorization issues during API route testing.

Can I automate testing of multiple API endpoints with a single script?

Yes. This skill provides automated workflows via backend/scripts/api-test.sh that handle login, token extraction with jq, and sequential testing of multiple endpoints (health, games, characters, posts, comments, private messages) across different HTTP methods without manual token management.

What's the best way to verify database changes after API requests?

After sending authenticated curl requests, this skill guides inspection of API responses and cross-verification of resulting database state to confirm the endpoint processed data correctly, catching bugs where requests succeed but data fails to persist or update.

Does this approach work for testing endpoints with query parameters and JSON request bodies?

Yes. This skill covers patterns for constructing curl requests with query parameters, JSON payloads, and proper header handling, applicable to ActionPhase backend endpoints that accept complex input across login, token management, and CRUD operations.