Configure and manage API gateways including Kong, Tyk, AWS API Gateway, and Apigee. Activates when users need help setting up API gateways, rate limiting, authentication, request transformation, or API management.
Enterprise skill for configuring and managing API gateways for microservices architectures.
This skill should be used when:
Select the appropriate API gateway based on requirements:
Kong Gateway (Open Source/Enterprise):
AWS API Gateway:
Tyk:
Apigee (Google Cloud):
# kong.yml - Declarative configuration
_format_version: "3.0"
services:
- name: user-service
url: http://user-service:8080
routes:
- name: user-routes
paths:
- /api/v1/users
methods:
- GET
- POST
strip_path: false
plugins:
- name: rate-limiting
config:
minute: 100
policy: local
- name: jwt
config:
claims_to_verify:
- exp
- name: cors
config:
origins:
- "*"
methods:
- GET
- POST
headers:
- Accept
- Authorization
max_age: 3600
- name: order-service
url: http://order-service:8080
routes:
- name: order-routes
paths:
- /api/v1/orders
plugins:
- name: rate-limiting
config:
minute: 50
- name: request-transformer
config:
add:
headers:
- "X-Gateway:Kong"
# Global plugins
plugins:
- name: prometheus
config:
per_consumer: true
- name: correlation-id
config:
header_name: X-Correlation-ID
generator: uuid
# serverless.yml for AWS API Gateway
provider:
name: aws
runtime: nodejs18.x
apiGateway:
apiKeys:
- name: premium-api-key
value: ${env:API_KEY}
usagePlan:
- premium:
quota:
limit: 5000
period: MONTH
throttle:
burstLimit: 200
rateLimit: 100
resourcePolicy:
- Effect: Allow
Principal: "*"
Action: execute-api:Invoke
Resource:
- execute-api:/*/*/*
functions:
getUsers:
handler: users.getUsers
events:
- http:
path: users
method: get
cors: true
authorizer:
name: jwtAuthorizer
type: request
request:
parameters:
querystrings:
page: false
limit: false
throttling:
maxRequestsPerSecond: 100
maxConcurrentRequests: 50
createUser:
handler: users.createUser
events:
- http:
path: users
method: post
cors: true
authorizer: jwtAuthorizer
# Create JWT consumer
consumers:
- username: mobile-app
jwt_credentials:
- key: mobile-app-key
algorithm: HS256
secret: ${JWT_SECRET}
# Apply JWT plugin to service
services:
- name: protected-service
plugins:
- name: jwt
config:
header_names:
- Authorization
claims_to_verify:
- exp
- nbf
plugins:
- name: oauth2
config:
scopes:
- read
- write
- admin
mandatory_scope: true
enable_authorization_code: true
enable_client_credentials: true
enable_implicit_grant: false
token_expiration: 3600
refresh_token_ttl: 2592000
# Kong - Multiple rate limiting strategies
plugins:
# Per-consumer rate limiting
- name: rate-limiting
consumer: mobile-app
config:
second: 10
minute: 100
hour: 1000
policy: redis
redis:
host: redis-cluster
port: 6379
database: 0
# Advanced rate limiting
- name: rate-limiting-advanced
config:
limit:
- minute: 100
- hour: 1000
window_size:
- 60
- 3600
sync_rate: 10
strategy: cluster
dictionary_name: kong_rate_limiting_counters
# Request transformation
plugins:
- name: request-transformer
config:
add:
headers:
- "X-Request-ID:$(uuid)"
- "X-Forwarded-For:$(client_ip)"
querystring:
- "version:v1"
remove:
headers:
- "Authorization" # Don't pass to backend
replace:
headers:
- "Host:backend-service"
# Response transformation
plugins:
- name: response-transformer
config:
add:
headers:
- "X-Response-Time:$(latency)"
- "X-Gateway:Kong"
remove:
headers:
- "X-Internal-Secret"
replace:
json:
- "$.metadata.source:api-gateway"
# URL path versioning
services:
- name: user-service-v1
url: http://user-service-v1:8080
routes:
- paths:
- /api/v1/users
- name: user-service-v2
url: http://user-service-v2:8080
routes:
- paths:
- /api/v2/users
# Header-based versioning
routes:
- name: versioned-route
paths:
- /api/users
plugins:
- name: request-transformer
config:
add:
headers:
- "X-API-Version:$(header.Accept-Version)"
# Prometheus metrics
plugins:
- name: prometheus
config:
per_consumer: true
status_code_metrics: true
latency_metrics: true
bandwidth_metrics: true
upstream_health_metrics: true
# Logging
plugins:
- name: file-log
config:
path: /var/log/kong/access.log
reopen: true
- name: http-log
config:
http_endpoint: http://log-aggregator:8080/logs
method: POST
content_type: application/json
timeout: 10000
keepalive: 60000
# Datadog integration
plugins:
- name: datadog
config:
host: datadog-agent
port: 8125
metrics:
- name: request_count
stat_type: counter
- name: latency
stat_type: timer
# Kong configuration for e-commerce platform
services:
- name: product-catalog
url: http://catalog-service:8080
routes:
- paths: ["/api/v1/products"]
plugins:
- name: rate-limiting
config:
minute: 1000
- name: cors
- name: jwt
- name: response-cache
config:
strategy: memory
memory:
dictionary_name: kong_cache
- name: shopping-cart
url: http://cart-service:8080
routes:
- paths: ["/api/v1/cart"]
plugins:
- name: rate-limiting
config:
minute: 100
- name: jwt
- name: request-size-limiting
config:
allowed_payload_size: 10
- name: checkout
url: http://checkout-service:8080
routes:
- paths: ["/api/v1/checkout"]
plugins:
- name: rate-limiting
config:
minute: 50
- name: jwt
- name: bot-detection
- name: ip-restriction
config:
allow:
- 10.0.0.0/8
# API Gateway with Lambda integration
functions:
getUserProfile:
handler: handlers/users.getProfile
events:
- http:
path: users/{userId}/profile
method: get
cors:
origin: 'https://app.example.com'
headers:
- Content-Type
- Authorization
authorizer:
arn: arn:aws:lambda:us-east-1:123456789:function:authorizer
resultTtlInSeconds: 300
identitySource: method.request.header.Authorization
request:
parameters:
paths:
userId: true
caching:
enabled: true
ttlInSeconds: 300
dataEncrypted: true
✅ Correct approach:
microservices-orchestrator - Microservices architectureservice-mesh-integrator - Service mesh integrationdistributed-tracing-setup - Request tracing/dependency-graph - Visualize API dependencies/load-test-suite - Test API gateway performance/security-posture - Security assessmententerprise-architect - Architecture designsecurity-architect - Security configurationsre-consultant - SLO/SLI setupAPI Gateway Selection Criteria:
Common Patterns:
Production Checklist:
npx skills add Dexploarer/api-gateway-configurator下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer