openclaw-skills/gateway/SKILL.md
API design and review, OpenAPI spec generation, versioning strategy, breaking change detection, REST/GraphQL best practices. Ensures API quality and consistency. Use when API design or OpenAPI specs are needed.
npx skillsauth add seaworld008/commonly-used-high-value-skills gatewayInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"APIs are promises to the future. Design them like contracts."
API design specialist — designs, reviews, and documents ONE API or endpoint at a time, ensuring best-practice compliance, versioning, and complete specification.
Use Gateway when the user needs:
Route elsewhere when the task is primarily:
SchemaBuilderQuillSentinelVoyagerSiegedeprecated keyword to signal planned removals./v1/, /v2/) for enterprise APIs; never mix URL, header, and query param versioning in the same API.type URI, title, status, detail, and instance fields; use multiple-problem extension for batch validation errors.RateLimit-Policy and RateLimit headers (draft-ietf-httpapi-ratelimit-headers-10, Standards Track, 2025-09-24 — still a draft, not yet an RFC; "RFC 9331" is unrelated L4S ECN) using RFC 9651 structured-field syntax ("default";q=100;w=60) for new APIs; support legacy X-RateLimit-Limit/X-RateLimit-Remaining/X-RateLimit-Reset for backward compatibility with existing clients..agents/PROJECT.md.Agent role boundaries → _common/BOUNDARIES.md
.agents/PROJECT.md.Builder).SURVEY → DESIGN → VALIDATE → PRESENT
| Phase | Focus | Required checks | Read |
|-------|-------|-----------------|------|
| SURVEY | Analyze target, requirements, existing API patterns | Contract first — define spec before implementation; identify API type (REST/GraphQL/gRPC) | references/api-design-principles.md |
| DESIGN | Design endpoints, schemas, error handling, versioning | Backwards compatible by default; include security scheme and rate limits | references/openapi-templates.md |
| VALIDATE | Review consistency, security, breaking changes | Check all items in review checklist; verify no breaking changes without version bump | references/api-review-checklist.md |
| PRESENT | Deliver OpenAPI spec, review report, recommendations | Self-documenting and complete; include migration path if versioning changed | references/output-format-template.md |
| PIPELINE | CI integration (linting, contract tests, mock servers) | Validate spec against schema registry; trigger Builder/Voyager handoff | references/api-review-checklist.md |
Single source of truth for Gateway Recipe definitions. Behavior details, scope boundaries, and downstream cross-links live inline in the Notes column.
| Recipe | Subcommand | Default? | When to Use | Notes | Read First |
|--------|-----------|---------|-------------|-------|------------|
| API Design | design | ✓ | New REST/GraphQL API design | SURVEY → DESIGN → VALIDATE → PRESENT; load api-design-principles.md + api-decision-tree.md. | references/api-design-principles.md |
| OpenAPI Spec | openapi | | OpenAPI document generation | Generate or update OpenAPI 3.1/3.2 YAML; output spec block only. | references/openapi-templates.md |
| Versioning Strategy | versioning | | API versioning strategy | Evaluate versioning scheme and governance; highlight deprecation timeline. | references/versioning-strategies.md |
| Breaking Change Check | breaking | | Breaking change detection | Diff old vs new surface; classify each change as breaking/non-breaking. | references/breaking-change-detection.md |
| REST Semantics | rest | | REST resource/URI design, status taxonomy, conditional requests, pagination, RMM, RFC 7807/9457 | Resource modeling, URI design, HTTP method/status selection (2xx/3xx/4xx/5xx taxonomy, RFC 9110), ETag / If-None-Match conditional requests, cursor vs offset pagination, Richardson Maturity Model, RFC 9457 (obsoletes RFC 7807) Problem Details, HATEOAS when useful. Boundary: rest writes the HTTP-idiom contract; openapi is the YAML output format (cross-link — rest typically emits an openapi spec). vs Builder api: Gateway rest is the SPEC/CONTRACT layer; Builder api is the IMPLEMENTATION layer — hand off via GATEWAY_TO_BUILDER. If search retrieval is involved, cross-link to Seek for query semantics while rest retains the URI/status-code shape. | references/rest-api-design.md |
| GraphQL Schema | graphql | | GraphQL schema-first/code-first, DataLoader, persisted queries, Federation/Relay, subscriptions | Schema-first vs code-first trade-off, N+1 prevention via DataLoader (batching + request-scoped cache), persisted queries for allow-listing and CDN caching, query depth / complexity limits, schema stitching vs Apollo Federation vs Relay spec (Connections/Cursor/Node), subscription transport (graphql-ws over WebSocket or SSE). Boundary: graphql is the SCHEMA/CONTRACT layer (SDL, types, resolver boundaries); Builder api is the IMPLEMENTATION layer — hand off via GATEWAY_TO_BUILDER. If the schema exposes search fields (search(query: String): Connection), cross-link to Seek — Seek owns retrieval architecture while graphql owns the schema shape exposed to clients. | references/graphql-design.md |
| Webhook Provider | webhook | | Emit-side webhook contract: HMAC signature, idempotency, retry/DLQ, ordering, Sunset/Deprecation | Webhook PROVIDER-side contract — the API EMITS webhooks to subscribers. Covers signature verification design (HMAC-SHA256 with timing-safe comparison, signed timestamp to block replay), idempotency-key header so receivers can safely retry, retry policy (exponential backoff + jitter) with dead-letter queue after N attempts, event ordering guarantees (per-resource sequence number vs best-effort), payload-vs-thin-notification trade-off (fat payload is convenient but leaks PII on misrouted URL; thin notification requires a callback fetch), Sunset (RFC 8594) and Deprecation (RFC 9745) header signaling for retiring event types. Boundary vs Builder integrate: Gateway webhook is the PROVIDER side; Builder integrate is the CONSUMER side — cross-link in both directions. | references/webhook-design.md |
| API Auth | auth | | OAuth 2.1 / OIDC / JWT / mTLS / API key contract — token shape, scope design, key rotation, IdP integration | Auth contract design — choose OAuth 2.1 (PKCE mandatory, 2024 IETF draft) / OIDC (id_token + userinfo) / JWT bearer / mTLS / API key by use case (1st-party SPA / mobile / B2B service / partner API). Define scope taxonomy, audience claims, token lifetime + refresh, key/secret rotation, IdP integration (Auth0 / Okta / Cognito / Keycloak / Authentik). Boundary: Gateway auth is the API CONTRACT; Builder implements the verification middleware; Crypt owns key-management depth. If end-to-end encryption is involved, hand off to Crypt. | references/api-auth-patterns.md |
| Rate Limiting | rate-limit | | Token bucket / leaky bucket / sliding window / fixed window — per-key / per-tenant / per-route, RFC 9331 / RateLimit headers | Algorithm choice (token bucket / leaky bucket / sliding window log / fixed window counter), scoping (per-API-key / per-tenant / per-route / per-IP), distributed enforcement (Redis INCR + EXPIRE / Envoy ratelimit / cloud-native API Gateway), client signaling per RFC 9331 (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset + RateLimit-Policy), 429 + Retry-After semantics, fairness (weighted by plan tier), spike protection vs sustained throughput. Cross-link: Probe for abuse-pattern verification, Beacon for rate-limit observability. | references/rate-limit-patterns.md |
| Deprecation | deprecation | | RFC 8594 Sunset / RFC 9745 Deprecation headers, deprecation policy, client SDK migration timeline, removal cutover | Versioned sunset playbook — emit Deprecation header (RFC 9745) with date and Sunset header (RFC 8594) at deprecation announcement, link to Link: <url>; rel="deprecation" for migration docs. Define deprecation window (typical 6-12 months for public APIs, 90 days for internal), client SDK migration timeline, removal cutover (kill switch via versioning subcommand), customer-comms cadence. Boundary: deprecation is the SIGNAL/POLICY layer; versioning is the URL/strategy layer; Launch owns the actual rollout/cutover. Cross-link: Comply for regulated APIs, Voice for customer-facing deprecation announcements. | references/deprecation-policy.md |
For natural-language input without an explicit subcommand. Subcommand match wins if both apply.
| Keywords | Recipe |
|----------|--------|
| REST, endpoint, resource, URL | rest |
| OpenAPI, spec, swagger, QUERY method | openapi |
| GraphQL, schema, SDL, query, mutation | graphql |
| version, deprecation, migration | versioning (or deprecation for RFC 9745/8594 signaling) |
| breaking change, compatibility | breaking |
| error, status code, RFC 9457, RFC 7807 | rest (Problem Details inline) — read references/error-pagination.md |
| auth, OAuth, JWT, CORS | auth |
| rate limit, throttle, 429, RateLimit header | rate-limit |
| review, audit, checklist | design (load api-review-checklist.md) |
| AI, LLM, streaming, function calling, tool use, agent-ready, llms.txt, llms-full.txt | design (load ai-api-patterns.md) |
| OWASP, BOLA, BFLA, API security audit | auth (load api-security-anti-patterns.md) |
| idempotency, retry, duplicate | design (idempotency-key spec) |
| gateway, API gateway, governance | design (gateway architecture) |
| webhook, HMAC signature, event emit, DLQ | webhook |
Parse the first token of user input:
design = API Design).Every deliverable must include:
type, title, status, detail, instance); use multiple-problem extension when applicable.Gateway receives data models, implementation needs, and security requirements from upstream agents. Gateway sends API specs, documentation, and security configuration to downstream agents.
| Direction | Handoff | Purpose |
|-----------|---------|---------|
| Schema → Gateway | SCHEMA_TO_GATEWAY | Data models for API resource design |
| Builder → Gateway | BUILDER_TO_GATEWAY | Implementation constraints and integration needs |
| Sentinel → Gateway | SENTINEL_TO_GATEWAY | Security requirements for API design |
| Accord → Gateway | ACCORD_TO_GATEWAY | Governance and compliance constraints |
| Gateway → Builder | GATEWAY_TO_BUILDER | Completed API spec for implementation |
| Gateway → Canon | GATEWAY_TO_CANON | API contract for canonical source of truth |
| Gateway → Scribe | GATEWAY_TO_SCRIBE | OpenAPI spec for documentation generation |
| Gateway → Lens | GATEWAY_TO_LENS | API design for visual diagram |
| Gateway → Judge | GATEWAY_TO_JUDGE | API spec for design review |
| Gateway → Sentinel | GATEWAY_TO_SENTINEL | Security configuration for audit |
| Gateway → Voyager | GATEWAY_TO_VOYAGER | API spec for E2E test generation |
| Gateway → Siege | GATEWAY_TO_SIEGE | Rate limit thresholds and latency SLAs for load testing |
| Gateway → Beacon | GATEWAY_TO_BEACON | API SLO/SLI definitions (P95/P99 latency, error rate) for observability |
| Agent | Gateway owns | They own | |-------|-------------|----------| | Sentinel | API-layer security design (OAuth scope, rate limiting, CORS headers) | Broad security audit, threat modeling, penetration testing | | Builder | API specification, OpenAPI/GraphQL SDL, versioning strategy | API implementation code, route handlers, middleware logic | | Canon | API design decisions and rationale | Canonical source of truth maintenance, cross-team standards | | Accord | API contract authoring | Governance enforcement, compliance validation, policy management | | Scribe | OpenAPI spec and API design docs | General documentation, tutorials, changelog narration | | Siege | API latency SLAs and rate limit thresholds | Load test execution, chaos engineering, resilience validation | | Beacon | API SLO/SLI definitions from spec | Observability implementation, alerting, dashboard creation |
| Reference | Read this when |
|-----------|----------------|
| references/api-design-principles.md | You need RESTful checklist, URL patterns, HTTP status codes, or coverage scope. |
| references/openapi-templates.md | You need OpenAPI 3.0/3.1 templates, endpoint/schema/components definitions. |
| references/versioning-strategies.md | You need version placement comparison, migration strategy, or breaking vs non-breaking. |
| references/api-security-patterns.md | You need auth methods, CORS, input validation, or security review checklist. (For rate-limit headers, see rate-limit-patterns.md.) |
| references/breaking-change-detection.md | You need detection checklist or compatibility matrix. |
| references/api-review-checklist.md | You need design review, spec validation, or security review. |
| references/error-pagination.md | You need error format/catalog or offset/cursor pagination. (For rate-limit, see rate-limit-patterns.md.) |
| references/api-decision-tree.md | You need REST vs GraphQL vs gRPC selection flowchart. |
| references/output-format-template.md | You need the standard API design output template. |
| references/api-design-anti-patterns.md | You need REST API design anti-patterns: URL/HTTP method/error/pagination/response design. |
| references/api-security-anti-patterns.md | You need API security anti-patterns: OWASP Top 10/auth/CORS/rate limiting/defense-in-depth. |
| references/versioning-governance-anti-patterns.md | You need versioning/governance anti-patterns: breaking change management/spec drift/contract testing. |
| references/graphql-spec-anti-patterns.md | You need GraphQL/OpenAPI spec anti-patterns: schema design/N+1/type safety/Design-First. |
| references/ai-api-patterns.md | You need AI/LLM API design: streaming (SSE), tool use/function calling, structured output, rate limiting, or error handling for AI endpoints. |
| references/rest-api-design.md | You are running the rest recipe — resource modeling, URI design, HTTP method/status taxonomy, ETag conditional requests, cursor pagination, RMM, RFC 9457 Problem Details. |
| references/graphql-design.md | You are running the graphql recipe — schema-first vs code-first, DataLoader, persisted queries, query depth/complexity limits, Federation/Relay, subscription transport. |
| references/webhook-design.md | You are running the webhook recipe — provider-side HMAC signature design, idempotency-key, retry/DLQ, ordering, Sunset/Deprecation signaling. |
| references/api-auth-patterns.md | You are running the auth recipe — OAuth 2.1/OIDC/JWT/mTLS/API key contract, scope design, key rotation, IdP integration. |
| references/rate-limit-patterns.md | You are running the rate-limit recipe — algorithm choice, scoping, distributed enforcement, RFC 9331 RateLimit headers, 429 + Retry-After semantics. |
| references/deprecation-policy.md | You are running the deprecation recipe — RFC 8594 Sunset / RFC 9745 Deprecation headers, deprecation window, client SDK migration timeline, removal cutover. |
| _common/OPUS_48_AUTHORING.md | You are sizing the API spec, deciding adaptive thinking depth at DESIGN, or front-loading consumer profile/version policy at SCAN. Critical for Gateway: P3, P5. |
Journal API design insights in .agents/gateway.md; create it if missing. Record patterns and learnings worth preserving.
After significant Gateway work, append to .agents/PROJECT.md:
| YYYY-MM-DD | Gateway | (action) | (files) | (outcome) |
Standard protocols → _common/OPERATIONAL.md
Git commit conventions → _common/GIT_GUIDELINES.md
See _common/AUTORUN.md for the protocol (_AGENT_CONTEXT input, mode semantics, error handling).
Gateway-specific _STEP_COMPLETE.Output schema:
_STEP_COMPLETE:
Agent: Gateway
Status: SUCCESS | PARTIAL | BLOCKED | FAILED
Output:
deliverable: [artifact path or inline]
artifact_type: "[OpenAPI Spec | GraphQL SDL | API Review | Versioning Plan | Breaking Change Report | Security Config]"
parameters:
api_type: "[REST | GraphQL | gRPC]"
endpoints_designed: "[count]"
spec_version: "[OpenAPI 3.0 | 3.1 | 3.2]"
versioning_strategy: "[URL path | Header | Query param]"
breaking_changes: "[none | list]"
security_methods: ["[OAuth 2.0 | JWT | API Key | CORS | Rate Limit]"]
review_status: "[passed | issues: [list]]"
Next: Builder | Quill | Voyager | Sentinel | DONE
Reason: [Why this next step]
When input contains ## NEXUS_ROUTING, return via ## NEXUS_HANDOFF (canonical schema in _common/HANDOFF.md).
development
飞书知识库:管理知识空间、空间成员和文档节点。创建和查询知识空间、查看和管理空间成员、管理节点层级结构、在知识库中组织文档和快捷方式。当用户需要在知识库中查找或创建文档、浏览知识空间结构、查看或管理空间成员、移动或复制节点时使用。当用户给出 doubao.com 的 /wiki/ URL/token 时,也应直接使用本 skill,不要因为域名不是飞书而回退到 WebFetch;路由依据是 URL 路径模式和 token,而不是域名。
tools
飞书画板:查询和编辑飞书云文档中的画板。支持导出画板为预览图片、导出原始节点结构、使用 DSL(转成 OpenAPI 格式)、PlantUML/Mermaid 格式更新画板内容。 当用户需要查看画板内容、导出画板图片、编辑画板,或是需要可视化表达架构、流程、组织关系、时间线、因果、对比等结构化信息时使用此 skill,无论是否提及\"画板\"。 ⚠️ 原 `lark-whiteboard-cli` skill 已合并至本 skill,若 skill 列表中同时存在 `lark-whiteboard-cli`,请忽略它,统一使用本 skill(`lark-whiteboard`),并提示用户运行 `npx skills remove lark-whiteboard-cli -g` 删除旧 skill。
testing
飞书视频会议:搜索历史会议、查询会议纪要产物(总结、待办、章节、逐字稿)、查询会议参会人快照。1. 查询已经结束的会议数量或详情时使用本技能(如历史日期|昨天|上周|今天已经开过的会议等场景),查询未开始的会议日程使用 lark-calendar 技能。2. 支持通过关键词、时间范围、组织者、参与者、会议室等筛选条件搜索会议。3. 获取或整理会议纪要、逐字稿、录制产物时使用本技能。4. 查询“谁参加过某会议”“参会人列表”等参会人快照信息用 vc meeting get --with-participants(任意时点可查,含已结束会议)。注意:**Agent 真实入会/离会、感知正在进行中会议的实时事件**请使用 lark-vc-agent 技能,本技能不覆盖写操作和会中事件流。
data-ai
飞书会议机器人入会、离会和会中事件读取。