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.
npx skills add sandeepmvl/rails-skills --skill 43-kafka-railsgit clone --depth 1 https://github.com/sandeepmvl/rails-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sandeepmvl/rails-skills/43-kafka-rails)<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/43-kafka-rails"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/43-kafka-rails/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/43-kafka-rails"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/43-kafka-rails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00122 | $0.02711 |
| Opus 5.5 | $0.00049 | $0.01084 |
| Sonnet 5.5 | $0.00024 | $0.00542 |
| Haiku 4.5 | $0.00012 | $0.00271 |
Grade A, and why
kafka-rails scanned grade A with 1 finding 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 2mo ago.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
topic: TOPIC_MAP.fetch(event.aggregate_type), How it starts
The opening of the file, as written. The whole thing — 320 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Kafka in Rails
Kafka is the right tool when you have multiple consumers of the same event stream, need replay, or need to retain events for days. Wrong tool for "I want to send a job" — use Solid Queue / Sidekiq. This skill covers production patterns for Rails apps using karafka, the maintained Ruby Kafka client.
The opinion
Use
karafka2.x for both producing and consuming. Use the Confluent Schema Registry with Avro or Protobuf — never raw JSON in production. Pick partition keys by entity (e.g.,account_id) so per-entity events are ordered. Consumers are at-least-once by default — make them idempotent. For transactional publish, use the outbox pattern (write to DB + outbox in one transaction, separate process flushes to Kafka).
Counter-positions:
- racecar (Heroku) — simpler, but less actively maintained; lacks karafka's web UI, swarm mode, and DLQ support.
- ruby-kafka — the underlying low-level client; rarely used directly anymore.
- rdkafka-ruby — karafka's underlying high-perf binding to librdkafka. Use directly only if you need very low-latency.
Setup
# Gemfile
gem "karafka", "~> 2.6"
gem "karafka-web" # admin UI
gem "avro_turf" # for schema registry; or "google-protobuf"
# karafka.rb (at the project root)
class KarafkaApp < Karafka::App
setup do |config|
config.kafka = {
"bootstrap.servers": ENV.fetch("KAFKA_BROKERS"),
"client.id": "myapp",
"compression.type": "zstd"
}
config.client_id = "myapp"
config.consumer_persistence = !Rails.env.development?
end
Karafka::Web.enable!
routes.draw do
topic "order_events" do
consumer OrderEventsConsumer
max_messages 100
max_wait_time 1_000
dead_letter_queue topic: "order_events_dlq", max_retries: 5
end
end
end
Pattern 1: Producing events (with outbox)
NEVER produce inline. If the broker is down, your business transaction can't commit (or commits with a missing event). Use the outbox pattern — canonical schema defined in event-driven-architecture:
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2mo ago Changed 8d1b26dc4d96
- 3mo ago First seen · 320 lines · 122 tokens per session scan A db2bbda9bd8a
kafka-rails is a skill published in the GitHub repository sandeepmvl/rails-skills (22 stars, last pushed 2mo ago), licensed MIT. It adds 122 tokens to every session and 2,711 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
kafka-rails compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| kafka-railssandeepmvl/rails-skills | Skill | 22 | 2mo ago | MIT | A | 122 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 70k | 5d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.3k | today | Apache-2.0 | A | 92 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.1k | today | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 701 | today | MIT | A | 105 | Claude Code, Codex |