redis-connections

redis-connections is a skill for Claude Code from redis/agent-skills. It costs 106 tokens per session (1,216 once invoked), scanned A, original, MIT.

Guidance for connecting applications to Redis, a fast data store often used for caching, queues, and short-lived data. It covers sharing connections, grouping commands, caching responses, and setting time limits.

In plain words
What is it for?
Use it when setting up or reviewing Redis clients such as redis-py, Jedis, Lettuce, go-redis, or NRedisStack, especially for high traffic or many small Redis operations.
Why use it?
It helps avoid slow requests, too many open connections, unsafe production commands, and failures caused by waiting indefinitely.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the redis-development plugin — 8 skills shipped together

not rated 144repo +4 2d ago A scan Socket: passSnyk: passSkillSpector: pass 106 tokens original MIT

Good fit Use it when setting up or reviewing Redis clients such as redis-py, Jedis, Lettuce, go-redis, or NRedisStack, especially for high traffic or many small Redis operations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/redis/agent-skills/redis-connections
About the project

Redis Agent Skills is Redis's collection of packaged instructions and resources that teach AI coding agents how to work with Redis data structures, connections, search, caching, clustering, security, observability, and agent memory. It is for developers using coding agents to build or troubleshoot Redis-backed applications. The catalogue entries are the project's own agent skills, instructions, and plugin packaging.

redis/agent-skills · 144 stars · on GitHub · redis.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add redis/agent-skills --skill redis-connections
Clone the repo
git clone --depth 1 https://github.com/redis/agent-skills

Made for: Claude Code.

Or install redis-development, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for redis-connections

README.md
[![agentmods](https://agentmods.dev/badge/skills/redis/agent-skills/redis-connections/github.svg)](https://agentmods.dev/skills/redis/agent-skills/redis-connections)
Your own site
<a href="https://agentmods.dev/skills/redis/agent-skills/redis-connections"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/redis-connections/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for redis-connections

Your own site · 80×15
<a href="https://agentmods.dev/skills/redis/agent-skills/redis-connections"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/redis-connections.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,216 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 26 Aug 2026
  • Snyk pass 26 Aug 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00106 $0.01216
Opus 5 $0.00053 $0.00608
Sonnet 5 $0.00021 $0.00243
Haiku 4.5 $0.00011 $0.00122

Measured 10d ago against content hash ee6caf1b8c97, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

redis-connections scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/redis-development/skills/redis-connections/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 setup (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.

1. 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).
Style Used by Note
Pool redis-py, Jedis, go-redis Each lease blocks if pool exhausted; size the pool to your concurrency
Multiplex Lettuce, NRedisStack Single connection; cannot carry blocking commands like BLPOP
# redis-py — connection pool
pool = redis.ConnectionPool(host="localhost", port=6379, max_connections=50)
r = redis.Redis(connection_pool=pool)

See references/pooling.md for Python + Java + Lettuce examples.

2. Pipeline bulk work

For N commands that don't depend on each other's results, send them as a single batch with pipelining. One round-trip instead of N.

pipe = redis.pipeline()
for user_id in user_ids:
    pipe.get(f"user:{user_id}")
results = pipe.execute()

Use non-transactional pipelining for performance, and pipeline(transaction=True) only when you actually need atomicity (see redis-core's transactions guidance).

See references/pipelining.md.

Read the full file on GitHub · 123 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 123 lines · 106 tokens per session scan A ee6caf1b8c97

Subscribe to this mod's changes

redis-connections is a skill published in the GitHub repository redis/agent-skills (144 stars, last pushed 2d ago), licensed MIT. It adds 106 tokens to every session and 1,216 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.