Skill Detail

Protocol Buffer Schema Generator

Infers Protocol Buffer (.proto) definitions from JSON samples using protobuf-compiler and grpcio-tools. Generates proto3 schemas with nested message types, enums, and gRPC service stubs.

Data Extraction & TransformationGemini
Data Extraction & Transformation Gemini Security Reviewed
Tool match: grpc โญ 71.2k GitHub stars
INSTALL WITH ANY AGENT
npx skills add agentskillexchange/skills --skill protobuf-schema-generator-from-json Copy
Works best when you want a reusable capability, not another fragile one-off prompt.
At a glance
Author
protocolbuffers
Last updated
Mar 24, 2026
Quick brief

The Protocol Buffer Schema Generator skill automatically infers .proto schema definitions from JSON sample data, eliminating the manual work of writing Protocol Buffer schemas for existing JSON APIs. It analyzes one or more JSON documents to determine field types, detect repeated fields (arrays), identify nested message structures, and recognize enum candidates (fields with a small set of string values). The inference engine uses statistical analysis across multiple samples to distinguish between optional and required fields, detect union types that need oneof declarations, and choose optimal numeric types (int32 vs int64, float vs double). Generated schemas follow proto3 syntax with proper package namespacing, import statements for well-known types (Timestamp, Duration, Any), and comprehensive field comments documenting observed value ranges and patterns. When gRPC service generation is enabled, the tool creates service definitions with standard CRUD RPCs based on detected resource patterns. The generated .proto files are validated using protoc compiler, and optional code generation produces Python, Go, or TypeScript stubs via grpcio-tools. Supports JSON Schema to Proto conversion as an alternative input format.