install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/redis/agent-skills/redis-development" ~/.claude/skills/comeonoliver-skillshub-redis-development && rm -rf "$T"
manifest:
skills/redis/agent-skills/redis-development/SKILL.mdsource content
Redis Best Practices
Comprehensive performance optimization guide for Redis, including Redis Query Engine, vector search, and semantic caching. Contains 29 rules across 11 categories, prioritized by impact to guide automated optimization and code generation.
When to Apply
Reference these guidelines when:
- Designing Redis data models and key structures
- Implementing caching, sessions, or real-time features
- Using Redis Query Engine (FT.CREATE, FT.SEARCH, FT.AGGREGATE)
- Building vector search or RAG applications with RedisVL
- Implementing semantic caching with LangCache
- Optimizing Redis performance and memory usage
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Data Structures & Keys | HIGH | |
| 2 | Memory & Expiration | HIGH | |
| 3 | Connection & Performance | HIGH | |
| 4 | JSON Documents | MEDIUM | |
| 5 | Redis Query Engine | HIGH | |
| 6 | Vector Search & RedisVL | HIGH | |
| 7 | Semantic Caching | MEDIUM | |
| 8 | Streams & Pub/Sub | MEDIUM | |
| 9 | Clustering & Replication | MEDIUM | |
| 10 | Security | HIGH | |
| 11 | Observability | MEDIUM | |
Quick Reference
1. Data Structures & Keys (HIGH)
- Choose the Right Data Structuredata-choose-structure
- Use Consistent Key Naming Conventionsdata-key-naming
2. Memory & Expiration (HIGH)
- Configure Memory Limits and Eviction Policiesram-limits
- Set TTL on Cache Keysram-ttl
3. Connection & Performance (HIGH)
- Avoid Slow Commands in Productionconn-blocking
- Use Pipelining for Bulk Operationsconn-pipelining
- Use Connection Pooling or Multiplexingconn-pooling
- Configure Connection Timeoutsconn-timeouts
4. JSON Documents (MEDIUM)
- Use JSON Paths for Partial Updatesjson-partial-updates
- Choose JSON vs Hash Appropriatelyjson-vs-hash
5. Redis Query Engine (HIGH)
- Use DIALECT 2 for Query Syntaxrqe-dialect
- Choose the Correct Field Typerqe-field-types
- Index Only Fields You Queryrqe-index-creation
- Manage Indexes for Zero-Downtime Updatesrqe-index-management
- Write Efficient Queriesrqe-query-optimization
6. Vector Search & RedisVL (HIGH)
- Choose HNSW vs FLAT Based on Requirementsvector-algorithm-choice
- Use Hybrid Search for Better Resultsvector-hybrid-search
- Configure Vector Indexes Properlyvector-index-creation
- Implement RAG Pattern Correctlyvector-rag-pattern
7. Semantic Caching (MEDIUM)
- Configure Semantic Cache Properlysemantic-cache-best-practices
- Use LangCache for LLM Response Cachingsemantic-cache-langcache-usage
8. Streams & Pub/Sub (MEDIUM)
- Choose Streams vs Pub/Sub Appropriatelystream-choosing-pattern
9. Clustering & Replication (MEDIUM)
- Use Hash Tags for Multi-Key Operationscluster-hash-tags
- Use Read Replicas for Read-Heavy Workloadscluster-read-replicas
10. Security (HIGH)
- Use ACLs for Fine-Grained Access Controlsecurity-acls
- Always Use Authentication in Productionsecurity-auth
- Secure Network Accesssecurity-network
11. Observability (MEDIUM)
- Use Observability Commands for Debuggingobserve-commands
- Monitor Key Redis Metricsobserve-metrics
How to Use
Read individual rule files for detailed explanations and code examples:
rules/rqe-index-creation.md rules/vector-rag-pattern.md
Each rule file contains:
- Brief explanation of why it matters
- Correct example(s) with explanation
- Either an "Incorrect" example (for anti-patterns that cause real harm) or "When to use / When NOT needed" guidance (for optional features)
- Additional context and references
Full Compiled Document
For the complete guide with all rules expanded:
AGENTS.md