api-endpoint

Enforce standardized Express API endpoint patterns with middleware and Zod validation.

Updated Nov 28, 2025
One-click install
npx skills add https://github.com/SoftSystemsStudio/Soft-Systems-Studio --skill api-endpoint-softsystemsstudio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-endpoint
Source: https://github.com/SoftSystemsStudio/Soft-Systems-Studio/tree/main/.claude/skills/api-endpoint
Command: npx skills add https://github.com/SoftSystemsStudio/Soft-Systems-Studio --skill api-endpoint-softsystemsstudio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a standardized approach to creating Express API endpoints in apps/agent-api, ensuring secure authentication, robust validation, consistent rate limiting, uniform error handling, and centralized logging.

Core Features & Use Cases

  • Middleware-driven endpoint patterns: Enforces a deterministic stack (authentication, validation, rate limiting, error handling, logging) across new endpoints.
  • Schema-driven validation: Uses Zod schemas in /apps/agent-api/src/schemas/ to validate request payloads consistently.
  • Consistent handler patterns: Provides a reliable approach for request handling, error propagation, and structured logging.
  • Use Case: Imagine adding a new /api/v1/users endpoint that requires JWT authentication, validates input, and logs requests in a standardized format.

Quick Start

To start, create a new file in apps/agent-api/src/api/v1/, wire it into the router with requireAuth or requireApiKey, apply validateBody with a Zod schema, and return a standard response.

Frequently Asked Questions about api-endpoint

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

FAQPage Schema
How do I enforce consistent authentication and validation in Express API endpoints?

Enforce consistent Express API endpoint behavior by applying a deterministic middleware stack for authentication, schema-driven validation, rate limiting, error handling, and centralized logging across all versioned routes.

How do I add a new versioned Express route with standardized request validation?

Create a file in your versioned API directory, wire it into the router with authentication middleware, apply request body validation using Zod schemas, and return a standard response to ensure consistent endpoint behavior.

What is the best way to standardize error handling and logging across Express endpoints?

The best way to standardize error handling and logging is to codify uniform handler patterns that propagate errors consistently and generate structured logs, meeting enterprise reliability and observability standards.

Does this approach require specific middleware for JWT authentication in Express?

Yes, endpoint development requires specific authentication middleware such as requireAuth for JWT tokens or requireApiKey to secure routes and enforce standardized access control before processing requests.

Can I use Zod schemas to validate request payloads in Express endpoints?

Yes, you can use Zod schemas located in your schemas directory with the validateBody middleware to consistently validate incoming request payloads before they reach your Express route handlers.

What are the limitations of using standardized middleware patterns for Express API development?

Standardized middleware patterns target specific versioned route structures within an agent-api application, limiting flexibility for endpoints requiring unconventional middleware ordering or non-standard response formats.