Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Grpc

ASecurity

gRPC 1.x covering Protocol Buffers, service definitions, streaming patterns, channels, interceptors, metadata, deadlines, error model, load balancing, health checking, retry policies, and performance tuning. Use for \"gRPC\", \"protobuf\", \"Protocol Buffers\", \"proto3\", \"protoc\", \"Buf\", \"gRPC streaming\", \"bidirectional streaming\", \"gRPC interceptor\", \"gRPC metadata\", \"gRPC deadline\", \"gRPC health check\", \"gRPC load balancing\", \"gRPC-Web\", \"Connect protocol\", \"grpc-ga...

4 stars
0 votes
0 copies
0 views
Added 9/24/2026
code-qualitypythonrustgojavac#kubernetesdebuggingapisecurityperformance

Works with

cliapi

Security Analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned 9/24/2026

$npx -y skills add chrishuffman5/domain-expert --skill grpc --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Grpc?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Grpc
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/chrishuffman5-grpc/badge)](https://www.skillsdirectory.com/skills/chrishuffman5-grpc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: grpc
description: "gRPC 1.x covering Protocol Buffers, service definitions, streaming patterns, channels, interceptors, metadata, deadlines, error model, load balancing, health checking, retry policies, and performance tuning. Use for \"gRPC\", \"protobuf\", \"Protocol Buffers\", \"proto3\", \"protoc\", \"Buf\", \"gRPC streaming\", \"bidirectional streaming\", \"gRPC interceptor\", \"gRPC metadata\", \"gRPC deadline\", \"gRPC health check\", \"gRPC load balancing\", \"gRPC-Web\", \"Connect protocol\", \"grpc-gateway\", \"service config\", \"retry policy\", \"hedging\"."
license: MIT
---

# gRPC 1.x

This skill covers gRPC, the high-performance RPC framework built on HTTP/2 and Protocol Buffers. gRPC 1.x is the current stable major version. It has deep knowledge of:

- Protocol Buffers IDL (proto3 syntax, editions 2023+)
- Four RPC patterns: unary, server streaming, client streaming, bidirectional
- Channel and stub model, connection lifecycle
- Interceptors (client and server, unary and stream)
- Metadata, deadlines, timeouts, and cancellation
- Error model (17 status codes, rich error details)
- Authentication (TLS, mTLS, token-based)
- Load balancing (client-side, proxy-based, xDS)
- Health checking protocol (`grpc.health.v1`)
- Retry policies and hedging
- gRPC-Web, grpc-gateway (REST transcoding), Connect protocol (Buf)

## How to Approach Tasks

1. **Classify** the request:
   - **Architecture / protocol design** -- Load `references/architecture.md` for wire protocol, proto3, streaming, channels, interceptors
   - **Performance / best practices** -- Load `references/best-practices.md` for load balancing, health checks, retry, security, performance tuning
   - **Troubleshooting / diagnostics** -- Load `references/diagnostics.md` for connection failures, status codes, deadline issues, streaming problems
   - **Cross-protocol comparison** -- Read the `overview` skill

2. **Gather context** -- Language (Go, Java, Python, C#, Rust), streaming vs unary, internal vs external-facing, Kubernetes vs bare metal

3. **Analyze** -- Apply gRPC-specific reasoning: deadline propagation, channel reuse, interceptor ordering, load balancing policy.

4. **Recommend** -- Provide `.proto` definitions, Go/Python/C# code, service config JSON, CLI commands.

## Core Architecture

### HTTP/2 Transport

gRPC uses HTTP/2 exclusively: multiplexing, binary framing, header compression (HPACK), per-stream flow control. Each RPC uses one HTTP/2 stream. Path encoding: `/{package}.{service}/{method}`.

### Four RPC Patterns

| Pattern | Proto | Use Case |
|---|---|---|
| Unary | `rpc Get(Req) returns (Resp)` | Standard request/response |
| Server streaming | `rpc List(Req) returns (stream Resp)` | Feeds, log streaming, large result sets |
| Client streaming | `rpc Upload(stream Req) returns (Resp)` | File uploads, batch ingestion |
| Bidirectional | `rpc Chat(stream Req) returns (stream Resp)` | Chat, collaborative editing, IoT |

### Channel and Stub Model

A channel represents a connection to a gRPC server. Shared by multiple concurrent RPCs via HTTP/2 multiplexing. Stubs are generated client objects wrapping channels with type-safe methods.

### Status Codes

17 codes: OK(0), CANCELLED(1), UNKNOWN(2), INVALID_ARGUMENT(3), DEADLINE_EXCEEDED(4), NOT_FOUND(5), ALREADY_EXISTS(6), PERMISSION_DENIED(7), RESOURCE_EXHAUSTED(8), FAILED_PRECONDITION(9), ABORTED(10), OUT_OF_RANGE(11), UNIMPLEMENTED(12), INTERNAL(13), UNAVAILABLE(14), DATA_LOSS(15), UNAUTHENTICATED(16).

## Anti-Patterns

1. **No deadline set** -- gRPC has no default deadline. Without one, clients may wait indefinitely. Always set deadlines.
2. **Creating channels per request** -- Channels are expensive to create. Share one channel across all calls to the same server.
3. **L4 load balancing for gRPC** -- TCP load balancers see one long-lived HTTP/2 connection. Use L7-aware proxies (Envoy) or client-side load balancing.
4. **Reusing field numbers in proto** -- Removed fields must be `reserved`. Reusing numbers causes silent data corruption.
5. **Large unary messages** -- Default max message size is 4MB. Use streaming for large data transfers.
6. **Ignoring cancellation signals** -- Servers should check `ctx.Done()` in long-running operations to avoid wasting resources.
7. **No health checks in Kubernetes** -- Kubernetes 1.24+ supports native gRPC probes. Implement `grpc.health.v1.Health`.
8. **Binary metadata without `-bin` suffix** -- Binary metadata keys must end with `-bin` or values will be corrupted.

## Reference Files

- `references/architecture.md` -- Wire protocol, proto3, service definitions, streaming, channels, interceptors, metadata, deadlines, error model, authentication
- `references/best-practices.md` -- Load balancing, health checks, retry/hedging, service config, proto organization, security, performance tuning, Kubernetes integration
- `references/diagnostics.md` -- Connection failures, status code debugging, deadline issues, streaming problems, load balancing diagnosis, gRPC-Web troubleshooting

## Cross-References

- `overview` skill -- cross-protocol comparisons
- `rest` skill -- REST API design (grpc-gateway transcoding context)

## Diagnostic Scripts

Ready-made server-probe script (read-only) in `scripts/`.

- `scripts/01-reflection-and-health.sh` -- Reflection exposure and grpc.health.v1 status probe

Attribution

chrishuffman5chrishuffman5
View sourceSee grades on GitHubMore from chrishuffman5 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman Review

Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /caveman-review. Auto-triggers when reviewing pull requests.

1100021 votes

Caveman Commit

Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.

1100021 votes

Springboot Verification

Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.

2456590 votes

Verification Loop

一个全面的 Claude Code 会话验证系统。

2456590 votes

Django Verification

Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.

2456590 votes
View all in code-quality →