---
name: "redis-cluster-hash-slot-sharding"
description: "Distribute in-memory cache and key-value state across master-replica nodes with Redis Cluster."
metadata:
  author: "Redis"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "setup redis cluster"
  - "use redis hash tags"
  - "reshard redis cluster nodes"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Redis Cluster 16384 Hash Slot Sharding

Configures Redis Cluster topologies: automatic data partitioning across 16,384 hash slots, hash tags for multi-key atomicity ({user:100}:profile), replica failover, and cluster resharding without downtime.

## When to Invoke
Invoke this skill whenever you need to:
- setup redis cluster
- use redis hash tags
- reshard redis cluster nodes

## Execution SOP & Rules
1. Configure redis.conf with cluster-enabled yes, cluster-config-file nodes.conf, and cluster-node-timeout 5000.
2. Initialize cluster: redis-cli --cluster create 127.0.0.1:7000 ... 127.0.0.1:7005 --cluster-replicas 1.
3. Format multi-key commands with hash tags: MGET {user:42}:name {user:42}:email to route to identical slot.
4. Verify cluster topology and slot coverage using redis-cli -p 7000 cluster info and cluster nodes.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
