redis-clustering
Skill by redis
Redis Cluster guidance for designing hash-tagged keys, avoiding CROSSSLOT errors, and routing reads to replicas. It is for developers running sharded Redis Cluster or primary/replica setups.
Install redis-clustering
Built from the published package, never by AI.
git clone --depth 1 https://github.com/redis/agent-skills /tmp/agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills/skills/redis-clustering ~/.claude/skills/redis-clusteringRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/redis/agent-skills /tmp/agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agent-skills/skills/redis-clustering ~/.gemini/antigravity-cli/skills/redis-clusteringAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill gives guidance on Redis Cluster key design and read routing. It covers hash tags, which force related keys into the same slot so multi-key commands such as MGET, SDIFF, transactions, pipelines and multi-key Lua scripts work without CROSSSLOT errors. The source explains that only the part between { and } is hashed, and advises tagging only the entities that need grouped operations.
The skill also covers read replicas for read-heavy workloads. It shows how to enable replica reads in a Redis Cluster client and how to split reads and writes between a primary and a replica in standalone replication. The source notes that replicas are eventually consistent, so they suit caches, analytics, dashboards and recommendation feeds, but not strict freshness needs. It is aimed at developers designing keys for a sharded Redis Cluster or scaling reads without adding shards.
Written from the project's SKILL.md and checked against it.
What it can do
- Hash tag key designExplains how to use {tag} segments so related keys share a slot in Redis Cluster.
- CROSSSLOT debuggingHelps diagnose CROSSSLOT errors on MGET, SDIFF, pipelines and transactions.
- Multi-key transactionsGuides configuring transactions and Lua scripts that touch multiple keys in a cluster.
- Replica read routingShows how to route reads to replicas to scale read-heavy workloads.
What you need
- A sharded Redis Cluster or primary/replica replication setup
- Python with a Redis client (code examples use redis-py)
Try asking
- Help me design hash tag key names for user data in Redis Cluster
- Why am I getting a CROSSSLOT error on my MGET call in Redis?
- Show me how to route read traffic to Redis replicas for my dashboard
Good to know
- Replicas are eventually consistent, so they are not suited to reads needing strict freshness
- Over-tagging keys creates hotspots and defeats sharding, according to the source
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/redis-clustering/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md4 KB -
references/hash-tags.md2 KB -
references/read-replicas.md1 KB
Alternatives to redis-clustering
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
redis-clustering: common questions
What causes CROSSSLOT errors in Redis Cluster?
The source says multi-key commands such as MGET, SDIFF, transactions, pipelines and multi-key Lua scripts need all keys on the same slot. Keys on different slots return a CROSSSLOT error.
What is a Redis hash tag?
The part of a key between { and } is the only part hashed for slot assignment. Keys sharing a hash tag always land on the same slot.
When should I read from Redis replicas?
The source suggests replica reads for cache layers, analytics, dashboards and recommendation feeds. It advises against them for financial balances or idempotency state.
How do I install redis-clustering?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is redis-clustering free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is redis-clustering safe to use?
It scores 81 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to redis-clustering?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
