Avro Protobuf JSON Schema Registry
Overview
Use this skill when schema management for events must be explicit and enforceable. It helps agents coordinate producer changes, consumer compatibility, registry policy, and versioned contracts across teams sharing event streams.
When to Use
- adopting a schema registry for event-driven systems
- defining or modifying Avro, Protobuf, or JSON Schema definitions
- setting compatibility policies for topics or subjects
- coordinating producer schema changes across multiple consumers
- enforcing contract governance for multi-team event ecosystems
Do not use this when schemas are managed purely through application code with no shared registry or when the system has a single producer-consumer pair with no evolution concerns.
Workflow
Define schema ownership and subject naming.
Include:
- who owns each schema subject (team, service, domain)
- subject naming strategy:
TopicNameStrategy, RecordNameStrategy, or TopicRecordNameStrategy
- where schemas are stored: Confluent Schema Registry, AWS Glue Schema Registry, Apicurio, or equivalent
- schema source of truth: registry-first or code-first with CI sync
Choose the schema format intentionally.
Avro: strong ecosystem support, compact binary, requires registry for deserialization
Protobuf: excellent for multi-language teams, supports nested messages and services
JSON Schema: human-readable, looser typing, easier adoption but weaker guarantees
- consider: serialization size, language support, tooling maturity, and team familiarity
- do not mix formats within a single domain unless isolation is absolute
Define and enforce compatibility policies.
BACKWARD: new schema can read old data (safe for consumer-first evolution)
FORWARD: old schema can read new data (safe for producer-first evolution)
FULL: both backward and forward compatible (safest, most restrictive)
NONE: no compatibility checking (use only for development or isolated topics)
- set policy per subject, not globally — different topics have different evolution needs
- test compatibility in CI before publishing schema changes
Plan producer and consumer evolution paths.
- additive changes (new optional fields): safe under backward compatibility
- field removal or rename: breaking under most policies — requires migration
- type changes: generally breaking — prefer new fields over type modifications
- document the upgrade order: which side deploys first (producer or consumer)?
- use default values explicitly to support backward reading
Integrate schema validation into the release workflow.
- validate schema compatibility in CI using registry API or CLI tools
- block releases that break compatibility policy
- version schemas alongside service code — not independently
- produce evidence of compatibility checks for release gates
- define rollback plan: can a previous schema version be re-registered safely?
Handle multi-team governance and schema discovery.
- publish schema documentation alongside event catalog or data catalog
- make consumer dependency visible — who reads which schema versions?
- define deprecation process for old schema versions
- plan for schema registry availability as a critical path dependency
Common Rationalizations
| Rationalization |
Reality |
| "We can evolve schemas freely since it's just adding fields." |
Even additive changes can break consumers if default values are missing or field semantics change without notice. |
| "The registry is just for serialization, not governance." |
The registry is the enforcement point for cross-team contracts. Treating it as a utility ignores its governance value. |
| "JSON Schema is easier so we'll use it everywhere." |
JSON Schema provides weaker guarantees and no binary efficiency. Format choice should match the system's durability, performance, and typing needs. |
| "Compatibility can be set to NONE during development and tightened later." |
Teams rarely tighten compatibility retroactively. Setting policies early prevents breaking changes from accumulating. |
Red Flags
- no compatibility policy defined on production subjects
- schemas are modified directly in the registry without CI validation
- producer and consumer deploy simultaneously with no coordination order
- no documentation of which consumers depend on which schema versions
- schema registry is a single point of failure with no availability plan
- field semantics change without version bumps or consumer notification
- deprecated schema versions are never cleaned up or documented
- format was chosen without considering cross-language or performance needs
Verification
1---2name: avro-protobuf-json-schema-registry3description: Guides agents through schema-registry-backed event contracts. Use when managing Avro, Protobuf, or JSON Schema for event streams, compatibility policies, producer and consumer evolution, or contract enforcement in messaging systems.4---56# Avro Protobuf JSON Schema Registry78## Overview910Use this skill when schema management for events must be explicit and enforceable. It helps agents coordinate producer changes, consumer compatibility, registry policy, and versioned contracts across teams sharing event streams.1112## When to Use1314- adopting a schema registry for event-driven systems15- defining or modifying Avro, Protobuf, or JSON Schema definitions16- setting compatibility policies for topics or subjects17- coordinating producer schema changes across multiple consumers18- enforcing contract governance for multi-team event ecosystems1920Do not use this when schemas are managed purely through application code with no shared registry or when the system has a single producer-consumer pair with no evolution concerns.2122## Workflow23241. Define schema ownership and subject naming.25 Include:26 - who owns each schema subject (team, service, domain)27 - subject naming strategy: `TopicNameStrategy`, `RecordNameStrategy`, or `TopicRecordNameStrategy`28 - where schemas are stored: Confluent Schema Registry, AWS Glue Schema Registry, Apicurio, or equivalent29 - schema source of truth: registry-first or code-first with CI sync30312. Choose the schema format intentionally.32 - `Avro`: strong ecosystem support, compact binary, requires registry for deserialization33 - `Protobuf`: excellent for multi-language teams, supports nested messages and services34 - `JSON Schema`: human-readable, looser typing, easier adoption but weaker guarantees35 - consider: serialization size, language support, tooling maturity, and team familiarity36 - do not mix formats within a single domain unless isolation is absolute37383. Define and enforce compatibility policies.39 - `BACKWARD`: new schema can read old data (safe for consumer-first evolution)40 - `FORWARD`: old schema can read new data (safe for producer-first evolution)41 - `FULL`: both backward and forward compatible (safest, most restrictive)42 - `NONE`: no compatibility checking (use only for development or isolated topics)43 - set policy per subject, not globally — different topics have different evolution needs44 - test compatibility in CI before publishing schema changes45464. Plan producer and consumer evolution paths.47 - additive changes (new optional fields): safe under backward compatibility48 - field removal or rename: breaking under most policies — requires migration49 - type changes: generally breaking — prefer new fields over type modifications50 - document the upgrade order: which side deploys first (producer or consumer)?51 - use default values explicitly to support backward reading52535. Integrate schema validation into the release workflow.54 - validate schema compatibility in CI using registry API or CLI tools55 - block releases that break compatibility policy56 - version schemas alongside service code — not independently57 - produce evidence of compatibility checks for release gates58 - define rollback plan: can a previous schema version be re-registered safely?59606. Handle multi-team governance and schema discovery.61 - publish schema documentation alongside event catalog or data catalog62 - make consumer dependency visible — who reads which schema versions?63 - define deprecation process for old schema versions64 - plan for schema registry availability as a critical path dependency6566## Common Rationalizations6768| Rationalization | Reality |69| --- | --- |70| "We can evolve schemas freely since it's just adding fields." | Even additive changes can break consumers if default values are missing or field semantics change without notice. |71| "The registry is just for serialization, not governance." | The registry is the enforcement point for cross-team contracts. Treating it as a utility ignores its governance value. |72| "JSON Schema is easier so we'll use it everywhere." | JSON Schema provides weaker guarantees and no binary efficiency. Format choice should match the system's durability, performance, and typing needs. |73| "Compatibility can be set to NONE during development and tightened later." | Teams rarely tighten compatibility retroactively. Setting policies early prevents breaking changes from accumulating. |7475## Red Flags7677- no compatibility policy defined on production subjects78- schemas are modified directly in the registry without CI validation79- producer and consumer deploy simultaneously with no coordination order80- no documentation of which consumers depend on which schema versions81- schema registry is a single point of failure with no availability plan82- field semantics change without version bumps or consumer notification83- deprecated schema versions are never cleaned up or documented84- format was chosen without considering cross-language or performance needs8586## Verification8788- [ ] Schema ownership and subject naming strategy are documented89- [ ] Format choice (Avro, Protobuf, JSON Schema) is justified for the use case90- [ ] Compatibility policies are set per subject and tested in CI91- [ ] Producer and consumer evolution order is defined for breaking changes92- [ ] Schema validation is part of the release workflow with blocking on incompatibility93- [ ] Consumer dependencies on schema versions are visible and tracked94- [ ] Schema registry availability and rollback procedures are planned