One-click install
npx skills add https://github.com/raphaelmansuy/k8s-agent-stack --skill go-api-gateway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-api-gateway
Source: https://github.com/raphaelmansuy/k8s-agent-stack/tree/main/archive/skills/go-api-gateway
Command: npx skills add https://github.com/raphaelmansuy/k8s-agent-stack --skill go-api-gateway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Build production-grade REST API endpoints and routing for AgentStack using Go with Fiber or Chi.

Core Features & Use Cases

  • DTO-first API design: Define request/response structures with validation.
  • Middleware & routing: Centralized auth, logging, rate limiting, and tracing.
  • Use Case: Create a scalable API gateway for agent management and chat endpoints.

Quick Start

Scaffold API routes and run the gateway with standard middleware enabled.

Frequently Asked Questions about go-api-gateway

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

FAQPage Schema
How do I build a REST API gateway in Go with routing and middleware?

An API gateway in Go with routing and middleware handles request distribution, validation, and cross-cutting concerns. Fiber and Chi are popular Go frameworks that provide efficient routing, middleware composition for auth and logging, and request/response handling—enabling you to build production-grade endpoints for agent management and chat services.

What middleware should I implement for a Go API gateway?

Core middleware for a production API gateway includes authentication for access control, logging for observability, rate limiting to prevent abuse, and tracing for debugging distributed requests. These middleware layers intercept requests before they reach your route handlers, centralizing cross-cutting concerns and improving security and maintainability.

Can I use Fiber or Chi to implement SSE streaming in Go APIs?

Both Fiber and Chi support server-sent events (SSE) streaming for real-time, unidirectional communication from server to client. This enables long-lived connections for chat endpoints and live notifications—useful when building agent chat systems or deployment status feeds that require push updates.

How do I validate request and response structures in a Go API gateway?

DTO-first API design uses request/response data transfer objects with validation rules to ensure type safety and data integrity before processing. Go frameworks like Fiber and Chi integrate with validation libraries to automatically check payloads against your defined structures, rejecting malformed requests early.

What's the best way to organize routes and handlers in a production Go API gateway?

Organize routes by logical domain (agents, chat, deployments, health), register them with a central gateway router, and apply middleware composition consistently. This structure makes routing transparent, enables selective middleware application per route group, and scales as you add new endpoints.

Do I need to configure the HTTP server separately when using Fiber or Chi?

Yes. Server configuration includes setting listen addresses, timeouts, and TLS settings. Both Fiber and Chi allow explicit server setup—Fiber through its app config and Chi through the standard http.Server—giving you control over performance tuning and security policies for your API gateway.