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.
git clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collectionWrote 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/rules/nedcodes-ok/cursorrules-collection/redis)<a href="https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/redis"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/redis.svg" alt="Measured on agentmods" 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.00468 | $0.00468 |
| Opus 5 | $0.00234 | $0.00234 |
| Sonnet 5 | $0.00094 | $0.00094 |
| Haiku 4.5 | $0.00047 | $0.00047 |
Grade A, and why
redis 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 3d 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.
Copies of this mod
2 near-identical copies found in the catalogue:
- redis — 100% identical, 0 lines differ
- canonical__eedis — 100% identical, 0 lines differ
What it actually says
Redis Cursor Rules
You are an expert Redis developer. Follow these rules:
Data Structures
- Strings for simple key-value and counters (INCR/DECR are atomic)
- Hashes for objects — HSET user:123 name "Alice" email "alice@..."
- Sorted sets for leaderboards, rate limiters, priority queues
- Lists for queues (LPUSH/RPOP) and activity feeds
- Sets for unique collections and intersection/union operations
- Streams for event sourcing and message queues
Key Design
- Namespace keys with colons: user:123:session, post:456:likes
- Keep keys short but readable — abbreviate namespaces in high-volume scenarios
- Set TTL on every cache key — no key should live forever without reason
- Use SCAN over KEYS — KEYS blocks the single-threaded server
Caching Patterns
- Cache-aside: app checks cache, falls back to DB, writes to cache
- Write-through for data that must stay consistent
- TTL-based invalidation for most use cases. Event-based for critical consistency
- Serialize as JSON or MessagePack — avoid language-specific formats
- Cache stampede prevention: use locks or stale-while-revalidate
Performance
- Pipeline multiple commands to reduce round trips
- Lua scripts for atomic multi-step operations (EVAL/EVALSHA)
- Avoid large values (>100KB) — split into smaller keys
- Use OBJECT ENCODING to verify memory-efficient encodings
- Monitor with INFO stats, SLOWLOG, and CLIENT LIST
Pub/Sub & Streams
- Pub/Sub for fire-and-forget broadcasting — messages are lost if no subscriber
- Streams for persistent messaging with consumer groups
- XACK processed messages. Set MAXLEN to cap stream size
- Use consumer groups for distributed work distribution
Operations
- Redis Sentinel for high availability, Redis Cluster for horizontal scaling
- RDB snapshots for backups. AOF for durability
- maxmemory-policy: allkeys-lru for caches, noeviction for primary data
- Monitor memory with INFO memory — watch fragmentation ratio
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.
- 3d ago First seen · 50 lines · 468 tokens per session scan A 63862b1627e6
redis is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (37 stars, last pushed 6mo ago), licensed MIT. It adds 468 tokens to every session, about $0.0023 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-09-03.
Other cursor rules, from other repositories
40-cache-redis
Redis caching and queue rules.
redis
Redis: data structures, caching patterns, pub/sub.
30-database-postgres
PostgreSQL and persistence rules.
mysql-auto
This rule enforces MySQL-specific best practices to enhance readability, performance, security, and maintainability. It targets MySQL features (e.g., storage engines, character sets) and common pitfalls, and adds concrete guidance for schema design and creation.
10-feature-development
Feature implementation workflow and engineering mindset.
11-template-conventions
Reusable building blocks shipped with this template - use them instead of writing new ones.