api-gateway-configuration · secondsky — Claude Code skill: set up API gateways
A skill that walks through API gateway setup for microservices: routing, auth, rate limiting and request transformation.
npx skills add secondsky/claude-skills --skill api-gateway-configuration -a claude-codeWhat api-gateway-configuration does
The skill lays out what an API gateway handles: request routing and load balancing, authentication and authorization, rate limiting, request and response transformation, logging, monitoring and SSL termination. Then it gives ready config examples for four gateways.
Kong gets a YAML file with services, routes and plugins — a per-minute rate limit and JWT. Nginx gets an upstream block with weighted servers, keepalive, proxy headers and a separate location for health checks. AWS API Gateway gets a SAM template with a JWT authorizer backed by Cognito. A best-practices section follows: authenticate at the gateway, apply global rate limits, log requests, health-check backends, cache responses, enforce HTTPS in production and keep backend details out of error responses.
Nothing runs on its own — this is a configuration reference. If your project already has a gateway you are happy with, or you do not run Kong, Nginx, AWS API Gateway or Traefik, there is little here for you.
What it helps with
- route requests across microservices
- put JWT authentication at the gateway layer
- cap how often a service can be called
- write an Nginx upstream with load balancing
- wire a Cognito authorizer into AWS API Gateway
Example prompts for the agent
- configure Kong for the users and orders services with JWT and a 100-per-minute limit
- write an Nginx config with an upstream of two backends and a health check
- add a Cognito authorizer to my SAM API Gateway template
How to install api-gateway-configuration
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill api-gateway-configuration -a claude-code2Manually: put the files in place
~/.claude/skills/api-gateway-configuration/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/api-gateway-configuration/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill api-gateway-configuration -a codex2Manually: put the files in place
.agents/skills/api-gateway-configuration/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill api-gateway-configuration -a cursor2Manually: put the files in place
.cursor/skills/api-gateway-configuration/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install secondsky/claude-skills api-gateway-configuration2Manually: put the files in place
.github/skills/api-gateway-configuration/SKILL.md1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill api-gateway-configuration -a gemini-cli2Platform CLI
gemini skills install https://github.com/secondsky/claude-skills --path plugins/api-gateway-configuration/skills/api-gateway-configurationManually: put the files in place
.devin/skills/api-gateway-configuration/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill api-gateway-configuration -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about api-gateway-configuration
How do I install api-gateway-configuration in Claude?
Run npx skills add secondsky/claude-skills --skill api-gateway-configuration -a claude-code. The skill lands at ~/.claude/skills/api-gateway-configuration/SKILL.md.
What does api-gateway-configuration do?
It provides API gateway config examples for Kong, Nginx and AWS API Gateway covering routes, authentication, rate limiting and request transformation, plus practices like health checks and HTTPS in production.
Which gateways does the skill cover?
The description names Kong, Nginx, AWS API Gateway and Traefik, and the config examples cover Kong, Nginx and AWS API Gateway.
Source text
SKILL.md · MIT
---
name: api-gateway-configuration
description: Configures API gateways for routing, authentication, rate limiting, and request transformation in microservice architectures. Use when setting up Kong, Nginx, AWS API Gateway, or Traefik for centralized API management.
license: MIT
---
# API Gateway Configuration
Design and configure API gateways for microservice architectures.
## Gateway Responsibilities
- Request routing and load balancing
- Authentication and authorization
- Rate limiting and throttling
- Request/response transformation
- Logging and monitoring
- SSL termination
## Kong Configuration (YAML)
```yaml
_format_version: "3.0"
services:
- name: user-service
url: http://user-service:3000
routes:
- name: user-routes
paths: ["/api/users"]
plugins:
- name: rate-limiting
config:
minute: 100
policy: local
- name: jwt
- name: order-service
url: http://order-service:3000
routes:
- name: order-routes
paths: ["/api/orders"]
```
## Nginx Configuration
```nginx
upstream backend {
server backend1:3000 weight=5;
server backend2:3000 weight=5;
keepalive 32;
}
server {
listen 443 ssl;
location /api/ {
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_cache_valid 200 1m;
}
location /health {
return 200 'OK';
}
}
```
## AWS API Gateway (SAM)
```yaml
Resources:
ApiGateway:
Type: AWS::Serverless::Api
Properties:
StageName: prod
Auth:
DefaultAuthorizer: JWTAuthorizer
Authorizers:
JWTAuthorizer:
JwtConfiguration:
issuer: !Sub "https://cognito-idp.${AWS::Region}.amazonaws.com/${UserPoolId}"
```
## Best Practices
- Authenticate at gateway level
- Implement global rate limiting
- Enable request logging
- Use health checks for backends
- Apply response caching strategically
- Never expose backend details in errors
- Enforce HTTPS in production
© secondsky · MIT · secondsky/claude-skills
Similar skills
Everything for Backend and APIs →api-gateway-configuration by other authors comes first.