kafka-schema-registry

Scans a project to identify Kafka applications, extracts schemas from data models, marks PII fields, generates Terraform configuration for registering with Confluent Schema Registry, and produces a migration report that includes publish ordering. Used when analyzing Kafka usage in a folder or codebase, extracting schemas, auditing producer/consumer configurations, or generating Terraform for Schema Registry.

Last repository push
GitHub Stars
212
Forks
664
Issues / PRs
21

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kafka-schema-registry" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-532a731f3ddac787e8cbb61c51543995ec25f14b5904f59baea9d80932fb611f. Verify the upstream source and version against https://github.com/Kilo-Org/kilo-marketplace before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Scans a project to identify Kafka applications, extracts schemas from data models, marks PII fields, generates Terraform configuration for registering with Confluent Schema Registry, and produces a migration report that includes publish ordering. Used when analyzing Kafka usage in a folder or codebase, extracting schemas, auditing producer/consumer configurations, or generating Terraform for Schema Registry.

0 Downloads

Introduction source: third_party · Kilo-Org · 0.0.1 Reference

SkillPi interpretation

Audience
Invoke this skill when: A user asks to analyze a project for Kafka usage in order to add event schemas or integrate Schema Registry A user wants to extract schemas from Kafka producers A user wants Terraform to register schemas to Schema Registry A user wants to audit Kafka producer/consumer configurations
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: kafka-schema-registry
description: >-
  Scan a project to identify Kafka applications, extract schemas from data
  models, tag PII fields, generate Terraform for Confluent Schema Registry
  registration, and produce a migration report with rollout ordering. Use this
  skill when a user asks to analyze a folder or repo for Kafka usage, extract
  schemas, audit producer/consumer configurations, or generate Terraform for
  Schema Registry.
metadata:
  category: data
  source:
    repository: 'https://github.com/confluentinc/agent-skills'
    path: skills/kafka-schema-registry
    license_path: LICENSE
    commit: 9095afceac13c8924c7b9993b26f0f57abd8b267

Kafka Schema Registry Skill

Scan a project to identify Kafka applications, extract schemas, generate Terraform for Schema Registry registration, and produce a comprehensive analysis report.

When to Use

Invoke this skill when:

  • A user asks to analyze a project for Kafka usage in order to add event schemas or integrate Schema Registry
  • A user wants to extract schemas from Kafka producers
  • A user wants Terraform to register schemas to Schema Registry
  • A user wants to audit Kafka producer/consumer configurations

Deliverables

This skill produces 3 outputs in the target project:

  1. schema-report.md — Full analysis report with findings, risks, and upgrade recommendations
  2. schemas/ — Extracted schema files (Avro, JSON Schema, Protobuf) with PII tagging
  3. terraform/ — Terraform configs using Confluent provider to register schemas

Optional: Code Migration Assistance

If the user asks for their application code to be updated to integrate Schema Registry, use the Code Migration Reference to update the code with proper Schema Registry integration patterns.


High-Level Workflow

Phase 0: Initialize

  • Check for existing schema.yaml and schemas/ directory manually
  • Note any existing schema infrastructure in the report

Phase 1: Project Scan & Kafka Detection

  1. Find build files — Search for pom.xml, build.gradle, requirements.txt, package.json, etc.
  2. Detect Kafka dependencies — Look for spring-kafka, confluent-kafka, kafkajs, etc.
  3. Find producers & consumers — Grep for KafkaTemplate, Producer(, producer.send, etc.
  4. Extract topic names — From string literals, config properties, YAML files
  5. Identify serializers — Find value.serializer, KafkaAvroSerializer, custom serializers
  6. Build app catalog — Compile findings: app name, language, role, topics, serializer, category

Detailed patterns: Detection Patterns Reference

App catalog structure:

app_name: module name
language: Java | Python | .NET | Go | Node/TS
role: producer | consumer | both
topics: [list of topics]
serializer_class: value.serializer used
custom_serializer: true | false
schema_format: AVRO | JSON | PROTOBUF | UNKNOWN
sr_integrated: true | false
category: A | B | C | D | E  # REQUIRED

Multi-schema topic detection:

  • If multiple data models produce to the same topic, create a wrapper schema with oneOf/union/oneof
  • Generate Terraform with schema_reference blocks
  • Flag prominently in report

Phase 2: Risk Detection

Search for:

  • auto.register.schemas=true — Uncontrolled schema evolution (Category C)
  • use.latest.version — Eases migration when set
  • Custom serializers — Bypass SR entirely (Category E)

Record file path, line number, and affected topics for each occurrence.

Patterns: Detection Patterns Reference

Phase 3: Schema Inference

For each producer:

  1. Check for existing schema files — **/*.avsc, **/*.proto, **/*.schema.json
  2. Infer from data models — Java classes, Pydantic models, TypeScript interfaces, Go structs
  3. Infer from inline data — HashMap, dict literals, map[string]any, plain objects, JSON strings
  4. Convert to schemas — Map language types to JSON Schema / Avro / Protobuf
  5. Tag PII fields — Scan field names for email, ssn, phone, address, etc.

PII tagging: Add confluent:tags (PII, PRIVATE, SENSITIVE, PHI) to detected fields.

Detailed inference patterns: Schema Inference Reference

Phase 4: Categorize Producers

Classify each producer:

Category Criteria
A: Compliant Confluent serializer + SR + no auto.register
A→Header Already on SR, migrating to headers
B: Schema in code, no SR Data models exist, but no SR integration
C: Auto-register auto.register.schemas=true
D: No schema Raw strings/bytes, no data model
E: Custom serializer Custom Serializer<T> or inline serialization without SR

CRITICAL: Use exact phrase "Category X" in:

  • App catalog field
  • Applications Discovered table
  • Report section headers
  • Terraform comments
  • Risk sections

Details: Categorization Reference

Phase 5: Create Schema Files

Directory structure:

schemas/
├── avro/
│   └── {topic}-value.avsc
├── json/
│   └── {topic}-value.json
└── proto/
    └── {topic}-value.proto

File naming: MUST use kebab-case (lowercase with hyphens):

  • Value: {topic}-value.{ext}
  • Key: {topic}-key.{ext}
  • Examples: order-events-value.avsc, user-notifications-value.json

Initialize: Create schema.yaml.

Validate: Call schema_lint(path: schemas/, fix: true) if available.

Phase 6: Generate Terraform

File structure (MANDATORY separate files):

terraform/
├── providers.tf              # Provider config
├── variables.tf              # Variable definitions
├── tags.tf                   # confluent_tag resources (if PII exists)
├── schemas.tf                # Active schemas (A, B, E)
├── flagged-auto-register.tf  # Category C only (commented out)
├── outputs.tf                # Output values
└── import.sh                 # Import script

CRITICAL:

  • schemas.tf = Categories A, B, E — NOT commented out
  • flagged-auto-register.tf = Category C ONLY — MUST be commented out
  • tags.tf = MUST exist if ANY schema uses confluent:tags
  • Each schema resource MUST have comment block: Topic, App, Source, Category

Templates: Terraform Templates Reference

Phase 7: Generate Report

Create schema-report.md with:

  • Executive Summary (metrics + category breakdown)
  • Applications Discovered table (EXACT format, Category column MANDATORY)
  • RISKS (auto-register, custom serializers)
  • Producer Upgrade Recommendations (per app, with "Category X" in heading)
  • Migration Rollout Ordering (by category)
  • PII Fields Detected
  • Terraform Resources Generated
  • Next Steps checklist

CRITICAL formatting requirements:

  1. Applications Discovered = markdown table, NOT narrative sections
  2. Every app section MUST say "Category X" explicitly
  3. Terraform comment blocks required for every resource

Template: Report Template Reference


Migration Rollout by Category

  • Category B (JSON, no SR): Producers first → consumers
  • Category A→Header (already on SR): Verify consumer versions → producers only
  • Category C (auto-register): Register via Terraform → disable auto-register → producers fetch latest
  • Category E (custom serializers): Consumers first (composite deserializer) → producers

Details: Categorization Reference


Edge Cases

  • Monorepos: Treat each service/module with Kafka deps as separate app
  • Multi-topic producers: Generate one schema resource per topic
  • Shared schemas: One schema file, multiple Terraform resources reference it
  • No topic names: If loaded from env vars, use placeholders with TODO
  • Test code: Skip test directories unless they contain only schema definitions
  • Multiple serializers: Create separate schema files per format

Output Organization

{project_root}/
├── schema-report.md              # Analysis report
├── schemas/
│   ├── schema.yaml               # Schema project config
│   ├── avro/
│   │   └── {topic}-value.avsc
│   ├── json/
│   │   └── {topic}-value.json
│   └── proto/
│       └── {topic}-value.proto
└── terraform/
    ├── providers.tf
    ├── variables.tf
    ├── tags.tf                    # PII/PRIVATE/SENSITIVE tags
    ├── schemas.tf                 # Active schemas (depends_on tags)
    ├── flagged-auto-register.tf   # Commented-out Category C
    ├── outputs.tf
    └── import.sh                  # Import existing schemas

Reference Documentation

  • Detection Patterns — Patterns for finding Kafka apps, dependencies, producers, consumers, serializers
  • Schema Inference — Extract schemas from data models, inline data, PII tagging
  • Categorization — Category definitions, rollout order, client version requirements
  • Terraform Templates — File structure, templates, naming conventions
  • Report Template — Required sections, formatting rules, validation checklist
  • Code Migration — Serializer/deserializer implementation patterns for Python, Java, JavaScript, Go, and .NET

Execution Approach

  1. Use Glob to find build files and schema files
  2. Use Grep for pattern detection (dependencies, producers, serializers, risks)
  3. Use Read to inspect source files and data models
  4. Use Write to create schema files, Terraform configs, and report

No need to use Agent tool — this skill is self-contained and uses direct tool calls.

Version history

  1. skills-20261103210927-6c1b454 GitHub ↗
    Original release notes

    Automated skills release from commit 6c1b4543cac1d45a80bf5904e4b69ac315117323

  2. skills-20260928190452-ff51758 GitHub ↗
    Original release notes

    Automated skills release from commit ff51758b06b8249007116184096765d47bdb7505

  3. skills-20260924105536-d31110d GitHub ↗
    Original release notes

    Automated skills release from commit d31110d62dc0bd00c22f1d6f6a630d1e702a0049

  4. skills-20260923085113-cea285e GitHub ↗
    Original release notes

    Automated skills release from commit cea285ef0e4d6ec47cd2fd9fdbca03813a3363c7

  5. skills-20260922193956-97d7333 GitHub ↗
    Original release notes

    Automated skills release from commit 97d7333d8200e5ac556c659c8669f3a83ba10866

Only the five most recent versions are shown. View full version history at the source ↗

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 针对 Kafka 项目分析、Schema 提取、PII 标记、Terraform 生成等实际工程需求,实用性强
  • 覆盖多种语言(Java/Python/.NET/Go/Node)和序列化格式(Avro/JSON/Protobuf)
Trigger Precision90/100

Highlights

  • 触发描述清晰完整,覆盖分析 Kafka 使用、提取模式、审计配置、生成 Terraform 等核心场景
Structure and Standards95/100

Areas to improve

  • 文档过长 Reported severity: Minor

    主文档超过 500 行,可能影响可读性

    Recommendation: 考虑将部分详细说明移至引用文档或附录

Highlights

  • 结构完整,包含 When to Use、Deliverables、Phase 0-7 工作流、Edge Cases 等
  • 步骤清晰,有详细示例和引用文档支持
Execution Reliability88/100

Areas to improve

  • 引用文件缺失 Reported severity: Minor

    SKILL.md 引用了 references/ 目录下的多个文档(如 detection-patterns.md、schema-inference.md 等),但未传入这些文件

    Recommendation: 补充 references/ 目录下的所有引用文档,或明确说明这些为外部参考

Highlights

  • 工具使用明确(Glob、Grep、Read、Write),流程覆盖主要异常场景
  • Terraform 配置有分类处理机制,输出文件结构清晰
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.