go-grpc

go-grpc is a skill for Claude Code from muratmirgun/gophers. It costs 84 tokens per session (2,216 once invoked), scanned A, original, MIT.

A guide to building gRPC services in Go, where programs communicate through defined remote procedure calls. It covers service contracts, generated code, servers, clients, errors, streaming, security, and testing.

In plain words
What is it for?
Use it when creating or reviewing Go gRPC servers and clients, organising .proto files, generating code with protoc or buf, handling retries and status codes, adding TLS, or testing with bufconn.
Why use it?
It keeps the service definition, generated files, and business logic separate, making changes safer. It also addresses deadlines, reusable connections, typed errors, graceful shutdown, and production security.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; built for openclaw.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is Read [references/proto-and-codegen.md](../../../skills/go-grpc/references/proto-and-codegen.md) when organizing `.proto` packages or wiring `buf`..

Part of the gophers plugin — 26 skills, 4 agents shipped together

Good fit Use it when creating or reviewing Go gRPC servers and clients, organising .proto files, generating code with protoc or buf, handling retries and status codes, adding TLS, or testing with bufconn.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/muratmirgun/gophers
agentmods
npx agentmods add skills/muratmirgun/gophers/go-grpc

Made for: Claude Code.

Or install gophers, the plugin that ships this one along with the rest of its 26 skills, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-grpc

README.md
[![agentmods](https://agentmods.dev/badge/skills/muratmirgun/gophers/go-grpc.svg)](https://agentmods.dev/skills/muratmirgun/gophers/go-grpc)
Your own site
<a href="https://agentmods.dev/skills/muratmirgun/gophers/go-grpc"><img src="https://agentmods.dev/badge/skills/muratmirgun/gophers/go-grpc.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,216 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.02216
Opus 5 $0.00042 $0.01108
Sonnet 5 $0.00017 $0.00443
Haiku 4.5 $0.00008 $0.00222

Measured 8d ago against content hash a48ba988dd13, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

go-grpc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude-plugin/skills/go-grpc/SKILL.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go gRPC

Treat gRPC as a transport. Keep .proto-generated code and business logic separated. The official Go implementation is google.golang.org/grpc; pair it with protoc-gen-go + protoc-gen-go-grpc (or buf generate).

Core Rules

  1. One concern per layer. .proto defines the contract; generated code lives in gen/; service implementation lives in internal/. Never edit generated files.
  2. Always wrap RPC arguments in Request/Response messages. Bare scalars (string, int32) cannot be evolved without breaking callers.
  3. Return typed status codes, never raw errors. A fmt.Errorf becomes codes.Unknown on the wire — the client cannot decide whether to retry.
  4. Every client call has a deadline. No context.Background() to a remote service. Set context.WithTimeout per call.
  5. Reuse connections. HTTP/2 multiplexes; creating a new grpc.ClientConn per request is a TLS handshake leak.
  6. Disable reflection in production. Reflection is a developer convenience that doubles as an API enumeration tool for attackers.

When to Use What

Need Use
Define service .proto file in proto/<service>/v1/
Generate stubs buf generate or protoc --go_out --go-grpc_out
Cross-cutting (auth, logging, recovery) grpc.ChainUnaryInterceptor / ChainStreamInterceptor
Health probes (Kubernetes) grpc_health_v1 from google.golang.org/grpc/health
Errors with details status.Errorf(codes.X, ...) + WithDetails(errdetails.BadRequest{...})
Tests google.golang.org/grpc/test/bufconn
Service mesh / mTLS credentials.NewTLS or delegate to Istio/Linkerd

Read references/proto-and-codegen.md when organizing .proto packages or wiring buf. Read references/status-and-errors.md when mapping domain errors to gRPC codes.

Server Bootstrap

import (
    "google.golang.org/grpc"
    "google.golang.org/grpc/health"
    healthpb "google.golang.org/grpc/health/grpc_health_v1"
)

srv := grpc.NewServer(
    grpc.ChainUnaryInterceptor(recoveryUnary, loggingUnary, authUnary),
    grpc.ChainStreamInterceptor(recoveryStream, loggingStream),
)
pb.RegisterUserServiceServer(srv, &userService{...})
healthpb.RegisterHealthServer(srv, health.NewServer())

go func() { _ = srv.Serve(lis) }()

// Graceful shutdown bounded by a hard timeout.
<-shutdownSignal
stopped := make(chan struct{})
go func() { srv.GracefulStop(); close(stopped) }()
select {
case <-stopped:
case <-time.After(15 * time.Second):
    srv.Stop()
}

Read the full file on GitHub · 204 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 204 lines · 84 tokens per session scan A a48ba988dd13

Subscribe to this mod's changes

go-grpc is a skill published in the GitHub repository muratmirgun/gophers (8 stars, last pushed 27d ago), licensed MIT. It adds 84 tokens to every session and 2,216 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

go

Use when writing Go services, CLIs, or libraries. Covers idiomatic error wrapping, goroutine and context discipline, interface design, table-driven tests, and the race detector.

nimadorostkar/Claude-Skills-collection · 38 tokens

golang-pro

Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming…

Jeffallan/claude-skills · 95 tokens

go-programming-expert

Expert-level skill for Go programming (Go 1.25+). Covers high-performance microservices, concurrency patterns, sqlc, net/http, Gin/Echo/Fiber, gRPC, and testing in English and Indonesian.

roedyrustam/vibes-plug · 51 tokens

encore-go-api

Define typed API endpoints in Encore Go using //encore:api annotations. Covers typed request/response structs, path/query/header/cookie params, and error returns. For raw endpoints (//encore:api raw) and inbound webhooks, use encore-go-webhook instead.

encoredev/skills · 66 tokens

encore-go-webhook

Receive inbound webhooks from external services (Stripe, GitHub, Slack, Twilio, etc.) in Encore Go using //encore:api raw. The right skill any time the user names a third-party provider that POSTs events to a URL you own.

encoredev/skills · 60 tokens

encore-go-bucket

Store unstructured files in Encore Go using objects.NewBucket from encore.dev/storage/objects — uploads, images, documents, blobs.

encoredev/skills · 37 tokens