golang-grpc

Implement and review Go gRPC services with proto structure and error semantics.

1|Updated May 27, 2026
One-click install
npx skills add https://github.com/dmwin72015/netdisk --skill golang-grpc-dmwin72015
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-grpc
Source: https://github.com/dmwin72015/netdisk/tree/main/.agents/skills/golang-grpc
Command: npx skills add https://github.com/dmwin72015/netdisk --skill golang-grpc-dmwin72015

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents common Go gRPC mistakes that cause opaque errors, broken retry behavior, missing health signals, and fragile production operations.

Core Features & Use Cases

  • Correct proto organization and generation: Domain-based, versioned proto/*/<domain>/v1/ layout and wrapper Request/Response messaging to keep APIs evolvable.
  • Operationally sound Go gRPC servers: Health check registration, interceptor patterns, graceful shutdown with timeout fallback, and production security defaults like disabling reflection.
  • Robust gRPC clients and reliability: Connection reuse, per-call deadlines, metadata handling, and client-side load balancing/retry configuration for Kubernetes.

Quick Start

Ask the agent to review your Go gRPC server implementation for status code correctness, deadlines, interceptors, health registration, and graceful shutdown, and then propose concrete code changes.

Frequently Asked Questions about golang-grpc

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

FAQPage Schema
How do I implement graceful shutdown in a Go gRPC server with a timeout fallback?

Graceful shutdown in a Go gRPC server requires calling GracefulStop with a timeout fallback to ensure in-flight RPCs complete or abort safely. This prevents broken connections and data loss during microservice deployments.

How do I return proper gRPC status codes and errors in Go microservices?

To return proper gRPC status codes in Go microservices, use status.Error and status.Errorf with specific gRPC codes instead of standard Go errors. This ensures correct error semantics, transparent client retry behavior, and reliable service communication.

What is the correct proto organization and directory structure for versioned gRPC APIs?

Correct proto organization for versioned gRPC APIs uses a domain-based, versioned layout like proto/*/<domain>/v1/ with wrapper Request and Response messages. This structure keeps your APIs evolvable and maintainable as your microservices scale.

How do I set up gRPC health checks and interceptors in a Go server?

Setting up gRPC health checks and interceptors in a Go server involves explicit health check registration and applying interceptor patterns to the server configuration. These operationally sound defaults provide necessary health signals for Kubernetes and production monitoring.

Why do my gRPC clients experience broken retry behavior and opaque errors?

Broken retry behavior and opaque errors in gRPC clients usually occur when the server returns standard Go errors instead of using status.Error with specific gRPC status codes. Implementing per-call deadlines and correct error semantics resolves these reliability issues.

Do I need to disable gRPC reflection in production Go servers?

Disabling gRPC reflection is a production security default for operationally sound Go gRPC servers. Combined with TLS configuration and connection reuse, it prevents unauthorized API discovery and secures your microservices against external probing.