Communitygithub.com

curiositech/windags-skills

Kong、Nginx、Traefikを使用したAPIゲートウェイとリバースプロキシの設定、ルーティング、認証ミドルウェアを専門に扱います。アクティベーションキーワード: APIゲートウェイ、リバースプロキシ、Kong、Nginx、Traefik、ロードバランサー、Ingress、認証ミドルウェア。対象外: レート制限アルゴリズム(api-rate-limiting-throttling-expertを利用)、サービスメッシュ(service-mesh-microservices-expertを利用)。

windags-skills とは?

このスキルは、APIゲートウェイとリバースプロキシの設定、最適化に特化しています。Kong、Nginx、Traefikの主要テクノロジーをサポートし、ルーティング、認証(APIキー、JWT、mTLS、OAuth2)、レート制限、トラフィック管理を扱います。適切な認証方式やゲートウェイテクノロジーの選択を支援する決定木を提供し、内部サービスからB2B統合、SaaS連携まで様々なトラフィックパターンに対応します。また、ゲートウェイのタイムアウトカスケードや認証バイパスなどの障害モードの診断と修正、実践的な設定例(eコマースAPIゲートウェイ、カナリアデプロイメント)を含み、高品質なゲートウェイ運用を実現します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/api-gateway-reverse-proxy-expert

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

APIゲートウェイ & リバースプロキシエキスパート

APIゲートウェイとリバースプロキシの設定と最適化を行い、ルーティング、認証、レート制限、トラフィック管理を実現します。

決定ポイント

認証方式の選択

トラフィックパターンと要件
├── 内部サービスのみ
│   └── APIキー認証
│       ├── 低複雑性、高速検証
│       └── Kong: key-authプラグイン、Traefik: forwardAuth
├── 顧客向けAPIでセッションが必要な場合
│   └── JWT認証
│       ├── ステートレス、ユーザークレームを含む
│       └── Kong: jwtプラグイン、Nginx: lua-resty-jwt
├── エンタープライズB2B統合
│   └── mTLS認証
│       ├── 証明書ベース、最高のセキュリティ
│       └── Kong: mtls-auth、Nginx: ssl_verify_client
└── サードパーティSaaS統合
    └── OAuth2フロー
        ├── トークン交換、委任認証
        └── Kong: oauth2プラグイン、AWS API Gateway: オーソライザー

ゲートウェイテクノロジーの選択

要件 → 選択
├── プラグインエコシステムとGUIが必要
│   └── Kong Enterprise/OSS
├── Kubernetesネイティブで自動検出あり
│   └── Traefik v3 または Ingress-NGINX
├── 最大性能、最小機能
│   └── Nginx または Envoy
└── クラウド管理、サーバーレススケーリング
    └── AWS API Gateway または Azure Application Gateway

上流ルーティング戦略

サービスアーキテクチャ → ルーティング方法
├── サービスディスカバリ付きマイクロサービス
│   └── 動的上流ターゲット
│       ├── Consul/Eureka統合
│       └── ヘルスチェックベースのロードバランシング
├── 静的バックエンドサービス
│   └── 固定上流プール
│       ├── ラウンドロビンまたは最小接続数
│       └── カナリアデプロイメントのための重み付きルーティング
└── マルチリージョンデプロイメント
    └── 地理的ルーティング
        ├── レイテンシベースまたはGeo-IP
        └── セカンダリリージョンへのフェイルオーバー

障害モード

ゲートウェイタイムアウトカスケード

症状: 負荷時にAPI応答が遅い(10秒以上) 検出: 応答時間が急増する一方、上流サービスは正常なレイテンシを報告 根本原因: ゲートウェイタイムアウトが上流タイムアウトより長く、リクエストキューイングが発生 修正: ゲートウェイ読み取りタイムアウトを上流タイムアウトより短く設定(ゲートウェイ: 30秒、上流: 25秒)

認証バイパス

症状: 未承認のリクエストがバックエンドサービスに到達 検出: バックエンドログに期待される認証ヘッダーがないリクエストが表示される 根本原因: ルートの順序により、許可ルールが認証ルールより先にマッチする 修正: 認証ミドルウェアをグローバルレベルに移動するか、特定のルートを設定の先頭にする

サーキットブレーカーのチャタリング

症状: トラフィックスパイク時に断続的な503エラーが発生 検出: サーキットブレーカーが頻繁に開閉(毎分数回以上) 根本原因: しきい値が敏感すぎるか、ヘルスチェックが誤設定されている 修正: 障害しきい値(5回以上の障害)と回復時間(最低30秒)を調整

SSL証明書の期限切れ

症状: HTTPSハンドシェイクの失敗、ブラウザの証明書警告 検出: SSL証明書チェックで30日以内に期限切れ 根本原因: 更新自動化なしの手動証明書管理 修正: cert-manager(K8s)またはACMEクライアントを使用した自動更新の実装

リソース枯渇

症状: ゲートウェイが接続を受け付けなくなる、メモリ/CPUが100% 検出: 接続拒否エラー、ゲートウェイヘルスチェックの失敗 根本原因: 接続制限がない、またはプラグインのメモリリーク 修正: worker_connections(Nginx)または接続プール制限(Kong)を設定し、ゲートウェイを再起動

実際の例

シナリオ: EコマースAPIゲートウェイのセットアップ

コンテキスト: JWT認証を使用して注文、在庫、支払いを処理するマイクロサービスにKongをデプロイ

ステップ1: ルート定義

# 最初にサービスエンドポイントを特定
services:
  - orders: /api/v1/orders/* → http://orders:8080
  - inventory: /api/v1/inventory/* → http://inventory:8080
  - payments: /api/v1/payments/* → http://payments:8080

ステップ2: 決定木の適用

  • トラフィックパターン: 顧客向けAPI → JWT認証
  • アーキテクチャ: マイクロサービス → 動的上流ターゲット
  • 要件: プラグインエコシステムが必要 → Kongを選択

ステップ3: プラグインの順序

# プラグインを正しい順序で適用
plugins:
  1. cors(認証前)
  2. jwt(認証)
  3. rate-limiting(認証後)
  4. request-transformer(最後)

エキスパート vs 初心者:

  • 初心者のミス: 認証前にレート制限を適用(匿名ユーザーがクォータを消費)
  • エキスパートの手法: 認証を先に行い、認証済みユーザーごとにレート制限
  • 初心者のミス: グローバルCORSポリシーを使用
  • エキスパートの手法: ルートごとに異なるCORS(注文は管理元を許可、支払いはフロントエンドのみに制限)

障害シナリオ: カナリアデプロイメントの失敗

状況: 新しい注文サービスバージョンに20%のトラフィックをデプロイ、500エラーが発生

検出プロセス:

  1. ゲートウェイメトリクスを確認: 500エラー率の急上昇がデプロイ時間と相関
  2. 上流ヘルスチェック: 新しいバージョンがヘルスチェックに失敗
  3. ゲートウェイログ: 上流接続のタイムアウト

ロールバック手順:

# ステップ1: 即時トラフィックシフト
kong:
  routes:
    - service: orders-v1
      weight: 100  # 以前は80
    - service: orders-v2
      weight: 0    # 以前は20

# ステップ2: ロールバックの検証
curl -H "Authorization: Bearer $JWT" \
  https://api.company.com/orders/health

# ステップ3: 障害のある上流を削除
kubectl scale deployment orders-v2 --replicas=0

根本原因分析: 新しいバージョンにデータベース接続プールの設定ミスがあり、負荷時にタイムアウトが発生

品質ゲート

  • すべてのルートに明示的なパスマッチングがある(キャッチオールの/*ルートは使用しない)
  • 認証ミドルウェアがビジネスロジックプラグインの前に設定されている
  • ヘルスチェックが正常な上流に対して5秒以内に2xxを返す
  • サーキットブレーカーのしきい値設定: 60秒ウィンドウで5回の障害、30秒の回復時間
  • TLS証明書が期限切れの30日以上前に自動更新される
  • レート制限がグローバルではなく認証済みユーザーごとに適用されている
  • CORSポリシーがオリジンを必要なドメインのみに制限している
  • ゲートウェイタイムアウト(30秒)が上流タイムアウト(25秒)より短く設定され、カスケードを防止
  • アクセスログにリクエストトレーシングのための相関IDが含まれている
  • ゲートウェイが高可用性のために最低2レプリカでデプロイされている

対象外の境界(NOT-FOR)

このスキルが扱うもの: ゲートウェイ設定、ルーティングルール、認証ミドルウェア、リバースプロキシのセットアップ

対象外:

  • レート制限アルゴリズムの設計 → api-rate-limiting-throttling-expertを利用
  • サービスメッシュデータプレーン設定 → service-mesh-microservices-expertを利用
  • API仕様と設計 → api-architectを利用
  • データベース接続プーリング → database-performance-expertを利用
  • コンテナオーケストレーション → kubernetes-expertまたは docker-expertを利用
  • SSL証明書の生成 → security-infrastructure-expertを利用

委任ルール:

  • カスタムレート制限アルゴリズムの場合: 「レート制限プラグインの設定は行いますが、カスタムアルゴリズムについては api-rate-limiting-throttling-expert を利用してください」
  • サービスディスカバリのセットアップの場合: 「上流ターゲットの設定は行いますが、サービスメッシュのセットアップについては service-mesh-microservices-expert を利用してください」

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

関連スキル