csharp-grpc
CommunityProduction-ready gRPC patterns for C#
AuthorCloudyWing
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provide a consistent, production-oriented set of conventions and best practices for building gRPC services in C#, reducing integration errors and improving maintainability across proto management, service implementation, interceptors, error handling, and client usage.
Core Features & Use Cases
- Proto organization & naming: Centralize .proto files under a Protos/ directory, require csharp_namespace and versioned package names, and follow Protobuf naming conventions to avoid generated code collisions.
- Server implementation patterns: Derive services from generated base classes, name gRPC service classes with a GrpcService suffix, and always propagate ServerCallContext.CancellationToken to async operations.
- Error handling & interceptors: Use RpcException with appropriate StatusCode mapping, register global interceptors for logging and error translation, and avoid throwing raw exceptions that map to Unknown.
- Client factory & streaming: Use AddGrpcClient with HttpClientFactory for managed channels and retries, prefer streaming for large data flows, and check cancellation tokens in stream processing.
Quick Start
Add proto files to Protos/, implement the generated service base classes with CancellationToken-aware async calls, register interceptors and AddGrpcClient for clients, and use RpcException with mapped StatusCodes for error responses.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: csharp-grpc Download link: https://github.com/CloudyWing/ai-dotfiles/archive/main.zip#csharp-grpc Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.