go-grpc-gateway

Generate gRPC-Gateway setup with HTTP annotations, CORS, and OpenAPI spec.

Updated Jan 17, 2026
One-click install
npx skills add https://github.com/saddam-eng-tech/ai-agent-skills --skill go-grpc-gateway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-grpc-gateway
Source: https://github.com/saddam-eng-tech/ai-agent-skills/tree/main/go-grpc-gateway
Command: npx skills add https://github.com/saddam-eng-tech/ai-agent-skills --skill go-grpc-gateway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the need to make gRPC services accessible via standard HTTP/REST APIs, simplifying integration with frontends and other services that may not natively support gRPC.

Core Features & Use Cases

  • HTTP Binding Generation: Automatically adds HTTP annotations to .proto files.
  • Gateway Server Creation: Generates a main.go file for a standalone gateway server.
  • Cross-Origin Resource Sharing (CORS): Configures CORS for web accessibility.
  • Authentication Passthrough: Allows forwarding of authentication headers.
  • OpenAPI/Swagger Spec Generation: Creates an OpenAPI specification for documentation and tooling.
  • Use Case: You have a Go gRPC microservice for user management, and you need to expose endpoints like GET /users/{id} and POST /users for a web application to consume. This skill automates the setup of the grpc-gateway to achieve this.

Quick Start

Use the go-grpc-gateway skill to add an HTTP gateway to the attached proto file, forwarding the 'Authorization' header and allowing origins from 'http://localhost:3000'.

Frequently Asked Questions about go-grpc-gateway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose gRPC services over HTTP for a Go microservice?

You expose gRPC services over HTTP by generating a complete grpc-gateway setup that annotates proto files and creates a standalone gateway server. This allows standard HTTP clients to access your gRPC APIs directly without native gRPC support.

How does grpc-gateway generate an OpenAPI spec from proto files?

grpc-gateway generates an OpenAPI spec by automatically adding HTTP annotations to your proto files and translating them into Swagger documentation. This produces an OpenAPI specification for tooling and frontend integration.

Can I configure CORS and authentication passthrough for a gRPC HTTP gateway?

Yes, you can configure CORS and authentication passthrough for a gRPC HTTP gateway. The generated setup allows forwarding of authentication headers like 'Authorization' and configures CORS to allow specific origins for web accessibility.

What is the best way to bridge a gRPC backend with a REST frontend?

The best way to bridge a gRPC backend with a REST frontend is generating a standalone grpc-gateway server in Go. This approach automatically maps HTTP endpoints like GET /users/{id} to your gRPC methods, simplifying integration for web applications.

Do I need to manually write HTTP bindings to expose gRPC APIs?

No, you do not need to manually write HTTP bindings to expose gRPC APIs. The gateway setup automatically adds HTTP annotations to your proto files and generates the required server code, eliminating manual mapping effort.