# redis-connections

> Claude/Codex skill by [@redis](https://omgskills.com/library/redis/index.md) · 169 stars · Updated 2026-09-08

Redis client and connection guidance covering connection pooling, multiplexing, pipelining, client-side caching with RESP3, avoiding slow commands (KEYS, SMEMBERS, HGETALL), and tuning socket timeouts. Use when configuring a Redis client (redis-py, Jedis, Lettuce, NRedisStack), batching commands for throughput, eliminating per-request connection creation, iterating large keyspaces with SCAN, enabling client-side caching for read-heavy workloads, or setting connect and read timeouts.

Tags: agent-skills, redis

## Install

```sh
git clone https://github.com/redis/agent-skills /tmp/agent-skills && ln -s /tmp/agent-skills/skills/redis-connections ~/.claude/skills/redis-connections
```

## From README

Redis Connections Client-side guidance for talking to Redis efficiently: how to share connections, how to batch commands, which commands not to call in production, when to turn on client-side caching, and how to set timeouts that fail fast without breaking healthy traffic. When to apply Creating or reviewing a Redis client (redis-py, Jedis, Lettuce, go-redis, NRedisStack). Making many small Redis calls and wondering where the latency is going. Iterating large keyspaces, sets, hashes, or lists. Enabling client-side caching for hot keys. Tuning connect / read / write timeouts. Pool or multiplex — never one connection per request The single biggest mistake in Redis client code is opening a new TCP connection for every operation. Always either: Pool — keep N persistent connections that the application leases per call (redis-py ConnectionPool, Jedis JedisPooled, go-redis client). Multiplex — share a single connection across all requests (Lettuce, NRedisStack).

## Links

- HTML page: https://omgskills.com/library/redis/agent-skills/skills/redis-connections/
- GitHub: https://github.com/redis/agent-skills
- Author: [@redis](https://omgskills.com/library/redis/index.md)

## More from this repo

- [iris-development](https://omgskills.com/library/redis/agent-skills/skills/iris-development/index.md) — Iris is Redis's umbrella for AI-focused products.
   - [@redis](https://omgskills.com/library/redis/index.md) · 169 stars
- [redis-clustering](https://omgskills.com/library/redis/agent-skills/skills/redis-clustering/index.md) — Redis Cluster and replication guidance covering hash tags for multi-key operations, avoiding CROSSSLOT errors, and...
   - [@redis](https://omgskills.com/library/redis/index.md) · 169 stars
- [redis-observability](https://omgskills.com/library/redis/agent-skills/skills/redis-observability/index.md) — Redis observability guidance — which metrics to monitor (memory, connections, hit ratio, ops/sec, rejected...
   - [@redis](https://omgskills.com/library/redis/index.md) · 169 stars
