go-grpc
gRPC services in Go beyond the basics: proto design, status codes and error details, interceptors, deadlines, streaming, health checks, and graceful shutdown.
Skill by eduardo-sl
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/eduardo-sl-go-grpc
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/go-grpc
Tools it pre-approves 9
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadEditWriteGlobGrepBash(go:*)Bash(gofmt:*)Bash(protoc:*)Bash(buf:*)
What's inside
- Skill name
go-grpc- Description
- gRPC services in Go beyond the basics: proto design, status codes and error details, interceptors, deadlines, streaming, health checks, and graceful shutdown. Use when: "gRPC service", "proto design", "gRPC error handling", "interceptor", "gRPC streaming", "gRPC deadline", "grpc health check", "gRPC status codes". Not for: REST handlers (go-api-design), protobuf-agnostic layering (go-architecture-review), TLS hardening (go-security-audit).
- License
- MIT
- Compatibility
- Designed for Claude Code or similar AI coding agents working on Go projects. Requires the Go toolchain. Requires protoc or buf for code generation.
- Allowed tools
- Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*), Bash(protoc:*), Bash(buf:*)
- Metadata
- author: eduardo-sl · version: 1.4.0
- Instructions
- 227 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (3)
- SKILL.md
- clients.md · references/
- testing.md · references/
SKILL.md (first lines)
# Go gRPC Services
gRPC's contract-first model only pays off if the contract is treated as
an API: versioned packages, deliberate error codes, deadlines
everywhere, and interceptors for everything cross-cutting.
Detailed reference material, loaded on demand:
- `references/clients.md` — `NewClient`, service-config retries and load
balancing, keepalive on both sides, reading status codes.
- `references/testing.md` — in-memory `bufconn` server and client,
asserting status codes.
Read a reference file only when the summary below is not enough.
## 1. Proto Design Rules
```protobuf
syntax = "proto3";
package payment.v1; // version IN the package
option go_package = "github.com/acme/payment-service/gen/payment/v1;paymentv1";
service PaymentService {
rpc CreatePayment(CreatePaymentRequest) returns (CreatePaymentResponse);
}
message CreatePaymentRequest { // one request/response pair
string order_id = 1; // per RPC, always — even if
int64 amount_cents = 2; // empty today
}
message CreatePaymentResponse {
Payment payment = 1;
}
```
- Version in the package (`payment.v1`); breaking change = `payment.v2`.
- Never reuse or renumber field tags; `reserved 3, 7;` deleted ones.
- Dedicated Request/Response messages per RPC — adding a field later is
free; changing a shared message breaks every RPC using it.
- Generate with buf or a pinned protoc in `make generate`; commit
generated code so builds don't depend on toolchain drift.
- In CI, `buf lint` and `buf breaking --against '.git#branch=main'` stop
renumbered fields and removed RPCs before they reach a client.
Field rules (lengths, ranges, formats) belong in protovalidate
annotations, enforced by an interceptor.
## 2. Errors: Status Codes, Not Strings
Return `status.Error`, mapping domain errors in ONE place:
```go
func (s *Server) CreatePayment(ctx context.Context, req *pb.CreatePaymentRequest) (*pb.CreatePaymentResponse, error) {
p, err := s.svc.Create(ctx, toDomain(req))
if err != nil {
return nil, toStatus(err)
}
return &pb.CreatePaymentResponse{Payment: fromDomain(p)}, nil
}
func toStatus(err error) error {
switch {
case errors.Is(err, domain.ErrNotFound):
return status.Error(codes.NotFound, "payment not found")
case errors.Is(err, domain.ErrDuplicate):
return status.Error(codes.AlreadyExists, "payment already exists")
case errors.Is(err, context.DeadlineExceeded):
return status.Error(codes.DeadlineExceeded, "timed out")
default:
return status.Error(codes.Internal, "internal error") // no details leak
}
}
```
Code semantics that matter: `InvalidArgument` (bad request regardless
of state), `FailedPrecondition` (bad state), `NotFound`, `AlreadyExists`,
`Unauthenticated` vs `PermissionDenied`, `Unavailable` (retryable),
`Internal` (bug). Clients read codes with `status.FromError(err)` —
never parse messages.
## 3. Deadlines Are Mandatory
```go
// Client — every call gets a deadline
ctx, cancel := context.WithTimeout(ctx, 2*time.Second)
defer cancel()
resp, err := client.CreatePayment(ctx, req)
// Server — check before expensive work
if err := ctx.Err(); err != nil {
return nil, status.FromContextError(err).Err()
}
```
The server inherits the client's deadline through the context. Pass
`ctx` into every downstream call (DB, other RPCs) so cancellation
propagates end to end.
## 4. Interceptors for Cross-Cutting Concerns
Handlers stay business-only; recovery, auth, logging, metrics live in
interceptors:
```go
srv := grpc.NewServer(
grpc.ChainUnaryInterceptor(
recoveryInterceptor, // outermost: panic → codes.Internal
loggingInterceptor,
authInterceptor,
),
)
func loggingInterceptor(ctx context.Context, req any,
info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) {
start := time.Now()
resp, err := handler(ctx, req)
slog.InfoContext(ctx, "rpc",
slog.String("method", info.FullMethod),From eduardo-sl/go-agent-skills, MIT.
More from eduardo-sl/go-agent-skills
- 0.676score
go-cli
eduardo-sl
Build command-line tools in Go: flag handling, subcommands, stdin/stdout discipline, exit codes, signal handling, and when Cobra/Viper earn their weight over…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-naming
eduardo-sl
Go naming conventions for packages, files, types, functions, methods, receivers, variables, constants, errors, acronyms and tests, grounded in Effective Go…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-graphql
eduardo-sl
Build GraphQL servers in Go with gqlgen: schema-first generation, resolver structure, the N+1 problem and dataloaders, complexity and depth limits, error…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-interface-design
eduardo-sl
Go interface design patterns: implicit interfaces, consumer-side definition, interface compliance verification, composition, the…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-api-design
eduardo-sl
HTTP/REST API design for Go services: handlers, ServeMux routing, middleware, request validation, pagination, idempotency, health checks, error responses, and…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-coding-standards
eduardo-sl
Go coding standards and style conventions grounded in Effective Go, Go Code Review Comments, and production-proven idioms.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-context
eduardo-sl
Correct usage of context.Context in Go: propagation, cancellation, timeouts, deadlines, values, and common anti-patterns.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-data-structures
eduardo-sl
Correct use of Go's built-in data structures: slices (nil vs empty, append semantics, aliasing, preallocation), maps (comma-ok, sets, iteration order)…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-documentation
eduardo-sl
Go documentation conventions: godoc comments, package docs, testable Example functions, deprecation notices, doc links, and project docs (README, CHANGELOG…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-error-handling
eduardo-sl
Go error handling patterns, wrapping, sentinel errors, custom error types, and the errors package.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-modernize
eduardo-sl
Modernize Go code to use current language features and standard library additions, Go 1.21 through 1.27: generics and generic methods, log/slog, errors.Join…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-database
eduardo-sl
Database patterns for Go services: database/sql, connection management, transactions, migrations, query builders, and ORM usage (sqlc, GORM, ent).
SkillAFreshness: A★ 82Claude Code +9
Signals
- Stars
- 82
- Forks
- 10
- Open issues
- 0
- Last commit (this folder)
- Oct 14, 2026 (14 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.4.0
- License
- MIT
- Repository
- github.com/eduardo-sl/go-agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from eduardo-sl
- 0.676score
go-cli
eduardo-sl
Build command-line tools in Go: flag handling, subcommands, stdin/stdout discipline, exit codes, signal handling, and when Cobra/Viper earn their weight over…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-coding-standards
eduardo-sl
Go coding standards and style conventions grounded in Effective Go, Go Code Review Comments, and production-proven idioms.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-graphql
eduardo-sl
Build GraphQL servers in Go with gqlgen: schema-first generation, resolver structure, the N+1 problem and dataloaders, complexity and depth limits, error…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-interface-design
eduardo-sl
Go interface design patterns: implicit interfaces, consumer-side definition, interface compliance verification, composition, the…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-api-design
eduardo-sl
HTTP/REST API design for Go services: handlers, ServeMux routing, middleware, request validation, pagination, idempotency, health checks, error responses, and…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-context
eduardo-sl
Correct usage of context.Context in Go: propagation, cancellation, timeouts, deadlines, values, and common anti-patterns.
SkillAFreshness: A★ 82Claude Code +9
Cite this page
go-grpc skill. Agent Mart. https://agentmart.dev/skills/eduardo-sl-go-grpc (last updated 2026-10-24)