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.5 | $0.00041 | $0.00812 |
| Sonnet 5.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 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.
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", "~> 6.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.
- 2mo ago Changed 2bad1f619b71
- 3mo 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 (22 stars, last pushed 2mo ago), licensed MIT. It adds 102 tokens to every session and 2,030 once invoked, about $0.0004 per session on Opus 5.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.
redis-streams-rails compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| redis-streams-railssandeepmvl/rails-skills | Skill | 22 | 2mo ago | MIT | A | 102 | Claude Code, Codex |
| using-redis-token-bucketsPostHog/posthog-foss | Skill | 736 | today | MIT | A | 148 | Claude Code, Codex |
| using-redis-token-bucketsPostHog/posthog | Skill | 41k | today | none | A | 148 | Claude Code, Codex |
| background-job-orchestratorcuriositech/some_claude_skills | Skill | 284 | 5d ago | MIT | A | 95 | Claude Code |
| spring-data-redisrrezartprebreza/spring-boot-skills | Skill | 374 | 15d ago | MIT | A | 37 | Claude Code, Codex |
| idempotency-handlingsecondsky/claude-skills | Skill | 257 | 3d ago | MIT | A | 46 | Claude Code |
| bullmqzhe-qi/clhoria-template | Skill | 194 | 5d ago | MIT | A | 45 | Claude Code |