What problem does it solve?
Redis misuse such as blocking KEYS commands, missing TTLs, oversized values, and unbatched calls causes production outages and memory leaks. This Skill gives AI coding assistants concrete rules to prevent these failures when writing or reviewing Redis code.
Core Features & Use Cases
- Blocking Command Prevention: Bans KEYS, FLUSHDB, and FLUSHALL, replacing them with cursor-based SCAN iteration in Go, Java, and Python.
- Memory and Size Controls: Enforces mandatory TTL on every key and caps values at 10KB or 5000 collection elements.
- Batch Operation Optimization: Converts loops of single Redis calls into Pipeline executions to reduce network round trips.
- Use Case: When asking an AI assistant to write a token caching layer with go-redis, the generated code automatically uses SCAN instead of KEYS, sets a 24-hour TTL, and batches reads through a Pipeline.
Quick Start
Review my Redis code and rewrite any KEYS calls, missing TTLs, or unbatched loops according to the redis-safety rules.