redis-connections
Skill by redis
Explains how to use Redis clients efficiently, covering connection pooling, pipelining, client-side caching and socket timeouts. Built for developers configuring redis-py, Jedis, Lettuce, NRedisStack or similar clients.
Install redis-connections
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-connections ~/.claude/skills/redis-connectionsRun 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-connections ~/.gemini/antigravity-cli/skills/redis-connectionsAntigravity 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
The redis-connections skill is client-side guidance for using Redis efficiently from application code. It covers connection pooling and multiplexing, pipelining batched commands, client-side caching with RESP3, and avoiding slow commands such as KEYS, SMEMBERS and HGETALL. It also explains how to set connect and read timeouts.
The skill gives examples for redis-py and points to reference files for Java and Lettuce. It recommends SCAN, SSCAN and HSCAN for large keyspaces and containers, and says blocking commands such as BLPOP should always take a timeout. It is published by Redis, Inc. under the MIT license and is aimed at developers who configure or review Redis clients or batch commands for throughput.
Written from the project's SKILL.md and checked against it.
What it can do
- Connection pooling and multiplexingExplains when to pool connections and when to share a single multiplexed connection.
- PipeliningShows how to send independent commands as one batch to cut round trips.
- Client-side cachingCovers enabling RESP3 client-side caching for read-heavy hot keys.
- Avoiding slow commandsRecommends SCAN, SSCAN and HSCAN in place of KEYS, SMEMBERS and HGETALL.
- Socket timeoutsDescribes setting connect, read and write timeouts to match the application's failure model.
What you need
- A Redis client library such as redis-py, Jedis, Lettuce, go-redis or NRedisStack
Try asking
- Review my redis-py setup and suggest a connection pool size
- Replace my KEYS call with a SCAN loop in this code
- Set connect and read timeouts for my Redis client
Good to know
- Multiplexed connections (Lettuce, NRedisStack) cannot carry blocking commands like BLPOP.
- Client-side caching requires RESP3.
- Client-side caching is not recommended for write-heavy or constantly changing data.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/redis-connections/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB -
references/blocking.md2 KB -
references/client-cache.md2 KB -
references/pipelining.md1 KB -
references/pooling.md2 KB
Show all 6 files
-
references/timeouts.md1 KB
Alternatives to redis-connections
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-connections: common questions
Should I use one Redis connection per request?
No. The skill says opening a new TCP connection for every operation is the biggest mistake in Redis client code. Use a pool or a shared multiplexed connection instead.
When should I turn on client-side caching in Redis?
The skill recommends it for data that is read often and written rarely, such as config or feature flags. It advises skipping it for write-heavy workloads because invalidation traffic can outweigh the savings.
Which Redis commands should I avoid in production?
The skill advises avoiding KEYS, SMEMBERS, HGETALL and LRANGE 0 -1 on large data. It recommends SCAN, SSCAN, HSCAN and paginated LRANGE instead.
How do I install redis-connections?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is redis-connections free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is redis-connections 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-connections?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
