golang-grpc

Implements and reviews production gRPC servers and clients in Go with protobuf.

1|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/VerifiedOrganic/onboard --skill golang-grpc-verifiedorganic
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: golang-grpc
Source: https://github.com/VerifiedOrganic/onboard/tree/main/.agents/skills/golang-grpc
Command: npx skills add https://github.com/VerifiedOrganic/onboard --skill golang-grpc-verifiedorganic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Go developers building gRPC microservices often ship code with subtle correctness and operability flaws: raw errors that collapse into codes.Unknown, missing deadlines that hang goroutines, no health checks for Kubernetes probes, and proto designs that cannot evolve. This Skill encodes the conventions that prevent those failures. ## Core Features & Use Cases - Server and client implementation guidance: Covers interceptors, graceful shutdown with GracefulStop plus a Stop timeout fallback, connection reuse, deadlines, load balancing with dns:/// and round_robin, and retry policies. - Proto organization and code generation: Enforces domain-based versioned directories, Request/Response wrapper messages, and protoc or buf generation workflows. - Error handling and testing: Maps failure cases to specific gRPC status codes and demonstrates bufconn-based in-memory tests that verify status codes, streaming, metadata, and deadlines. - Use Case: When asked to write a CreateOrder handler, the Skill produces code that returns codes.InvalidArgument for bad input, codes.NotFound for missing users, and codes.FailedPrecondition for insufficient inventory, instead of codes.Internal everywhere. ## Quick Start Ask the agent to write a production-ready Go gRPC server for your service with health checks, interceptors, and graceful shutdown.

Frequently Asked Questions about golang-grpc

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

FAQPage Schema
How do I return proper gRPC errors in Go?▼

Return errors with status.Errorf from google.golang.org/grpc/status using a specific code such as codes.NotFound or codes.InvalidArgument. A raw fmt.Errorf becomes codes.Unknown, which gives clients no basis for retry or fail-fast decisions.

How do I test a Go gRPC service without a network?▼

Use bufconn.Listen to create an in-memory listener and dial it with grpc.WithContextDialer. This exercises the full gRPC stack including serialization, interceptors, and metadata without opening real sockets.

Should I use protoc or buf for Go code generation?▼

Both work with protoc-gen-go and protoc-gen-go-grpc. buf is the recommended modern option because it manages dependencies, lints proto files, and checks breaking changes, while raw protoc requires manual flag and include-path management.

Why does my gRPC client hang on slow server responses?▼

Calls without a deadline wait indefinitely when the upstream stalls. Wrap every call in context.WithTimeout so slow RPCs fail with codes.DeadlineExceeded instead of leaking goroutines.

How do I load balance gRPC across Kubernetes pod replicas?▼

Point the client at the headless service using the dns:/// scheme and set round_robin as the loadBalancingPolicy in the service config. Add a retryPolicy with retryableStatusCodes containing UNAVAILABLE for transient failures.

When should I use gRPC streaming instead of a large response message?▼

Use server streaming when a response could exceed message size limits or pressure memory, such as returning tens of thousands of records. The server sends items in a loop with stream.Send and the client reads with stream.Recv until io.EOF.