g1joshi/agent-skills/api-gateway
Claude Code and agent skill by g1joshi/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install g1joshi/agent-skills/api-gatewaySKILL.md
The same SKILL.md was published earlier as g1joshi/agent-skills/api-gateway.
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
Core Concepts
Reverse Proxy & Dynamic Upstream Routing
The gateway accepts client requests and transparently forwards them to healthy backend upstream instances using dynamic discovery:
Edge Authentication Offloading (JWT Validation)
Validates incoming bearer tokens and injects verified claims as internal headers, sparing internal microservices from repeating OAuth handshake verification:
Distributed Rate Limiting & Quota Management
Protects downstream clusters from cascading overloads using sliding window or token bucket algorithms backed by Redis:
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.
Request 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):
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
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/architecture/api-gateway/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/g1joshi/agent-skills/api-gateway)