agentsclimarketplace

Api gateway

Skill G1Joshi/Agent-Skills/skills/architecture/api-gateway

A comprehensive skill catalog for AI agents

Install
npx -y skills add G1Joshi/Agent-Skills --skill api-gateway

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 10 stars10 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

API Gateway pattern for routing. Use for microservices entry.

SKILL.md

2.1 KB, as published. Nobody here has run it

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: Essential to hide the complexity of backend services (Service Discovery).
  • Cross-Cutting Concerns: Centralizing Authentication, SSL Termination, Rate Limiting, and Logging.
  • Protocol Translation: Converting HTTP (Client) to gRPC (Internal).

Core Functionality

Routing

GET /users -> User Service GET /orders -> Order Service

Aggregation (BFF - Backend for Frontend)

Combining results. One request to Gateway -> Calls User Service + Order Service -> Returns combined JSON.

Offloading

  • Auth: Validating JWT tokens at the edge.
  • Cache: Serving static or cached responses.

Common Patterns

Backend for Frontend (BFF)

Creating specific gateways for different clients (e.g., one for Mobile with small payloads, one for Web with rich payloads).

Best Practices

Do:

  • Use mature tools: Kong, Traefik, AWS API Gateway, Nginx.
  • Implement Rate Limiting to prevent DoS.
  • Use Correlation IDs for tracing requests across services.

Don't:

  • Don't put business logic in the Gateway (It's not a service).
  • Don't let it become a Single Point of Failure (High Availability is key).

Troubleshooting

ErrorCauseSolution
502 Bad GatewayUpstream service down or unreachable.Check internal service health and firewall rules.
504 Gateway TimeoutUpstream taking too long.Optimize service or increase timeout (carefully).

References

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.