# API Gateway Specialist

> Deep expertise in API gateways: Kong plugin ecosystems, Traefik middlewares, gateway security, and observability. Use when working with gateway security, gateway observability or when the user mentions gateway security, gateway observability.

- Skill: `opknock/api-gateway-specialist` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/api-gateway-specialist`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/api-gateway-specialist/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/api-gateway-specialist

---


Deep expertise in API gateways: Kong plugin ecosystems, Traefik middlewares, gateway security, and observability.

## Agentic Workflow: Read -> Reason -> Act (api-gateway-specialist)

You are **api-gateway-specialist** (infrastructure) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — infrastructure context for `api-gateway-specialist`
- Domain: Deep expertise in API gateways: Kong plugin ecosystems, Traefik middlewares, gateway security, and observability.
- **gateway-security**: Harden gateways: auth plugins, CORS, request validation, and IP allowlists — `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: ap`
- **gateway-observability**: Enable logging, metrics, and tracing on gateway traffic — `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: ap`
- Check `knowledge` and `prerequisites: kong, traefik, aws-cli`

### 2. Reason — think for `api-gateway-specialist`
- For `gateway-security`: Harden gateways: auth plugins, CORS, request validation, and IP allowlists — decide which checks to run
- For `gateway-observability`: Enable logging, metrics, and tracing on gateway traffic — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `api-gateway-specialist` tools
- Tools: `Glob`, `Grep`, `Read`, `Bash` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `api-gateway-specialist:8b5faf8e`

# API Gateway Specialist

Applies gateway best practices: security, observability, and plugin discipline.

## When to Use
- Gateways need security hardening
- Adding metrics and tracing at the edge
- Choosing between plugin strategies

## Real Commands

```bash
# Security plugins
curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"oauth2"}'
curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"ip-restriction","config":{"allow":["10.0.0.0/8"]}}'

# Observability
curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"prometheus"}'
curl -s http://localhost:9100/metrics | grep -E 'kong_http|kong_request' | head -10
```

## Security Layering
- Edge: IP restrictions, rate limits
- Gateway: OAuth/JWT validation
- Service: fine-grained authorization

## Testing
Attempt unauthenticated and cross-origin requests and verify rejection.

## Best Practices
- Never expose admin API publicly
- Export metrics to the central dashboard

## Capabilities

### gateway-security
Harden gateways: auth plugins, CORS, request validation, and IP allowlists

**Parameters:**
- `route` (string): Route name
- `plugin` (string): Plugin name

**Commands:**
- `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"oauth2"}'`
- `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"cors","config":{"origins":["https://app.example.com"]}}'`
- `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"ip-restriction","config":{"allow":["10.0.0.0/8"]}}'`
- `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"request-validator"}'`
- `curl -s http://localhost:8001/routes/orders/plugins | python -m json.tool`

**Examples:**
- curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"oauth2"}'
- curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"cors","config":{"origins":["https://app.example.com"]}}'
- curl -s http://localhost:8001/routes/orders/plugins | python -m json.tool

### gateway-observability
Enable logging, metrics, and tracing on gateway traffic

**Parameters:**
- `metricsUrl` (string): Prometheus metrics endpoint
- `traceEndpoint` (string): Tracing endpoint

**Commands:**
- `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"http-log","config":{"http_endpoint":"http://elk:8080/logs"}}'`
- `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"prometheus"}'`
- `curl -s http://localhost:9100/metrics | grep -E 'kong_http|kong_request' | head -10`
- `curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"zipkin","config":{"http_endpoint":"http://zipkin:9411/api/v2/spans"}}'`
- `curl -s http://localhost:8001/status | python -m json.tool`

**Examples:**
- curl -s http://localhost:9100/metrics | grep -E 'kong_http|kong_request' | head -10
- curl -s -X POST http://localhost:8001/routes/orders/plugins -H 'Content-Type: application/json' -d '{"name":"zipkin","config":{"http_endpoint":"http://zipkin:9411/api/v2/spans"}}'
- curl -s http://localhost:8001/status | python -m json.tool

## References
- [Kong Plugin Hub](https://docs.konghq.com/hub/)
- [Traefik Middlewares](https://doc.traefik.io/traefik/middlewares/overview/)

