This skill helps you design, validate, and troubleshoot Protocol Buffer schemas and buf tooling for robust gRPC and Connect services.
npx playbooks add skill bufbuild/claude-plugins --skill protobuf
.proto filesbuf.yaml or buf.gen.yamlBefore writing proto code, review existing .proto files in the project.
Match conventions for naming, field ordering, structural patterns, validation, and documentation style.
If none exists, ask the user what style should be used or an existing library to emulate.
Always run after making changes:
buf format -w && buf lint
Check for a Makefile first—many projects use make lint or make format.
Fix all errors before considering the change complete.
| Task | Reference |
|------|-----------|
| Field types, enums, oneofs, maps | [quick_reference.md](references/quick_reference.md) |
| Schema evolution, breaking changes | [best_practices.md](references/best_practices.md) |
| Validation constraints | [protovalidate.md](references/protovalidate.md) |
| Complete service examples | [examples.md](references/examples.md), [assets/](assets/) |
| buf CLI, buf.yaml, buf.gen.yaml | [buf_toolchain.md](references/buf_toolchain.md) |
| Migrating from protoc | [migration.md](references/migration.md) |
| Lint errors, common issues | [troubleshooting.md](references/troubleshooting.md) |
| Proto API review checklist | [review_checklist.md](references/review_checklist.md) |
proto/
├── buf.yaml
├── buf.gen.yaml
└── company/
└── domain/
└── v1/
└── service.proto
assets/buf.yaml as starting pointbuf.build/bufbuild/protovalidate as a dependency in buf.yaml and run buf dep updateassets/buf.gen.*.yaml for code generation config| Template | Use For |
|----------|---------|
| buf.gen.go.yaml | Go with gRPC |
| buf.gen.go-connect.yaml | Go with Connect |
| buf.gen.ts.yaml | TypeScript with Connect |
| buf.gen.python.yaml | Python with gRPC |
| buf.gen.java.yaml | Java with gRPC |
Located in assets/proto/example/v1/:
| Template | Description |
|----------|-------------|
| book.proto | Entity message, BookRef oneof, enum |
| book_service.proto | Full CRUD with batch ops, pagination, ordering |
buf format -w && buf lint reserved 4;
reserved "old_field_name";
buf breaking --against '.git#branch=main' to verifyEvery field in a production API should have appropriate validation.
See [protovalidate.md](references/protovalidate.md) for the full reference.
Common constraints:
.string.uuid, .string.email, .string.uri, .string.pattern.string.min_len, .string.max_len.int32.gte, .uint32.lte.enum.defined_only, .enum.not_in = 0.repeated.min_items, .repeated.max_items(buf.validate.field).required = true(buf.validate.oneof).required = trueAfter making changes:
buf format -w (apply formatting)buf lint (check style rules)buf breaking --against '.git#branch=main' (if modifying existing schemas)Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.