Skip to content
Skillv1.0.0

kafka-development-practices

Applies general coding standards and best practices for Kafka development with Scala.

by oimiragieo(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from oimiragieo/agent-studio (.claude/skills/kafka-development-practices/SKILL.md). Install upstream with npx skills add oimiragieo/agent-studio --skill kafka-development-practices. Copyright stays with the author.

Kafka Development Practices Skill

  • All topic names config values (Typesafe Config or pure-config).
  • Use Format or Codec from the JSON or AVRO or another library that is being used in the project.
  • Streams logic must be tested with TopologyTestDriver (unit-test) plus an integration test against local Kafka.

Iron Laws

  1. ALWAYS set explicit acks=all and min.insync.replicas=2 for production producers — acks=1 (default) loses messages on leader failure before replication; acks=0 provides no delivery guarantee.
  2. NEVER commit offsets before processing is complete — committing before processing causes data loss if the consumer crashes between commit and processing; always commit after successful processing.
  3. ALWAYS implement idempotent consumers (deduplicate by message key or sequence number) — Kafka's at-least-once delivery guarantees duplicate messages on consumer restarts; processing without deduplication corrupts state.
  4. NEVER use auto-offset-reset=earliest in production consumers for existing topics — earliest replays the entire topic history from the beginning on first start; use latest for new consumers on existing topics.
  5. ALWAYS set max.poll.interval.ms to a value larger than your maximum processing time — if processing takes longer than max.poll.interval.ms, the consumer is evicted from the group, triggering a rebalance and duplicate processing.

Anti-Patterns

Anti-Pattern Why It Fails Correct Approach
acks=1 for critical data Leader failure before replication = message loss; no recovery path Set acks=all + min.insync.replicas=2; use retries with idempotent producer
Committing offsets before processing Consumer crash after commit but before processing = message silently dropped Process completely and durably, then commit; or use transactions for exactly-once
Non-idempotent consumer logic Rebalances and restarts deliver duplicates; state corrupted without deduplication Deduplicate by message key/sequence; use idempotent DB writes (upsert by key)
auto.offset.reset=earliest on existing topics Consumer reads entire topic history on first start; may replay millions of events Set latest for new consumer groups on existing topics; use earliest only for replay scenarios
Default max.poll.interval.ms=300s for slow processors Slow processing triggers consumer group rebalance mid-batch; duplicate processing Set max.poll.interval.ms > worst-case processing time; reduce batch size if needed

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/oimiragieo-agent-studio-kafka-development-practices/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

oimiragieo-agent-studio-kafka-development-practices.ocm.jsonjson
{
  "ocm": "1",
  "id": "oimiragieo-agent-studio-kafka-development-practices",
  "kind": "skill",
  "name": "kafka-development-practices",
  "description": "Applies general coding standards and best practices for Kafka development with Scala.",
  "publisher": "oimiragieo",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "kafka",
      "streaming",
      "messaging",
      "events",
      "distributed",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Applies general coding standards and best practices for Kafka development with Scala."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/oimiragieo/agent-studio",
      "path": ".claude/skills/kafka-development-practices/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/oimiragieo/agent-studio/blob/HEAD/.claude/skills/kafka-development-practices/SKILL.md",
      "key": "oimiragieo/agent-studio/.claude/skills/kafka-development-practices/SKILL.md"
    }
  },
  "instructions": "# Kafka Development Practices Skill\n\n<identity>\nYou are a coding standards expert specializing in kafka development practices.\nYou help developers write better code by applying established guidelines and best practices.\n</identity>\n\n<capabilities>\n- Review code for guideline compliance\n- Suggest improvements based on best practices\n- Explain why certain patterns are preferred\n- Help refactor code to meet standards\n</capabilities>\n\n<instructions>\nWhen reviewing or writing code, apply these guidelines:\n\n- All topic names config values (Typesafe Config or pure-config).\n- Use Format or Codec from ",
  "cost": {
    "context_tokens": 1024
  }
}

Fetch it by URL: GET /api/v1/registry/oimiragieo-agent-studio-kafka-development-practices/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.