‹ 首页

api-gateway-configuration

@aj-geddes · 收录于 5 天前 · 上游提交 4 个月前

Configure API gateways for routing, authentication, rate limiting, and request/response transformation. Use when deploying microservices, setting up reverse proxies, or managing API traffic.

适合你,如果需要在微服务架构中管理API流量和安全性

/ 通过 npx 安装 校验哈希
npx oh-my-skill add aj-geddes/useful-ai-prompts/api-gateway-configuration
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- aj-geddes/useful-ai-prompts/api-gateway-configuration
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify aj-geddes/useful-ai-prompts/api-gateway-configuration
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
300GitHub stars
~443最小装载
~1.8K含声明引用
~1.9K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 3f5182c · 表述以原文为准
它做什么

你可以让Claude帮你配置API网关,控制微服务之间的请求路由、用户认证、访问限速,以及修改请求或返回内容。

什么时候触发

当你需要部署微服务、设置反向代理或管理API流量时,可以要求Claude配置API网关。

装好后可以这样说
Claude会生成Kong配置示例
Claude会给出认证插件配置
技能原文 SKILL.md作者撰写 · MIT · 3f5182c

API Gateway Configuration

Table of Contents
  • [Overview](#overview)
  • [When to Use](#when-to-use)
  • [Quick Start](#quick-start)
  • [Reference Guides](#reference-guides)
  • [Best Practices](#best-practices)
Overview

Design and configure API gateways to handle routing, authentication, rate limiting, and request/response transformation for microservice architectures.

When to Use
  • Setting up reverse proxies for microservices
  • Centralizing API authentication
  • Implementing request/response transformation
  • Managing traffic across backend services
  • Rate limiting and quota enforcement
  • API versioning and routing
Quick Start

Minimal working example:

# kong.yml - Kong Gateway configuration
_format_version: "2.1"
_transform: true

services:
  - name: user-service
    url: http://user-service:3000
    routes:
      - name: user-routes
        paths:
          - /api/users
          - /api/profile
    plugins:
      - name: rate-limiting
        config:
          minute: 100
          policy: local
      - name: jwt
        config:
          secret: your-secret-key
          key_claim_name: "sub"
      - name: cors
        config:
          origins:
            - "http://localhost:3000"
// ... (see reference guides for full implementation)
Reference Guides

Detailed implementations in the references/ directory:

| Guide | Contents | |---|---| | [Kong Configuration](references/kong-configuration.md) | Kong Configuration | | [Nginx Configuration](references/nginx-configuration.md) | Nginx Configuration | | [AWS API Gateway Configuration](references/aws-api-gateway-configuration.md) | AWS API Gateway Configuration | | [Traefik Configuration](references/traefik-configuration.md) | Traefik Configuration | | [Node.js Gateway Implementation](references/nodejs-gateway-implementation.md) | Node.js Gateway Implementation |

Best Practices
✅ DO
  • Centralize authentication at gateway level
  • Implement rate limiting globally
  • Add comprehensive logging
  • Use health checks for backends
  • Cache responses when appropriate
  • Implement circuit breakers
  • Monitor gateway metrics
  • Use HTTPS in production
❌ DON'T
  • Expose backend service details
  • Skip request validation
  • Forget to log API usage
  • Use weak authentication
  • Over-cache dynamic data
  • Ignore backend timeouts
  • Skip security headers
  • Expose internal IPs
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。