selamy-labs/agent-skills/protobuf-authoring
Claude Code and agent skill by selamy-labs/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when writing or reviewing a .proto schema. Apply consistent naming/style and — the part that actually bites — the wire- and consumer-compatibility rules, so the schema reads cleanly and can evolve without breaking deployed readers. Gate it with buf lint plus breaking-change detection.
Install
npx vskill@latest install selamy-labs/agent-skills/protobuf-authoringSKILL.md
The same SKILL.md was published earlier as selamy-labs/agent-skills/protobuf-authoring.
Protobuf Authoring
Two things make a proto good: consistent style (so generated code is predictable across languages) and never breaking the wire/consumer contract (the mistakes that are expensive and effectively irreversible once a schema ships). Style is a checklist; compatibility is the real expert knowledge — get it wrong and you corrupt data in already-deployed readers.
Style checklist
- File:
lower_snake_case.proto, one top-level concept;syntax = "proto3";
first line.
- Package: lowercase dotted, versioned —
acme.orders.v1. Thev1is not
optional; it's how you ship a v2 later without a collision.
- Message / enum / service / RPC names:
PascalCase. - Field names:
lower_snake_case. Repeated fields get plural names. - Enum values:
UPPER_SNAKE_CASE, prefixed with the enum name to avoid
C++ scoping collisions: enum Side { SIDE_UNSPECIFIED = 0; SIDE_BUY = 1; }.
- The zero value is always `*_UNSPECIFIED = 0` — see below; this is a
compatibility rule, not just style.
- Indent 2 spaces; keep one request/response message per RPC
(GetFooRequest/GetFooResponse) so each can evolve independently.
Compatibility rules (the ones that bite)
These protect already-deployed readers. Treat every shipped field number as permanent.
- Never change or reuse a field number. The number is the wire identity. Reusing
a freed number makes old readers parse new data into the wrong field — silent corruption.
- When you remove a field, `reserve` its number AND its name so neither can
be reused by accident: ``proto message Order { reserved 4, 7 to 9; reserved "old_status"; } ``
- Never change a field's type unless the new type is wire-compatible (the
list is narrow: e.g. int32/int64/uint32/uint64/bool interconvert). When unsure, add a new field instead.
- Enums are append-only and must have a
0=UNSPECIFIEDvalue. Proto3 has
no field presence for scalars, so 0 is what an old reader sees for an unknown new enum value — it must mean "unset/unknown," never a real case.
- Don't rename fields if any consumer uses the JSON mapping (the field name is
the JSON key); the number is safe but the name is part of that contract.
- Avoid `required` (proto2) entirely — you can never safely make a required
field optional later. In proto3 everything is optional by design; use optional only when you genuinely need presence on a scalar.
- Adding a field or enum value is the safe move — defer to it whenever you'd
otherwise mutate.
Good vs bad
Bad — reuses a number, no UNSPECIFIED, no reservation:
Good — prefixed enum with UNSPECIFIED, reserved removed field:
Lint gate
Enforce both halves in CI with `buf`: style on every change, breaking-change detection against the published baseline.
buf breaking is the safety net the human reviewer can't reliably be: it mechanically catches the number-reuse and type-change mistakes above before they ship.
_Synthesized from the public protobuf.dev style guide and API/proto-best-practices docs._
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/protobuf-authoring/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/selamy-labs/agent-skills/protobuf-authoring)