api-gateway
Generate API gateway configurations for Kong, Traefik, nginx, and Apache from OpenAPI specs or conversational descriptions.
/skill install api-gatewayapi-gateway
Generate production-ready API gateway configurations for the most popular platforms — Kong, Traefik, nginx, and Apache — directly from OpenAPI specs or plain conversational descriptions. Stop hand-crafting routing rules and let Anvil generate, validate, and optimize your gateway config.
What It Does
api-gateway bridges the gap between API design and infrastructure configuration. Provide it an OpenAPI 3.x spec or describe your routing requirements in plain language, and it will emit ready-to-deploy configuration files with best-practice defaults baked in:
- Rate limiting rules per route and per consumer
- Authentication middleware (JWT, API key, OAuth2, basic auth)
- Load balancing with health checks and circuit breakers
- TLS termination and certificate configuration
- CORS headers with environment-appropriate policies
- Request/response transformation plugins
- Logging and tracing integration (Datadog, Jaeger, Prometheus)
- Canary routing and A/B deployment splits
Installation
anvil skill install api-gateway
Usage
Generate from OpenAPI Spec
/api-gateway generate --spec ./openapi.yaml --platform kong
Describe Your Gateway Conversationally
/api-gateway "Route /api/v1/users to service user-svc:3000 with JWT auth,
rate limit 100 req/min, CORS allow https://app.example.com"
Generate for Multiple Platforms
/api-gateway generate --spec ./openapi.yaml --platform kong,traefik
Validate Existing Config
/api-gateway validate ./kong.yaml
Migrate Between Platforms
/api-gateway migrate --from nginx --to traefik --input ./nginx.conf
Configuration Options
| Option | Description | Default |
|---|---|---|
--platform | Target platform: kong, traefik, nginx, apache | kong |
--spec | Path to OpenAPI 3.x spec | none |
--env | Environment profile: dev, staging, prod | prod |
--auth | Default auth method: jwt, apikey, oauth2, none | none |
--rate-limit | Default rate limit (req/min) | 60 |
--output | Output directory for generated files | ./gateway |
Supported Platforms
- Kong: Declarative config (deck), Admin API format, KIC (Kubernetes Ingress Controller)
- Traefik: Static config, dynamic config, Kubernetes CRDs (IngressRoute)
- nginx: nginx.conf, location blocks, upstream groups, lua plugins
- Apache: VirtualHost blocks, mod_proxy, mod_rewrite, mod_security rules
Requirements
- OpenAPI 3.x spec OR a description of your routing requirements
- Target platform must be specified (defaults to Kong)
Reviews
No reviews yet. Be the first!
Related Skills
Browser DevTools Mastery
Master Chrome DevTools for performance profiling, network analysis, memory debugging, and breakpoints.
TypeScript tRPC APIs
Build end-to-end type-safe APIs with tRPC, routers, procedures, middleware, and React Query integration.
Playwright E2E Testing
Write reliable end-to-end tests with Playwright, use locators, handle auth state, and run in CI.