Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

grpc

/grpc

Podpowiada gRPC 1.x: Protocol Buffers, definicje usług, strumieniowanie, interceptory, deadline, równoważenie obciążenia i kontrole zdrowia.

Repozytorium
domain-expert ↗
Licencja
MIT
Ostatnia zmiana repozytorium
23.09.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
5
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 23.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/01-reflection-and-health.sh

Co robi i kiedy

Podpowiada gRPC 1.x: Protocol Buffers, definicje usług, strumieniowanie, interceptory, deadline, równoważenie obciążenia i kontrole zdrowia.

Wyzwalacze z opisu

gRPC\protobuf\Protocol Buffers\proto3\protoc\Buf\gRPC streaming\bidirectional streaming\
Oryginalny opis (EN)

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\".

Jak działa

  1. How to Approach Tasks
  2. Core Architecture
  3. Anti-Patterns
  4. Reference Files
  5. Cross-References
  6. Diagnostic Scripts
Sekcje z nagłówków SKILL.md, w oryginale · 82 linii, 612 słów
Podgląd 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
Pliki w paczce (5)
  • SKILL.md 5 KB
  • references/architecture.md 5 KB
  • references/best-practices.md 6 KB
  • references/diagnostics.md 7 KB
  • scripts/01-reflection-and-health.sh 2 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · chrishuffman5/domain-expert90MIT
TerminalSkills/skills100Apache-2.0
managedcode/dotnet-skills100MIT
claude-dev-suite/claude-dev-suite100MIT
G1Joshi/Agent-Skills100MIT
arbazkhan971/godmode100MIT
dkbnull/hello-skill96MIT

Migawka bazy z 13.11.2026 · wersja paczki fe4e4e9d52e8 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90backend-grpc-patterns
    Projektuje usługi gRPC: schematy protobuf, strumieniowanie, interceptory i obsługę błędów zgodną z konwencjami.
  • 100generating-grpc-services
    Generuje definicje usług gRPC, stuby i implementacje z Protocol Buffers dla wydajnych usług gRPC.
  • 100generating-grpc-services
    Generuje definicje usług gRPC, stuby i implementacje z Protocol Buffers dla wydajnych usług gRPC.
  • 100grpc-development
    Podaje dobre praktyki budowy wydajnych usług z gRPC i Protocol Buffers: projekt usług RPC, schematy protobuf, API strumieniowe, interceptory i komunikacja między językami.
  • 100go-grpc
    Pomaga w usługach gRPC w Go poza podstawami: projekt proto, kody statusu i szczegóły błędów, interceptory, terminy, streaming, health checki i łagodne zamykanie.
  • 100grpc-protocol-buffers
    Pomaga budować wielojęzyczne mikrousługi komunikujące się przez gRPC i Protocol Buffers o wysokiej wydajności.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.