awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.
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/sanjeed5/awesome-cursor-rules-mdc/redisgit clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdcWrote 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/sanjeed5/awesome-cursor-rules-mdc/redis)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/redis"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/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 | $0.02557 | $0.02557 |
| Opus 5 | $0.01278 | $0.01278 |
| Sonnet 5 | $0.00511 | $0.00511 |
| Haiku 4.5 | $0.00256 | $0.00256 |
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 yesterday.
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 — 330 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Redis Best Practices
Redis is a powerful, single-threaded, in-memory database. Its efficiency hinges on how you interact with it. Follow these rules to ensure your applications are performant, scalable, and resilient.
1. Data Modeling & Key Design
Efficient key design is paramount for performance and memory.
1.1. Use Hierarchical Key Naming
Adopt a consistent, hierarchical key naming convention. This improves readability and allows for logical grouping.
❌ BAD
user:1:name
user:1:email
product:123:details
order:456:items
✅ GOOD
user:1:profile:name
user:1:profile:email
product:123:data
order:456:cart:items
Rationale: Clearer separation, better organization.
1.2. Avoid Large Objects in Single Keys
Do not store multi-megabyte objects in a single key. Break down complex data into hashes or streams. This improves eviction, replication, and memory efficiency.
❌ BAD
# Storing a large JSON object directly as a string
user_data = {"id": 1, "name": "Alice", "preferences": {...large_object...}, "history": [...many_items...]}
redis_client.set(f"user:1:data", json.dumps(user_data))
✅ GOOD
# Using a Redis Hash for structured data
redis_client.hset(f"user:1:profile", mapping={
"id": 1,
"name": "Alice",
"email": "[email protected]"
})
# Storing large, evolving data in a stream or separate keys
redis_client.xadd(f"user:1:activity_stream", {"action": "login", "timestamp": time.time()})
Rationale: Hashes are optimized for field-value pairs, streams for time-series data. This keeps individual values small, aiding Redis's single-threaded nature.
1.3. Use Hashtags for Multi-Key Operations in Clusters
When performing multi-key operations (e.g., transactions, Lua scripts) in a Redis Cluster, ensure all involved keys reside on the same hash slot by using hashtags.
❌ BAD
# These keys will likely be on different slots, causing MOVED errors in a cluster
redis_client.mget("user:1:profile", "user:1:orders")
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.
- yesterday First seen · 330 lines · 2,557 tokens per session scan A e0414707cf63
redis is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 2,557 tokens to every session, about $0.0128 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
add-caching-by-wrapping-a-layer
Cursor rule "add-caching-by-wrapping-a-layer" from PaulJPhilp/EffectPatterns, covering add caching by wrapping a layer and example.
module-state-ownership
Module-state ownership & caches built from hot-reloading settings — How mutable module-scope state is owned here, and what caching anything derived from settings() obliges. Canonical file is .agents/rules/module-state-ownership.md.
cache
为了方便开发者进行缓存操作的组件,它有利于改善项目的性能。它为我们提供了一个数据中心以便进行高效的数据访问。.
full-test-with-db-redis
Run full tests with Docker db and redis.
redis_rate_limiting
Complete guide for implementing Redis-based rate limiting with authentication troubleshooting and FastAPI integration.
40-cache-redis
Redis caching and queue rules.