Redis Clustering
Guidance for designing Redis Cluster keys and routing reads to replicas, avoiding CROSSSLOT errors and primary overload.
- CCM score
- 76 of 100
- skills.sh installs
- 2.1K
- GitHub stars
- 176
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers hash tags for multi-key operations, so keys that must share a slot land on the same shard
- Includes Python examples for
MGET-style pipelines, transactions, andread_from_replicas=Trueclient setup - Enforces the rule of tagging only entities that need multi-key operations, since blanket tagging creates hotspots
- Designed for cache layers, analytics, and dashboards where eventually consistent replica reads are acceptable
Install
$ npx -y skills add redis/agent-skills --skill redis-clustering -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Redis Clustering
Guidance for designing keys and routing reads in a sharded Redis Cluster (and in standalone primary/replica replication). Covers the two failure modes that bite most new cluster users: CROSSSLOT errors on multi-key operations, and overloading primaries with read traffic.
When to apply
- Designing keys for a Redis Cluster deployment.
- Debugging a
CROSSSLOTerror onMGET,SDIFF, transactions, or pipelines. - Implementing transactions / Lua scripts that touch multiple keys.
- Scaling out read traffic without adding shards.
1. Hash tags for multi-key operations
Redis Cluster distributes keys across 16,384 slots by hashing the key name. Any command that touches multiple keys (MGET, SDIFF, SUNIONSTORE, transactions, pipelines, Lua scripts with multiple KEYS[]) requires all keys to live on the same slot — otherwise the server returns a CROSSSLOT error.
Hash tags force this: the part between { and } is the only thing hashed for slot assignment, so two keys sharing a hash tag always land together.
Details
- Repository
- github.com/redis/agent-skills
- Categories
- Databases, Backend & APIs
- First seen
- Jul 14, 2026
Questions
What does the redis-clustering skill help with?
It guides key design for a sharded Redis Cluster, including hash tags so multi-key operations like MGET, SDIFF and pipelines avoid CROSSSLOT errors. It also covers routing read traffic to replicas for caches, analytics and dashboards.
How do I install the redis-clustering skill?
Run npx -y skills add redis/agent-skills --skill redis-clustering -y in your project. Once installed, the agent can use the skill when designing keys or debugging cluster errors.
When should I use hash tags in Redis Cluster?
Use hash tags like {user:1001} on keys that must be grouped for multi-key commands, transactions or Lua scripts on the same slot. Tag only entities that need multi-key operations, because tagging everything creates hotspots.
Can I read from Redis replicas safely?
Replicas are eventually consistent, so this skill suggests reading from them only for cache layers, analytics, dashboards and recommendation feeds. Avoid replica reads for data that needs strict freshness, such as financial balances.
Which skills are in the same category as redis-clustering?
It sits in the Databases category on Claude Marketplaces, alongside supabase-postgres-best-practices and several Prisma skills. This skill focuses on Redis key layout and replica routing for sharded clusters.
More from redis/agent-skills
All 6Similar to Redis Clustering
More Databasesredis-coreredis/agent-skills4.7K installsGuidance for choosing Redis data types and naming keys consistently across eight data structures.
redis-connectionsredis/agent-skills3.3K installsPractical Redis client guidance covering pooling, pipelining, safe scanning, client-side caching, and timeouts.
redis-best-practicesmindrally/skills2.3K installsComprehensive Redis development guide covering data structures, caching patterns, and high-availability configuration.
redis-state-managementmanutej/luxor-claude-marketplace491 installsRedis state management guide covering caching, sessions, pub/sub, distributed locks, and data structures with redis-py.
redis-patternsaffaan-m/ecc9.1K installsPractical reference for Redis caching, rate limiting, distributed locks, pub/sub, and key design in production backends.
database-shardingaj-geddes/useful-ai-prompts448 installsSkill for sharding databases across servers by range, hash, or directory lookup, with shard key guidance.