Agent skill · google

api-gateway-openapi-spec-authoring

Writes, migrates, and fixes OpenAPI specs for Google Cloud API Gateway. Use when converting an OpenAPI 2.0 (Swagger) spec to OpenAPI 3.x, writing a new OpenAPI 3.x spec, or fixing a failed "gcloud api-gateway api-configs create", such as "extension is only supported in OpenAPI 2.x". Also use when quotas set with x-google-quota are never enforced, or when a backend receives path parameters as query parameters. Don't use for adding or debugging MCP tools (use api-gateway-mcp-server), backend lockdown or HTTP 429 tuning (use api-gateway-backend-security-and-rate-limiting), Cloud Endpoints, Apigee, or GKE Gateway API.

What it needs

About 8k tokens when loaded.

What this skill does

API Gateway OpenAPI Spec Authoring API Gateway accepts API configs in OpenAPI 2.0, 3.0.x, and 3.1.x. The Google extensions in OpenAPI 3.x have a different structure from the OpenAPI 2.0 extensions: A required root x-google-api-management block names the backends. x-google-backend is a string that references one of these backends. The JWT settings move into x-google-auth. The metrics and quotas move into x-google-api-management. Use this skill to migrate an OpenAPI 2.0 spec, write a new OpenAPI 3.x spec, or fix an API config that fails to create. Attribution MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDKMETRICSREQUESTATTRIBUTION="agent-skills/1.0 (skill:api-gateway-openapi-spec-authoring)" and append agent-skills/1.0 (skill:api-gateway-openapi-spec-authoring) to User-Agent headers. Prerequisites 1. Install the tools: Install the Google Cloud CLI. Then update it with gcloud components update. Rationale: an old CLI can fail when it uploads an OpenAPI 3.x API config. Install Python 3.10 or later and PyYAML for the validator script. A JSON spec does not need PyYAML. 2. Authenticate, and select the project, billing, and location: Run gcloud auth login. Select a project with gcloud config set project {projectid}, or create one with gcloud projects create {projectid}. Make sure that an active billing account is linked to {projectid}. API Gateway has a free monthly allowance of API calls, but it still needs an active billing account. For current prices, see API Gateway pricing. Use us-central1 as the default --location for gateway commands. For the other supported regions, see API Gateway deployment model. 3. Enable the required Google Cloud APIs: 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills google/api-gateway-openapi-spec-authoring

View the source on GitHub

Browse the @skills marketplace