go-project-proto

Configure buf-based protobuf code generation for Go gRPC services.

Updated Jun 4, 2025
One-click install
npx skills add https://github.com/pixb/pixai --skill go-project-proto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-project-proto
Source: https://github.com/pixb/pixai/tree/main/skills/go-project-proto
Command: npx skills add https://github.com/pixb/pixai --skill go-project-proto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the manual, error-prone setup for Protocol Buffers and code generation in Go-based gRPC projects by standardizing buf configurations.

Core Features & Use Cases

  • Buf-based code generation for Go, gRPC, and Connect, including plugins and imports.
  • Consistent project scaffolding with proto/api structure and generated outputs.
  • Use Case: When starting a new microservice, generate all necessary code from proto definitions and automatically configure REST gateway stubs.

Quick Start

To initialize and generate Go gRPC code from proto files using buf, create proto definitions and buf configuration files, then run the code generation command to produce the gen/ directory contents.

Frequently Asked Questions about go-project-proto

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

FAQPage Schema
How do I set up protobuf code generation for Go gRPC services?

Buf streamlines protobuf code generation for Go gRPC by using buf.yaml and buf.gen.yaml configurations to manage plugins. It standardizes project scaffolding and outputs generated code to a gen/ directory, eliminating manual setup.

Can I generate OpenAPI gateway stubs alongside Go gRPC code using buf?

Yes, you can generate OpenAPI gateway stubs using buf. The code generation process supports plugin configurations for Go, gRPC, Connect, and gateway integrations, automatically creating the necessary REST gateway stubs from your proto definitions.

What project structure do I need for buf-based Go gRPC code generation?

You need a consistent project scaffolding structure with proto definitions organized under proto/api. Additionally, you must configure buf.yaml and buf.gen.yaml files to define plugins and direct the generated outputs into a dedicated gen/ directory.

Does buf code generation work with Connect for Go microservices?

Yes, buf code generation works with Connect for Go microservices. The buf.gen.yaml configuration explicitly supports plugins for Go, gRPC, and Connect, allowing you to generate all necessary client and server interfaces from your proto files.

Why use buf instead of standard protoc for Go gRPC project scaffolding?

Using buf instead of standard protoc for Go gRPC project scaffolding eliminates manual, error-prone setup. Buf standardizes plugin configurations and imports through buf.gen.yaml, ensuring consistent code generation for Go, gRPC, and Connect across microservices.

What are the limitations of standardizing protobuf code generation with buf?

Standardizing protobuf code generation with buf requires specific entry prerequisites: you must maintain proto definitions under proto/ and manage both buf.yaml and buf.gen.yaml files. It is specifically tailored for Go microservices relying on buf for code generation.