api-gateway

api-gateway is a skill for Claude Code, Codex from G1Joshi/Agent-Skills. It costs 54 tokens per session (1,271 once invoked), scanned A, original, MIT.

A service placed between apps such as websites or mobile clients and the backend services they call. It routes requests and can combine several service responses into one.

In plain words
What is it for?
Use it as the front door for microservices, to route requests, combine data for a screen, or apply shared request rules.
Why use it?
It hides the complexity of a multi-service backend from clients. It also gives one place for authentication, rate limits, logging, caching, and protocol conversion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it as the front door for microservices, to route requests, combine data for a screen, or apply shared request rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/g1joshi/agent-skills/api-gateway
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add G1Joshi/Agent-Skills --skill api-gateway
Clone the repo
git clone --depth 1 https://github.com/G1Joshi/Agent-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-gateway

README.md
[![agentmods](https://agentmods.dev/badge/skills/g1joshi/agent-skills/api-gateway/github.svg)](https://agentmods.dev/skills/g1joshi/agent-skills/api-gateway)
Your own site
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/api-gateway"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/api-gateway/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-gateway

Your own site · 80×15
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/api-gateway"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/api-gateway.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01271
Opus 5.5 $0.00022 $0.00508
Sonnet 5.5 $0.00011 $0.00254
Haiku 4.5 $0.00005 $0.00127

Measured 24d ago against content hash 349c4769a0b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-gateway scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 24d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/architecture/api-gateway/SKILL.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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: 10

Edge Authentication Offloading (JWT Validation)

Validates incoming bearer tokens and injects verified claims as internal headers, sparing internal microservices from repeating OAuth handshake verification:

Read the full file on GitHub · 166 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 24d ago Changed · +17 lines 349c4769a0b4
  2. 28d ago Changed · +87 lines · +38 tokens per session 3d072cc7d662
  3. 1mo ago First seen · 62 lines · 16 tokens per session scan A e4bb37e073ce

Subscribe to this mod's changes

api-gateway is a skill published in the GitHub repository G1Joshi/Agent-Skills (15 stars, last pushed 24d ago), licensed MIT. It adds 54 tokens to every session and 1,271 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

addyosmani/agent-skills · 49 tokens

api-design

Design stable, versioned, self-documenting APIs. Easy to use correctly, hard to use incorrectly. Apply Hyrum's Law from day one.

DevelopersGlobal/ai-agent-skills · 34 tokens

api-and-interface-design

Guidance for designing stable, clearly documented interfaces between software parts, such as web APIs, GraphQL schemas, modules, and component properties. It covers defining the contract first, limiting accidental dependencies, and planning safe changes.

vinvcn/addyosmani-agent-skills-zh · 51 tokens

deprecation-and-migration

A guide for retiring old code, systems, or interfaces and moving users to replacements. Deprecation means marking something as no longer preferred; migration means switching its users safely.

vinvcn/addyosmani-agent-skills-zh · 77 tokens

awesome-performance-audit

Read-only performance and reliability audit: event loop, backpressure, memory and CPU, timeouts, retries, queues, Core Web Vitals, bundles, with a verdict. Use when something is slow, memory climbs or latency spikes.

khasky/awesome-agent-skills · 52 tokens

awesome-api-design

Designs or reviews an HTTP API's shape before code: resources, versioning, pagination, idempotency, filtering. Use when asked to design an API or an endpoint.

khasky/awesome-agent-skills · 40 tokens