api-gateway
Skill15 starsChanged 42 days agoMITView on GitHub
Expert API Gateway architecture assistance covering reverse proxies, request routing, rate limiting, authentication offloading, and SSL termination. Use when designing API gateways, configuring Kong/Envoy/Traefik, securing microservice entrypoints, or managing edge routing.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Nov 4, 2026
- weininghui/skillstheir own version, first seen Oct 30, 2026
- TheBeardedBearSAS/claude-crafttheir own version, first seen Oct 29, 2026
- dahoai/api-gateway-skilltheir own version, first seen Oct 17, 2026
- awslabs/agent-pluginstheir own version, first seen Oct 13, 2026
- itsmostafa/aws-agent-skillstheir own version, first seen Sep 15, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- itsmostafa/aws-agent-skills★ 1.2ksame name
- awslabs/agent-plugins★ 918same name
- TheBeardedBearSAS/claude-craft★ 108same name
- zhouguoqing/QianYuan.AIAgenticFramework★ 35same name
- maton-ai/api-gateway-skill★ 33same name
- opencue/cuecards★ 6same name
- Cure-Consulting-Group/ProductEngineeringSkills★ 3same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- weininghui/skills★ 1same name
- dahoai/api-gateway-skill★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- service-meshSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 147
Use Canary Deployments: Route small percentages (5-10%) of traffic to canary versions via gateway weight configurations.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Gateway
An API Gateway sits between clients (Mobile, Web) and services. It acts as a reverse proxy, accepting all API calls, aggregating the various services required to fulfill them, and returning the appropriate result.
When to Use
- Microservices Perimeter Security: Centralizing authentication, rate limiting, and TLS termination before routing to private internal services.
- Edge Request Routing & Transformation: Rewriting URLs, transforming headers, and routing traffic dynamically to versioned upstream clusters.
- Cross-Cutting Policy Enforcement: Implementing uniform CORS, payload size limits, and audit logging across heterogeneous backend services.
- API Modernization: Facading legacy enterprise backends with modern REST/JSON or GraphQL interfaces without modifying existing codebases.
Quick Start
# Minimal Traefik / Envoy style API gateway routing configuration
http:
routers:
api-router:
rule: "PathPrefix(`/api/v1`)"
service: api-service
middlewares:
- rate-limit
- auth-jwt
services:
api-service:
loadBalancer:
servers:
- url: "http://user-service:8080"
- url: "http://order-service:8081"Core Concepts
Reverse Proxy & Dynamic Upstream Routing
The gateway accepts client requests and transparently forwards them to healthy backend upstream instances using dynamic discovery:
# Envoy Gateway HTTPRoute configuration
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: billing-service-route
spec:
parentRefs:
- name: public-gateway
rules:
- matches:
- path: { type: PathPrefix, value: /api/v1/billing }
backendRefs:
- name: billing-svc
port: 8080
weight: 90
- name: billing-canary-svc
port: 8080
weight: 10Edge Authentication Offloading (JWT Validation)
Validates incoming bearer tokens and injects verified claims as internal headers, sparing internal microservices from repeating OAuth handshake verification:
# Kong / Traefik JWT Verification Plugin
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: jwt-auth-validator
plugin: jwt
config:
claims_to_verify:
- exp
key_claim_name: issDistributed Rate Limiting & Quota Management
Protects downstream clusters from cascading overloads using sliding window or token bucket algorithms backed by Redis:
// Fastify / Express Gateway sliding window limiter
import rateLimit from "@fastify/rate-limit";
await fastify.register(rateLimit, {
max: 100,
timeWindow: "1 minute",
redis: redisClient,
keyGenerator: (req) => (req.headers["x-api-key"] as string) || req.ip,
});Common Patterns
Rate Limiting and Token Bucket Filter
Problem: Public endpoints are vulnerable to DoS attacks and noisy-neighbor quota exhaustion.
Solution: Enforce rate limiting at gateway layer before requests reach downstream services.
# Envoy Gateway rate limit configuration
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: RateLimitFilter
metadata:
name: global-api-rate-limit
spec:
rules:
- clientSelectors:
- headers:
- name: "X-API-Key"
limit:
requests: 100
unit: MinuteRequest Decoupling and Token Exchange
Problem: Downstream microservices shouldn't handle public OAuth token exchanges and TLS termination.
Solution:
Gateway validates public JWT and attaches internal user headers (X-User-Id, X-User-Roles):
# Kong request-transformer plugin: attaches internal headers after validating JWT
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: token-exchange-transformer
plugin: request-transformer
config:
add:
headers:
- "X-User-Id:$(jwt_claims.sub)"
- "X-User-Roles:$(jwt_claims.roles)"Best Practices
Do:
- Terminate TLS at the Edge: Free downstream microservices from CPU-intensive cryptographic handshakes.
- Propagate Distributed Tracing Headers: Forward
traceparent(W3C standard) to correlate end-to-end logs across microservice hops. - Implement Health Checks & Timeouts: Enforce aggressive connection and read timeouts on upstream routes to prevent gateway thread exhaustion.
- Use Canary Deployments: Route small percentages (5-10%) of traffic to canary versions via gateway weight configurations.
Don't:
- Embed heavy business logic in the Gateway: Keep the gateway thin; do not perform database queries or domain computations at the edge.
- Expose raw internal errors to clients: Sanitize upstream 500 stack traces and return RFC 7807
ProblemDetailsJSON. - Ignore DDoS protection: Pair the software API gateway with a cloud CDN / WAF (Cloudflare, AWS CloudFront/Shield).
Troubleshooting
| Error | Cause | Solution |
502 Bad Gateway | Upstream service down or unreachable. | Check internal service health and firewall rules. |
504 Gateway Timeout | Upstream taking too long. | Optimize service or increase timeout (carefully). |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

