api-testing

Validate Next.js App Router API endpoints against Zod schemas and security checks.

3|Updated Aug 3, 2025
One-click install
npx skills add https://github.com/CleanExpo/Synthex --skill api-testing-cleanexpo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-testing
Source: https://github.com/CleanExpo/Synthex/tree/main/.claude/skills/api-testing
Command: npx skills add https://github.com/CleanExpo/Synthex --skill api-testing-cleanexpo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures SYNTHEX API endpoints behave correctly, follow declared contracts, and remain secure by detecting schema mismatches, authentication and authorization gaps, misconfigured CORS, missing rate limits, and breaking changes across Next.js API routes.

Core Features & Use Cases

  • Comprehensive Endpoint Validation: Scans app/api routes and exercises supported HTTP methods to verify correct status codes, payload handling, and error responses.
  • Schema and Contract Testing: Validates request and response shapes against Zod schemas and reports expected versus actual types.
  • Security and Operational Checks: Verifies authentication flows, role-based authorization, rate limiting, CORS restrictions, and flags sensitive data leakage or timeouts.
  • Use Case: When a developer updates a route or a shared Zod schema, run this Skill to detect regressions, produce a pass/fail report per endpoint, and generate findings for remediation.

Quick Start

Run the api-testing skill to scan the app/api routes, exercise supported HTTP methods, validate request and response contracts against Zod schemas, and output a pass/fail security and contract report.

Frequently Asked Questions about api-testing

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

FAQPage Schema
How do I validate Next.js API routes against Zod schemas for contract compliance?

Zod schema contract testing validates request and response shapes by exercising supported HTTP methods on app/api routes, reporting expected versus actual types and detecting breaking changes or schema mismatches.

What is the best way to test authentication flows and rate limiting on Next.js App Router endpoints?

Testing authentication flows and rate limiting on Next.js App Router endpoints involves sending automated authenticated and anonymous requests to route handlers, measuring response codes, and verifying role-based authorization and rate limit enforcement.

Can I detect CORS misconfigurations and sensitive data leakage during API endpoint testing?

API endpoint testing detects CORS misconfigurations and sensitive data leakage by scanning app/api routes, exercising HTTP methods, and flagging security gaps, missing rate limits, and operational timeouts in a pass/fail report.

How do I automate regression testing for Next.js API routes after updating a shared Zod schema?

Automating regression testing for Next.js API routes involves running automated requests against updated route handlers, validating response payloads against modified Zod schemas, and generating a pass/fail report for remediation.

Does API endpoint testing with Zod require TypeScript and access to route handlers?

API endpoint testing with Zod requires TypeScript and access to Next.js App Router route handlers to execute automated requests, validate schemas, measure performance timeouts, and verify authentication flows.