All skills
simota avatar

/gateway

@e307415
by shingo imotasimota/agent-skills85 stars
15

Designing and reviewing APIs: OpenAPI spec generation, versioning strategy, breaking change detection, REST/GraphQL best practices. Use for API design or OpenAPI specs.

Use this Skill: https://skilld.dev/gh/simota/agent-skills/gateway

This session only. Nothing lands on disk.

referenceapi-decision-tree.md

≈609 tokens on demand. Your agent reads this file only when SKILL.md points to it.

API Design Decision Tree

Protocol Selection (2026-05)

Requirement REST (OpenAPI 3.2) GraphQL (Sep 2025 spec) gRPC / ConnectRPC tRPC
Public API Recommended Conditional No (gRPC-Web/Connect for browser) No (TypeScript-only)
Microservices Acceptable No Recommended No
Mobile apps Yes Recommended Yes (gRPC over HTTP/3 in gRPC 1.67+ trims mobile latency 38-42% on 5G/4G) No
Real-time SSE (OpenAPI 3.2 itemSchema) / WebSocket Subscription (graphql-ws or graphql-sse) Server / bidi streaming WebSocket
File transfer Yes (multipart/mixed in OpenAPI 3.2) No Yes No
Browser direct call Yes Yes Connect protocol (Buf, CNCF graduated): same Protobuf, HTTP/1.1 or h2, JSON or binary — no gRPC-Web shim needed Yes (TS only)
Internal TypeScript monorepo Acceptable Acceptable Acceptable Recommended (end-to-end type inference)

Connect protocol (ConnectRPC, connectrpc.com) is the modern alternative to gRPC for browser-reachable Protobuf RPC. It supports all three protocols (gRPC, gRPC-Web, Connect) on a single handler — Bluesky, Dropbox, CrowdStrike, PlanetScale ship it in production. Default to Connect when you want gRPC ergonomics without HTTP/2 trailer requirements or grpc-web's translation proxy.

Selection Flowchart

Q1: Who is the client?
├─ Browser/Mobile → Q2
├─ Internal services (polyglot) → gRPC or ConnectRPC
├─ Internal TS-only mono → tRPC or ConnectRPC-TS
└─ Third party / partner → REST (OpenAPI 3.2)

Q2: Data fetching pattern?
├─ Fixed fields / cacheable → REST + OpenAPI 3.2
├─ Flexible field selection / cross-domain → GraphQL (Federation 2.10+)
└─ Real-time updates → SSE (itemSchema) / WebSocket / GraphQL subscription

GraphQL vs REST Decision Criteria

GraphQL is better REST is better
Fetch multiple resources in one request Simple CRUD operations
Mobile bandwidth is critical Caching is important (CDN, HTTP semantics)
Frontend-driven development API contract via OpenAPI is important
UI changes frequently Stable API contract
Cross-team supergraph (Federation 2.10+) Single owning team
AI agent consumes typed schema (Schema Coordinates stable IDs) AI agent reads llms.txt + OpenAPI 3.2

Source: SKILL.md on GitHub

No alerts13d5 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The skill is a comprehensive API design specialist focusing on OpenAPI, GraphQL, and REST best practices. It provides detailed guidance on versioning, security (OWASP Top 10), and error handling without any malicious code or unsafe operations.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    2/14 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e307415. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/gateway