developing-kafka-python-client

A guide for building Python programs that send messages to or receive messages from Apache Kafka, a system for moving streams of events between applications.

In plain words
What is it for?
Creating or extending Python Kafka producers and consumers for Confluent Cloud, local Docker, or WarpStream, including schema-backed serialization and asynchronous or synchronous producers.
Why use it?
It helps choose and configure the client, message format, schema service, and deployment target instead of wiring them together from scratch.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/confluentinc/agent-skills/developing-kafka-python-client
Any agent
npx skills add confluentinc/agent-skills --skill developing-kafka-python-client
Clone the repo
git clone --depth 1 https://github.com/confluentinc/agent-skills

Made for: Claude Code, Codex.

Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,993 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00075 $0.08993
Opus 5 $0.00037 $0.04496
Sonnet 5 $0.00015 $0.01799
Haiku 4.5 $0.00007 $0.00899

Measured 2d ago against content hash 78f72714e8f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

developing-kafka-python-client scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (evals/files/existing_producer.py, references/common.py, references/consumer_avro.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/developing-kafka-python-client/SKILL.md · 450 lines

How it starts

The opening of the file, as written. The whole thing — 450 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Begin by announcing: "Using the Confluent Kafka Python Client skill to guide this project."

Confluent Kafka Python Client Creation

Generate a production-ready Python project for producing to and/or consuming from Kafka using confluent-kafka-python. Supports three target environments: Confluent Cloud (managed), Local Docker (open-source Kafka), and WarpStream (Kafka-compatible, object-storage-backed), and two producer styles: AsyncIO (non-blocking) and Synchronous (blocking). The generated code follows Confluent's best practices.

Step 1: Gather Requirements

Before generating any code, work through the questions below. Skip any question the user has already answered explicitly in their prompt — do not re-ask just for form's sake. For example, "build a producer and consumer on Confluent Cloud with an async producer" already answers #2, #3, and #4; only #1, #5, #6, #7, and #8 remain.

Mandatory confirmation gate — do not skip, even if the user answered every question. Before writing any file, you MUST send one message that:

  1. Recaps the answers you extracted as a short bulleted list (e.g., "Target: Confluent Cloud · Components: producer + consumer · Producer style: async · From scratch: yes").
  2. Asks any remaining open questions inline.
  3. Explicitly asks the user to confirm or correct before you proceed.

Then STOP and wait for the user's reply. Do not generate files in the same turn as the recap, and do not proceed on the assumption that a fully-specified prompt implies consent to generate immediately — the recap catches misinterpretations of the prompt and is required even when questions #1–#8 are all pre-answered. The only way to skip the gate is if the user has already confirmed the recap earlier in this conversation.

Read the full file on GitHub · 450 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 450 lines · 75 tokens per session scan A 78f72714e8f1

Subscribe to this mod's changes

developing-kafka-python-client is a skill published in the GitHub repository confluentinc/agent-skills (54 stars, last pushed 4d ago), licensed Apache-2.0. It adds 75 tokens to every session and 8,993 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

python-patterns

Python best practices including type hints, async patterns, testing, and project structure.

cosmicstack-labs/mercury-agent-skills · 19 tokens

python-api

Look up the public API of a Python package against the installed version and cache what's worth keeping. Four shapes by question type: (0) cache hit under scratch/api/ / /; (1) inspect.signature + pydoc.renderdoc for a symbol; (2) dir / pkgutil.itermodules for a module surface; (3) WebSearch + WebFetch of versioned…

probabl-ai/skills · 466 tokens

python-code-style

Owns Python code style for this stack: ruff for lint + format, numpydoc for docstrings. Three responsibilities — (1) place the project's ruff.toml from the bundled template once the stack and workspace are in place, (2) run ruff against any Python files Claude has just generated or edited, and (3) contextualize each…

probabl-ai/skills · 425 tokens

loom-python

Python language expertise for idiomatic, production-quality code. Use for web frameworks (FastAPI, Django, Flask), data processing (pandas, numpy), ML patterns (sklearn, pytorch), async programming, type hints, pytest, packaging with uv/poetry, and linting with ruff/mypy/black.

cosmix/loom · 69 tokens

loom-concurrency

Concurrency and parallelism patterns for multi-threaded and async code. Use when implementing async/await, parallel processing, thread safety, worker pools, channels, or debugging race conditions and deadlocks across Rust (tokio), Python (asyncio), TypeScript, and Go.

cosmix/loom · 59 tokens

python-services

Python patterns for CLI tools, async concurrency, and backend services. Use when working with Python code, building CLI apps, FastAPI services, async with asyncio, background jobs, or configuring uv, ruff, ty, pytest, or pyproject.toml.

iliaal/ai-skills · 55 tokens