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 45-redis-streams-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/45-redis-streams-rails)<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/45-redis-streams-rails"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/45-redis-streams-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/45-redis-streams-rails"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/45-redis-streams-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.00102 | $0.02030 |
| Opus 5 | $0.00051 | $0.01015 |
| Sonnet 5 | $0.00020 | $0.00406 |
| Haiku 4.5 | $0.00010 | $0.00203 |
Grade A, and why
redis-streams-rails 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 12d 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.
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.
How it starts
The opening of the file, as written. The whole thing — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Redis Streams
Redis Streams is the "I already have Redis, give me Kafka-ish semantics without a new operational dependency" option. Good up to medium throughput, single-region, and short retention. Outgrows the pattern at high throughput / long retention — that's Kafka territory.
The opinion
Use Redis Streams when you already run Redis (you almost certainly do) and you need pub/sub-with-history + consumer groups, but don't yet justify Kafka's operational cost. Cap streams with MAXLEN. Use consumer groups with manual acknowledgement. Periodically claim entries idle for > N minutes (PEL handling). Plan to migrate to Kafka if throughput exceeds ~10k events/sec sustained or you need cross-region replication.
Why Redis Streams over plain pub/sub
| Feature | Redis pub/sub | Redis Streams |
|---|---|---|
| Persistence | None (drop on publish if no subscriber) | Disk + AOF |
| Replay | None | Yes (read from any offset) |
| Consumer groups | No | Yes |
| Acknowledgement | No | Yes (XACK) |
| Pending tracking | No | Yes (XPENDING) |
| Memory growth | None | Bounded with MAXLEN |
If you need anything beyond fire-and-forget broadcasts: Streams, not pub/sub.
Setup
# Gemfile
gem "redis", "~> 5.0"
gem "connection_pool" # for thread-safe sharing
# config/initializers/redis.rb
REDIS_STREAMS = ConnectionPool.new(size: 10, timeout: 5) do
Redis.new(url: ENV.fetch("REDIS_STREAMS_URL"))
end
Pattern 1: Producing (XADD)
class EventPublisher
STREAM = "orders.events"
MAX_LEN = 1_000_000 # approximate cap
def self.publish(event_type:, payload:)
REDIS_STREAMS.with do |redis|
redis.xadd(
STREAM,
{
event_type: event_type,
payload: payload.to_json,
published_at: Time.current.iso8601
},
maxlen: MAX_LEN,
approximate: true # ~ trim — Redis trims when convenient, much faster
)
end
end
end
EventPublisher.publish(
event_type: "order.placed",
payload: { order_id: 42, account_id: 7, total_cents: 12_500 }
)
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.
- 12d ago First seen · 248 lines · 102 tokens per session scan A 4a0e946cba24
redis-streams-rails is a skill published in the GitHub repository sandeepmvl/rails-skills (21 stars, last pushed 3mo ago), licensed MIT. It adds 102 tokens to every session and 2,030 once invoked, about $0.0005 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.
Other skills, from other repositories
using-redis-token-buckets
Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…
spring-boot-cache
Provides patterns for implementing Spring Boot caching: configures Redis/Caffeine/EhCache providers with TTL and eviction policies, applies @Cacheable/@CacheEvict/@CachePut annotations, validates cache hit/miss behavior, and exposes metrics via Actuator. Use when adding caching to Spring Boot services, configuring…
using-redis-token-buckets
Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…
spring-data-redis
Use when implementing caching, session storage, rate limiting, or any Redis integration. Covers cache-aside pattern, key naming, TTL strategy, and serialization config.
background-job-orchestrator
Expert in background job processing with Bull/BullMQ (Redis), Celery, and cloud queues. Implements retries, scheduling, priority queues, and worker management. Use for async task processing, email campaigns, report generation, batch operations. Activate on "background job", "async task", "queue", "worker", "BullMQ"…
nw-sd-patterns
Core distributed systems patterns - load balancing, caching, sharding, consistent hashing, message queues, rate limiting, CDN, Bloom filters, ID generation, replication, conflict resolution, CAP theorem.