agentsclimarketplace

Kafka schema review

Skill lensesio/agentic-engineering-for-apache-kafka/skills/kafka-schema-review

Review Kafka schema changes (Avro, Protobuf, JSON Schema) for compatibility and evolution best practices using the Lenses MCP server. Detects breaking changes, missing defaults, schema drift and naming issues. Use when user says "review schema changes", "check schema compatibility", "will this schema break consumers" or asks about schema evolution. Do NOT use for creating new schemas from scratch or registering them in the cluster.From its SKILL.md

Install
npx -y skills add lensesio/agentic-engineering-for-apache-kafka --skill kafka-schema-review

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • runs commandsInstructs the agent to run 4 commands, including `git diff` and 3 more.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.9 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

Kafka Schema Evolution Review

Reviews schema changes for compatibility and evolution best practices. A single breaking schema change can take down every consumer of a topic.

Target environment: $ARGUMENTS

Workflow

Copy this checklist and track your progress:

Schema Review Progress:
- [ ] Step 1: Fetch registered schemas
- [ ] Step 2: Scan codebase for schema files
- [ ] Step 3: Detect breaking changes
- [ ] Step 4: Check schema quality
- [ ] Step 5: Check schema drift
- [ ] Step 6: Generate report
  1. Fetch registered schemas from the live cluster via Lenses MCP
  2. Scan codebase for schema definition files (see references/compatibility-rules.md for file types)
  3. Detect breaking changes against compatibility rules in references/compatibility-rules.md
  4. Check schema quality against best practices
  5. Check schema drift between repo and cluster
  6. Report findings with migration guidance

Step 1: Fetch Registered Schemas

Use Lenses MCP tools to get the current state of schemas in the cluster:

  • list_topic_metadata - get all schemas registered against topics (key and value)
  • get_topic_metadata - get the current schema for a specific topic
  • get_dataset - get dataset field-level details, policies and governance metadata
  • list_datasets with schema_format filter - find all topics using a given format (AVRO, JSON, PROTOBUF)

Expected output: Map of topics to their registered schemas (key and value) with format and version info.

Validation: If no schemas are registered, note this as a governance gap and proceed with codebase-only analysis.

Step 2: Codebase Inspection

Search the codebase for schema definition files. Consult references/compatibility-rules.md for the full list of file types and search patterns.

Use git diff to identify recently changed schema files if reviewing a PR.

Step 3: Compatibility Checks

For each schema change, evaluate against the compatibility rules in references/compatibility-rules.md. Check backward, forward and full compatibility depending on the topic's configured compatibility level.

Step 4: Schema Quality Checks

Apply the quality checks from references/compatibility-rules.md:

  • Fields without documentation annotations
  • Missing default values on optional fields
  • Inconsistent naming conventions
  • Unused or overly generic field names

Step 5: Schema Drift Detection

Compare schema files in the repo against schemas registered in the cluster:

  • Use execute_sql to sample live data and verify it matches the expected schema
  • Flag schemas in the repo that differ from what's registered
  • Flag topics with registered schemas that have no corresponding file in the repo

Success Criteria

Quantitative

  • Triggers on 90% of schema-related queries (test with 10-20 varied phrasings)
  • Completes review in under 12 tool calls (MCP + codebase search)
  • 0 false positives on breaking change detection

Qualitative

  • Breaking changes include clear migration guidance
  • Schema drift is reported with both repo and cluster versions
  • Quality findings are actionable without external documentation

Examples

Example 1: Pre-merge schema review

User says: "Review the schema changes in this PR"

Actions:

  1. Run git diff to find changed .avsc, .proto or .json schema files
  2. Fetch the currently registered schema from the cluster via Lenses MCP
  3. Evaluate each change against compatibility rules Result: Report listing any breaking changes with migration guidance

Example 2: Full schema audit

User says: "Audit all schemas in the staging environment"

Actions:

  1. Fetch all registered schemas via list_topic_metadata
  2. Scan the codebase for schema files
  3. Check for drift between repo and cluster
  4. Run quality checks on all schemas Result: Comprehensive report covering compatibility, quality and drift

Example 3: Investigating a consumer failure

User says: "Consumers are failing to deserialise messages from orders.payment.completed"

Actions:

  1. Fetch the registered schema for that topic via get_topic_metadata
  2. Sample live data with execute_sql to see actual message format
  3. Compare against the schema file in the repo Result: Diagnosis of schema mismatch with remediation steps

Troubleshooting

No schemas registered in the cluster

Cause: Schema Registry is not configured or topics use schemaless formats (plain JSON, CSV). Solution: This is a valid finding - report it as a governance gap rather than an error. Recommend adding schema registration.

Schema drift detected but intentional

Cause: The cluster schema was updated independently of the repo (e.g., via Schema Registry UI). Solution: Report the drift and recommend syncing the repo to match the cluster as the source of truth.

Cannot sample data with execute_sql

Cause: Topic is empty, permissions are restricted or the topic uses an unsupported format. Solution: Note the limitation in the report. Use get_topic_metadata as a fallback for schema information.

Output Format

## Schema Review Report

### Environment: {name}

### Breaking Changes (must fix before merge)
- [schema-file] Description of the breaking change
  Affected topics: {list}
  Migration: {guidance}

### Compatibility Warnings
- [schema-file] Description of the issue
  Recommendation: How to fix it

### Schema Quality
- [schema-file:field] Description of the quality issue
  Recommendation: How to improve it

### Schema Drift
- [topic-name] Schema in repo differs from registered schema
  Repo version: {summary} | Cluster version: {summary}

### Summary
- X breaking changes found
- Y compatibility warnings found
- Z quality issues found
- Schema files scanned: N
- Topics with drift: M

What ships with it: 2 files

3.1 KB alongside SKILL.md

Gives 0 of the 12 instructions most review quality skills give in ~1.2k tokens

Counted across 1,273 of the 2,403 authors here whose files we hold, read 2026-09-06

  • Ask one question at a timein 63 of 1273, across 62 files
  • Provide a recommended answer for each questionin 47 of 1273, across 45 files
  • Rank findings by severityin 44 of 1273
  • Use parameterized queries for database accessin 38 of 1273, across 20 files
  • Validate all user input with schemasin 33 of 1273, across 15 files
  • Store secrets in environment variablesin 32 of 1273, across 14 files
  • Explore the codebase to answer questionsin 31 of 1273, across 29 files
  • Store tokens in httpOnly cookiesin 30 of 1273, across 12 files
  • Implement rate limiting on API endpointsin 30 of 1273, across 12 files
  • Sanitize user-provided HTMLin 29 of 1273, across 11 files
  • Return generic error messages to usersin 28 of 1273, across 10 files
  • Cite file and line for every findingin 28 of 1273, across 25 files

Said here and by no other author read

  • Fetch registered schemas from the cluster
  • Scan codebase for schema definition files
  • Detect breaking changes against compatibility rules
  • Check schema quality against best practices
  • Check schema drift between repo and cluster
  • Report findings with migration guidance

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.