redis

Designs and operates Redis data structures, caching, streams, and clusters.

22|Updated Sep 10, 2026
One-click install
npx skills add https://github.com/Lynricsy/HyperSkills --skill redis-lynricsy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redis
Source: https://github.com/Lynricsy/HyperSkills/tree/main/skills/redis
Command: npx skills add https://github.com/Lynricsy/HyperSkills --skill redis-lynricsy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Redis code fails silently in production: sessions lose their TTL on refresh, caches stampede the database when keys expire together, multi-key commands break on Cluster with CROSSSLOT errors, and queues lose messages when a worker dies. This Skill encodes the measured, version-gated rules for designing key spaces, caches, queues, search indexes, and cluster deployments that survive contact with production. ## Core Features & Use Cases - Structure and key-space design: Choose String, Hash, List, Set, Sorted Set, Stream, JSON, Bitmap, HyperLogLog, Bloom, or vector storage by access pattern, with measured listpack encoding thresholds and big-key splitting strategies. - Cache repair: Diagnose and fix synchronised-expiry avalanches, hot-key stampedes, cache penetration, and pattern-based invalidation using TTL jitter, single-flight locks, negative caching, Bloom filters, and versioned prefixes. - Cluster migration and operations: Inventory multi-key operations, apply entity-scoped hash tags, swap to cluster-aware clients, and verify with CLUSTER KEYSLOT, SLOWLOG, INFO, and --bigkeys. - Use Case: Given a worker.py that loses paid orders via RPOP and blocks the server with SMEMBERS on a 2M-member set, the Skill prescribes a Stream with consumer groups (XADD/XREADGROUP/XACK/XAUTOCLAIM) plus SSCAN or SINTERCARD, with a kill-a-consumer verification gate. ## Quick Start Review my Redis caching code and redis.conf, identify what is causing the OOM errors and the hourly database spike, and tell me exactly what to change.

Frequently Asked Questions about redis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a Redis cache that keeps overloading my database?

Classify the symptom first: periodic spikes mean synchronised expiry (add TTL jitter), one hot key means a stampede (add a single-flight lock with SET NX EX), misses on nonexistent ids mean penetration (cache negative results or add a Bloom filter). Then verify with keyspace_hits and source query counts.

Why does my Redis session lose its TTL when I update it?

A plain SET replaces the whole key including its expiry, silently making the session immortal. Use SET with KEEPTTL, re-issue EXPIRE on every refresh, or store the session as a Hash where HSET preserves the key TTL.

How do I fix CROSSSLOT errors when moving to Redis Cluster?

Cluster maps each key to one of 16384 slots by CRC16 of the key name, and multi-key commands like MGET, MULTI, and Lua scripts require all keys in one slot. Add an entity-scoped hash tag such as user:{1001}:profile so related keys share a slot, and use a cluster-aware client.

Should I use a Redis List or Stream for a task queue?

A List with RPOP gives at-most-once delivery: a worker killed mid-job loses the message. A Stream with a consumer group (XADD, XREADGROUP, XACK, XAUTOCLAIM) gives at-least-once delivery, requiring an idempotent handler and MAXLEN trimming.

Why does volatile-lru still return OOM errors in Redis?

The volatile-* policies only consider keys that have a TTL. If no key in the instance has one, volatile-lru behaves byte-identically to noeviction and writes fail with OOM. Use allkeys-lru for a pure cache or ensure every cache key is written with EX.

Does this Redis guidance apply to managed hosting providers?

All command-level and key-design rules apply on managed instances, but CONFIG SET, DEBUG, MODULE LOAD, and FLUSHALL are commonly disabled or ACL-blocked. Provider control planes, instance sizing, and IAM-based auth are explicitly out of scope.