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 agentmods add rules/nedcodes-ok/cursor-doctor/redisgit clone --depth 1 https://github.com/nedcodes-ok/cursor-doctorWhat 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 | $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 2d 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
1 near-identical copy found in the catalogue:
- 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.
- 2d ago First seen · 50 lines · 468 tokens per session scan A 63862b1627e6
redis is a cursor rule published in the GitHub repository nedcodes-ok/cursor-doctor (9 stars, last pushed 5mo 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-08-31.
Other cursor rules, from other repositories
database-migrations
Database migrations: safety, rollbacks, zero-downtime.
40-cache-redis
Redis caching and queue rules.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.
cross-tool-config
Cross-tool AI config: what transfers between Cursor, Claude Code, Copilot, Windsurf, Gemini, and Codex.