Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

api-gateway-patterns

БесплатноБез исполняемых скриптовНе проверен

Comprehensive API gateway patterns skill covering Kong, routing, rate limiting, authentication, load balancing, traffic management, and production gateway…

manutejот manutej★ 64 звезды на GitHub19 установок в других каталогах

Об этом скилле

API Gateway Patterns

A comprehensive skill for implementing production-grade API gateways using Kong and industry best practices. This skill covers advanced routing, authentication, rate limiting, load balancing, traffic management, and observability patterns for microservices architectures.

When to Use This Skill

Use this skill when:

  • Implementing an API gateway for microservices architectures
  • Managing traffic routing, load balancing, and service discovery
  • Implementing authentication and authorization at the gateway level
  • Enforcing rate limiting, quotas, and traffic policies
  • Adding observability, logging, and monitoring to API traffic
  • Implementing request/response transformation and caching
  • Managing API versioning and deprecation strategies
  • Setting up circuit breakers and resilience patterns
  • Configuring multi-environment API deployments
  • Implementing API security policies (CORS, CSRF, WAF)
  • Building developer portals and API documentation
  • Managing API lifecycle from development to production

Core Concepts

API Gateway Architecture

An API gateway acts as a single entry point for client applications, routing requests to appropriate backend services while providing cross-cutting concerns:

  • Reverse Proxy: Routes client requests to backend services
  • API Composition: Aggregates multiple service calls into single responses
  • Protocol Translation: Converts between protocols (HTTP, gRPC, WebSocket)
  • Cross-Cutting Concerns: Authentication, logging, rate limiting, caching
  • Traffic Management: Load balancing, circuit breaking, retries
  • Security: SSL termination, API key validation, OAuth2 flows

Key Gateway Components

  1. Services: Upstream APIs that the gateway proxies to
  2. Routes: Request matching rules that determine service routing
  3. Upstreams: Load balancer configurations for service instances
  4. Plugins: Extensible middleware for features (auth, logging, etc.)
  5. Consumers: API clients with authentication credentials
  6. Certificates: SSL/TLS certificates for secure communication
  7. SNIs: Server Name Indication for multi-domain SSL

Kong Gateway Fundamentals

Kong is a cloud-native, platform-agnostic, scalable API gateway:

Architecture:

  • Control Plane: Admin API for configuration management
  • Data Plane: Proxy layer handling runtime traffic
  • Database: PostgreSQL or Cassandra for config storage (or DB-less mode)
  • Plugin System: Lua-based extensibility for custom logic

Core Entities:

Service (upstream API)
  └── Routes (request matching)
       └── Plugins (features/policies)

Upstream (load balancer)
  └── Targets (service instances)

Consumer (API client)
  └── Credentials (auth keys/tokens)
       └── Plugins (consumer-specific policies)

Routing Patterns

Pattern 1: Path-Based Routing

Route requests based on URL paths to different backend services.

Use Case: Microservices with distinct URL prefixes (e.g., /users, /orders, /products)

Configuration:

# Users Service
service:
  name: users-service
  url: http://users-api:8001

routes:
  - name: users-route
    paths:
      - /users
      - /api/users
    strip_path: true
    methods:
      - GET
      - POST
      - PUT
      - DELETE

# Orders Service
service:
  name: orders-service
  url: http://orders-api:8002

routes:
  - name: orders-route
    paths:
      - /orders
      - /api/orders
    strip_path: true

Key Options:

  • strip_path: true - Removes matched path before proxying (e.g., /users/123 → /123)
  • strip_path: false - Preserves full path (e.g., /users/123 → /users/123)
  • preserve_host: true - Forwards original Host header to upstream

Pattern 2: Header-Based Routing

Route based on HTTP headers for A/B testing, canary deployments, or API versioning.

Use Case: Gradual rollout of new API versions or feature flags

Configuration:

# V1 Service (stable)
service:
  name: api-v1
  url: http://api-v1:8001

routes:
  - name: api-v1-route
    paths:
      - /api
    headers:
      X-API-Version:
        - "1"
        - "1.0"

# V2 Service (beta)
service:
  name: api-v2
  url: http://api-v2:8002

routes:
  - name: api-v2-route
    paths:
      - /api
    headers:
      X-API-Version:
        - "2"
        - "2.0"

# Default route (no version header)
routes:
  - name: api-default
    paths:
      - /api
    # Routes to V1 by default

Advanced Header Routing:

# Mobile vs Web routing
routes:
  - name: mobile-api
    headers:
      User-Agent:
        - ".*Mobile.*"
        - ".*Android.*"
        - ".*iOS.*"
    service: mobile-optimized-api

  - name: web-api
    headers:
      User-Agent:
        - ".*Chrome.*"
        - ".*Firefox.*"
        - ".*Safari.*"
    service: web-api

Pattern 3: Method-Based Routing

Route different HTTP methods to specialized services.

Use Case: CQRS pattern - separate read and write services

**Configuratio

Полный SKILL.md на GitHub

Установить api-gateway-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

EXAMPLES.mdREADME.md

FAQ

Что делает скилл api-gateway-patterns?

Comprehensive API gateway patterns skill covering Kong, routing, rate limiting, authentication, load balancing, traffic management, and production gateway architecture

Как установить скилл api-gateway-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл api-gateway-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить api-gateway-patterns с