# API Gateway agent skills

API Gateway provides agent skills that help your agent complete common
tasks more accurately than it can without them.

Agent skills are a standardized way to give AI agents reusable instructions and
product knowledge. They contain resources such as scripts, reference materials,
and templates that help agents produce consistent, reliable results. For more
information about skills, see [Agent Skills Overview](https://agentskills.io/home).

## Install all API Gateway skills

The four skills hand off tasks to each other. To install all four skills in a
single command, run:

```bash
npx skills add google/skills --skill api-gateway-openapi-spec-authoring --skill api-gateway-backend-security-and-rate-limiting --skill api-gateway-mcp-server --skill api-gateway-troubleshooting
```

You can also install an individual skill using the command in its section.

## The API Gateway OpenAPI spec authoring skill

The API Gateway OpenAPI spec authoring skill, [`api-gateway-openapi-spec-authoring`](https://github.com/google/skills/tree/main/skills/cloud/api-gateway-openapi-spec-authoring),
contains instructions for writing and fixing OpenAPI documents for
API Gateway. The instructions cover tasks such as migrating an
OpenAPI 2.0 document to OpenAPI 3.x, using the API Gateway
extensions, and fixing errors when you create an API config. The skill also
includes a script that checks an OpenAPI document before you create an API
config.

### Install the API Gateway OpenAPI spec authoring skill

To install the `api-gateway-openapi-spec-authoring` skill, run the following command in your
terminal:

```bash
npx skills add google/skills --skill api-gateway-openapi-spec-authoring
```

### API Gateway OpenAPI spec authoring reference files

The skill includes the following reference files:

- [OpenAPI 2.0 to 3.x migration](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-openapi-spec-authoring/references/openapi-2-to-3-migration.md)
- [OpenAPI 3.x extensions and limits](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-openapi-spec-authoring/references/openapi-3-extensions-and-limits.md)
- [API config errors](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-openapi-spec-authoring/references/api-config-errors.md)

## The API Gateway backend security and rate limiting skill

The API Gateway backend security and rate limiting skill,
[`api-gateway-backend-security-and-rate-limiting`](https://github.com/google/skills/tree/main/skills/cloud/api-gateway-backend-security-and-rate-limiting), contains instructions for securing your backend
services and limiting requests. The instructions cover tasks such as requiring
API keys or JSON Web Tokens (JWTs), allowing only your gateway to call your
Cloud Run or Cloud Run functions backend, setting
quotas, and fixing quota errors.

### Install the API Gateway backend security and rate limiting skill

To install the `api-gateway-backend-security-and-rate-limiting` skill, run the following command in your
terminal:

```bash
npx skills add google/skills --skill api-gateway-backend-security-and-rate-limiting
```

### API Gateway backend security and rate limiting reference files

The skill includes the following reference files:

- [Client authentication with API keys and JWTs](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-backend-security-and-rate-limiting/references/client-authentication.md)
- [Backend security and header forwarding](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-backend-security-and-rate-limiting/references/backend-security.md)
- [Quotas and rate limiting](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-backend-security-and-rate-limiting/references/quotas-and-rate-limiting.md)
- [MCP traffic security and quotas](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-backend-security-and-rate-limiting/references/mcp-traffic-security.md)

## The API Gateway MCP server skill

The API Gateway MCP server skill, [`api-gateway-mcp-server`](https://github.com/google/skills/tree/main/skills/cloud/api-gateway-mcp-server), contains
instructions for exposing your REST APIs as tools for AI agents, with your
gateway as a Model Context Protocol (MCP) server. The instructions cover tasks
such as migrating your OpenAPI document to OpenAPI 3.x, choosing which
operations become tools, securing the tools, connecting an agent, and fixing MCP
errors. MCP support in API Gateway is in Preview.

### Install the API Gateway MCP server skill

To install the `api-gateway-mcp-server` skill, run the following command in your
terminal:

```bash
npx skills add google/skills --skill api-gateway-mcp-server
```

### API Gateway MCP server reference files

The skill includes the following reference files:

- [OpenAPI 2.0 to 3.x migration for MCP](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-mcp-server/references/openapi-v2-to-v3-mcp-migration.md)
- [Agent tool optimizer](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-mcp-server/references/openapi-agent-tool-optimizer.md)
- [Agent Development Kit (ADK) and API hub discovery](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-mcp-server/references/adk-and-api-hub-discovery.md)
- [MCP verification, limitations, and troubleshooting](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-mcp-server/references/mcp-limitations-and-troubleshooting.md)

## The API Gateway troubleshooting skill

The API Gateway troubleshooting skill, [`api-gateway-troubleshooting`](https://github.com/google/skills/tree/main/skills/cloud/api-gateway-troubleshooting),
contains instructions for diagnosing why requests through your gateway fail and
fixing them. The instructions cover tasks such as reading your gateway's request
logs, distinguishing gateway errors from backend errors, fixing errors when you
create or update a gateway, checking custom domains and TLS, and preparing the
details for a support case. The skill doesn't change your project until you
approve each change.

### Install the API Gateway troubleshooting skill

To install the `api-gateway-troubleshooting` skill, run the following command
in your terminal:

```bash
npx skills add google/skills --skill api-gateway-troubleshooting
```

### API Gateway troubleshooting reference files

The skill includes the following reference files:

- [Triage and logs](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-troubleshooting/references/triage-and-logs.md)
- [401 and 403 errors](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-troubleshooting/references/auth-errors.md)
- [Routing, timeouts, and CORS](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-troubleshooting/references/backend-routing-and-timeouts.md)
- [API config and gateway errors](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-troubleshooting/references/config-deployment-errors.md)
- [Custom domains, load balancers, and TLS](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-troubleshooting/references/networking-domains-tls.md)
- [Limits and escalation](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-troubleshooting/references/limits-and-escalation.md)

## What's next

- To view the API Gateway OpenAPI spec authoring `SKILL.md` file, see [`SKILL.md` (OpenAPI spec authoring)](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-openapi-spec-authoring/SKILL.md).
- To view the API Gateway backend security and rate limiting `SKILL.md` file, see [`SKILL.md` (backend security and rate limiting)](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-backend-security-and-rate-limiting/SKILL.md).
- To view the API Gateway MCP server `SKILL.md` file, see [`SKILL.md` (MCP server)](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-mcp-server/SKILL.md).
- To view the API Gateway troubleshooting `SKILL.md` file, see [`SKILL.md` (troubleshooting)](https://github.com/google/skills/blob/main/skills/cloud/api-gateway-troubleshooting/SKILL.md).
- To learn more about agent skills, see [Agent Skills Overview](https://agentskills.io/home).
- To view `SKILL.md` files for other Google Cloud products, see [`google/skills`](https://github.com/google/skills#agent-skills).