skills/kafka/SKILL.md
Set up Kafka-based event-driven microservices with Platformatic Watt. Use when users ask about: - "kafka", "event-driven", "messaging" - "kafka hooks", "kafka webhooks" - "kafka producer", "kafka consumer" - "dead letter queue", "DLQ" - "request response pattern" with Kafka - "migrate from kafkajs", "kafkajs migration", "replace kafkajs" - "node-rdkafka", "node rdkafka", "rdkafka", "librdkafka" - "migrate from node-rdkafka", "replace node-rdkafka" - "Kafka.Producer", "Kafka.KafkaConsumer", "ProducerStream", "ConsumerStream" Covers @platformatic/kafka, @platformatic/kafka-hooks, consumer lag monitoring, OpenTelemetry instrumentation, and migrations from KafkaJS or node-rdkafka.
npx skillsauth add platformatic/skills kafkaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert in integrating Apache Kafka with Platformatic Watt for event-driven microservices.
Before any Kafka setup, verify:
Node.js Version: Watt requires Node.js v22.19.0+
node --version
If below v22.19.0, inform user they must upgrade Node.js first.
Existing Watt Config: Check if watt.json already exists
ls watt.json 2>/dev/null
If no watt.json, suggest running /watt init first to set up Watt.
Based on user input ($ARGUMENTS), route to the appropriate workflow:
| Input Pattern | Action |
|--------------|--------|
| hooks, webhooks, (empty) | Run Kafka-Hooks Setup |
| producer, consumer, client | Run Kafka Client Setup |
| monitoring, lag, health | Run Consumer Lag Monitoring Setup |
| tracing, opentelemetry, otel | Run Kafka Tracing Setup |
| migrate kafkajs, kafkajs, replace kafkajs | Run KafkaJS Migration Workflow |
| migrate node-rdkafka, node-rdkafka, node rdkafka, rdkafka, librdkafka, Kafka.Producer, Kafka.KafkaConsumer, ProducerStream, ConsumerStream | Run node-rdkafka Migration Workflow |
| migrate, migration | Run Migration Detection Workflow |
When user requests Kafka webhook/hook integration:
npx wattpm@latest create/topics/{topicName}When user requests direct Kafka producer/consumer integration:
@platformatic/kafka:
npm install @platformatic/kafka
When user requests Kafka consumer lag monitoring:
@platformatic/watt-plugin-kafka-health:
npm install @platformatic/watt-plugin-kafka-health
watt.jsonWhen user requests OpenTelemetry tracing for Kafka:
@platformatic/kafka-opentelemetry:
npm install @platformatic/kafka-opentelemetry
When user wants to migrate from KafkaJS to @platformatic/kafka:
require('kafkajs') or from 'kafkajs' importsnew Kafka({...}) factory instantiation.producer(), .consumer(), .admin() callsconnect() / disconnect() lifecycle callssubscribe() + run({ eachMessage }) consumer patternsendBatch() callsCompressionTypes usagetransaction() callsKafkaJS* error classesconnect/disconnect → lazy/close)retriable → canRetry, new error classes)diagnostics_channel)When user wants to migrate from node-rdkafka to @platformatic/kafka:
require('node-rdkafka') or from 'node-rdkafka' importsnew Kafka.Producer(...)new Kafka.KafkaConsumer(...)Kafka.Producer.createWriteStream(...)Kafka.KafkaConsumer.createReadStream(...).produce(...), .poll(), .consume(...), .subscribe(...).connect(...), .disconnect(...), .on('ready'), .on('data'), .on('event.error').getMetadata(...)metadata.broker.list, group.id, enable.auto.commit, security.protocol, sasl.mechanismsnode-rdkafka with @platformatic/kafka in dependencies using the detected package managerawait client.close()When user asks for a Kafka migration but does not specify the source client:
package.json and lockfiles for kafkajs or node-rdkafkakafkajs or node-rdkafkahttp://{service-id}.plt.local{VAR_NAME} (curly braces, no dollar sign)tools
Build applications that use the Vercel Workflow SDK against a self-hosted Platformatic Workflow Service via `@platformatic/world`. Use when users ask to: - "add workflow to my app", "use workflow sdk", "self-host vercel workflow" - "set up @platformatic/world", "platformatic world", "PLT_WORLD_SERVICE_URL" - "trigger a workflow run", "start a workflow", "resume a hook" - "wire workflow in Next.js", "instrumentation.ts for workflow" - "use workflow with Fastify", "@platformatic/workflow-fastify" - "workflow build --target standalone", "callback handlers", ".well-known/workflow" - "queue handler", "world.start()", "register handlers" Covers `@platformatic/world` (the World adapter), the Vercel Workflow SDK `'use workflow'` / `'use step'` authoring model, framework wiring (Next.js via `instrumentation.ts`, Node/Express/etc. via explicit `world.start()`), and the optional `@platformatic/workflow-fastify` plugin for mounting standalone-build handlers on Fastify. Does NOT cover deploying or operating the Workflow Service itself — assumes one is already reachable at `PLT_WORLD_SERVICE_URL`.
tools
Integrate, configure, and deploy Platformatic Watt for Node.js and PHP applications. Use when users ask to: - "add watt", "setup watt", "integrate watt", "configure watt" - "deploy with watt", "containerize my app", "deploy to kubernetes" - "migrate to watt", "port my app to watt" - "create watt.json", "configure platformatic" - "wattpm", "wattpm create", "wattpm inject", "wattpm logs" - use wattpm CLI commands, manage running applications - work with Node.js application servers - run PHP, WordPress, or Laravel in Node.js Supports Next.js, Express, Fastify, Koa, Remix, Astro, NestJS, PHP, WordPress, and Laravel.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.