/selamy-skills:protobuf-authoringfrom selamy-skills
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.
Ships in selamy-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
lower_snake_case.proto, one top-level concept; syntax = "proto3";
first line.acme.orders.v1. The v1 is not
optional; it's how you ship a v2 later without a collision.PascalCase.lower_snake_case. Repeated fields get plural names.UPPER_SNAKE_CASE, prefixed with the enum name to avoid
C++ scoping collisions: enum Side { SIDE_UNSPECIFIED = 0; SIDE_BUY = 1; }.*_UNSPECIFIED = 0 — see below; this is a
compatibility rule, not just style.GetFooRequest/GetFooResponse) so each can evolve independently.These protect already-deployed readers. Treat every shipped field number as permanent.
reserve its number AND its name so neither can
be reused by accident:
message Order {
reserved 4, 7 to 9;
reserved "old_status";
}
int32/int64/uint32/uint64/bool interconvert).
When unsure, add a new field instead.0 = UNSPECIFIED value. 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.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.Bad — reuses a number, no UNSPECIFIED, no reservation:
enum Side { BUY = 0; SELL = 1; } // 0 is a real case; collides unprefixed
message Order {
string id = 1;
int64 qty = 2;
// (price used to be field 3, deleted — number now free to be reused) ☠
}
Good — prefixed enum with UNSPECIFIED, reserved removed field:
enum Side { SIDE_UNSPECIFIED = 0; SIDE_BUY = 1; SIDE_SELL = 2; }
message Order {
reserved 3; reserved "price"; // price removed, locked forever
string id = 1;
int64 qty = 2;
Side side = 4; // new field = new number
}
Enforce both halves in CI with buf: style on every
change, breaking-change detection against the published baseline.
# buf.yaml
version: v2
lint:
use: [STANDARD] # naming, enum-zero-value, package-version, etc.
breaking:
use: [WIRE_JSON] # blocks number reuse, type changes, deletions w/o reserve
# CI
- run: buf lint
- run: buf breaking --against '.git#branch=main' # fail the PR on a breaking change
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.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub selamy-labs/agent-skills --plugin selamy-skills111 skills in this plugin
/adaptive-estimationUse when tracking a slowly-varying latent quantity from noisy measurements with quantifiable uncertainty — a drifting metric, capacity, latency trend, or confidence. Prefer a Kalman-style adaptive estimator over fixed moving averages or static thresholds./adaptive-loop-budgetingUse when an autonomous loop needs explicit limits on attempts, time, cost, tool calls, verification depth, or risk, and a clear stop, continue, yield, or escalate decision./adopt-and-deleteUse when adopting a shared module, library, chart, or service, or doing any consolidation, migration, or refactor that supersedes existing code. The change that adds the replacement must REMOVE what it replaced, in the same atomic change.Other plugins' skills for the same job