Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

redis-patterns

Skill by nix-community

Provides Redis patterns for AI assistants, covering caching, rate limiting, distributed locks, Pub/Sub, Streams and connection management. It is aimed at developers building production backend applications.

  • Score 74
  • 207 stars
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install redis-patterns

Built from the published package, never by AI.

git clone --depth 1 https://github.com/nix-community/nur-combined /tmp/nur-combined && mkdir -p ~/.claude/skills && cp -r /tmp/nur-combined/repos/ahmet-cetinkaya/agent-ctrl/profiles/backend/skills/redis-patterns ~/.claude/skills/redis-patterns

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install redis-patterns in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

redis-patterns is a skill that gives an AI assistant a quick reference of Redis best practices for common backend use cases. It covers a data structure cheat sheet, cache-aside and write-through caching, tag-based cache invalidation, session storage, fixed and sliding window rate limiting, single-node distributed locks, Pub/Sub and Redis Streams, key naming, TTL strategy, connection pooling, cluster and Sentinel setups, eviction policies and anti-patterns.

The skill includes Python examples that use the redis client library, Lua scripts for atomic sliding window rate limiting, and guidance on when to choose Streams over Pub/Sub. It is written for developers who add caching, throttling, locking or messaging to production applications with Redis. It points to related skills such as postgres-patterns and django-patterns.

Written from the project's SKILL.md and checked against it.

What it can do

  • Caching strategiesCache-aside and write-through patterns with TTLs and tag-based invalidation.
  • Session storageStores user sessions as Redis hashes with an expiry time.
  • Rate limitingFixed window and atomic sliding window rate limiting using Lua.
  • Distributed locksSingle-node lock using SET NX PX with token-checked release.
  • Pub/Sub and StreamsFire-and-forget Pub/Sub messaging and durable consumer group queues with Streams.
  • Connection managementConnection pooling, Redis Cluster and Sentinel setup examples.
  • Eviction policiesTable of maxmemory policies and when each fits.
  • Anti-patternsCommon Redis mistakes with fixes, including cache stampede prevention.

What you need

  • Python
  • A running Redis server
  • redlock-py library for multi-node locks

Try asking

  • Add Redis caching with a 5-minute TTL to my product API endpoint
  • Rate limit my API per user with a sliding window in Redis
  • Show me how to use Redis Streams with consumer groups for order events

Good to know

  • The lock example is for a single Redis node; multi-node setups should use redlock-py.
  • The stampede prevention example uses an in-process lock, which does not cover multi-process deployments.
  • Code examples are written in Python.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: repos/ahmet-cetinkaya/agent-ctrl/profiles/backend/skills/redis-patterns/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to redis-patterns

All alternatives →
hugging-face-datasetssickn33
94

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.

AAA Skill 50k
db-repairgarrytan
94

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.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

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.

AAA Skill 116k
fix-slow-queriespaperclipai
94

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.

AAA Skill 119k
prisma-8prisma
94

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.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

redis-patterns: common questions

When should I use Redis Streams instead of Pub/Sub?

The source says to prefer Streams when you need delivery guarantees, consumer groups or replay. Pub/Sub is described as fire-and-forget with no delivery guarantees.

Does it cover Redis Cluster and Sentinel?

Yes. It includes a cluster mode example using RedisCluster and a Sentinel example for high availability.

Should every Redis key have a TTL?

The source says to always set a TTL, because keys without one accumulate indefinitely and cause memory pressure.

How do I install redis-patterns?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is redis-patterns free?

The code is public, but no licence file was found, so check the repository before commercial use.

Is redis-patterns safe to use?

It scores 74 of 100. Grades: maintenance A, licence F, 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-patterns?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

redis-patterns Install

Add to stack

Loading.