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/cursor-doctorWrote 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/cursor-doctor/redis)<a href="https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/redis"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/redis/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/rules/nedcodes-ok/cursor-doctor/redis"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/redis.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.00468 | $0.00468 |
| Opus 5.5 | $0.00187 | $0.00187 |
| Sonnet 5.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 1mo 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.
This is a copy
100% identical to redis — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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.
- 1mo 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 (10 stars, last pushed 7mo ago), licensed MIT. It adds 468 tokens to every session, about $0.0019 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to redis, differing in 0 lines, and is treated as a copy.
Other cursor rules, from other repositories
redis
Redis: data structures, caching patterns, pub/sub.
full-stack-ship-discipline
Require frontend changes and their DB/RPC/RLS/storage/secret dependencies to ship and be remotely verified together. Apply when implementing code that reads or writes backend state. Do not apply to plan- or present-then-stop audits; production data mutation still requires confirmation.
supabase
Supabase patterns and conventions for this project.
prisma
Prisma: schema modeling, queries, migrations.
supabase
Supabase: RLS, edge functions, realtime.
40-cache-redis
Redis caching and queue rules.