Agent skill · Databases

redis-patterns

Data structure selection, pub/sub patterns, Lua scripting, pipelining, and cluster topology strategies.

vibeevalgithub.com/vibeevalGitHub ↗
claude-codeMIT
Install
npx skills add vibeeval/vibecosystem --skill redis-patterns --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/redis-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 521
Language: C#

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Redis Patterns Advanced Redis usage beyond simple key-value caching. ## Data Structure Selection ``` Use Case → Structure → Why Session store → Hash → Partial field updates without full deserialize Rate limiter → Sorted Set → ZRANGEBYSCORE for sliding window Job queue → List + Stream → BRPOPLPUSH for reliable queue Leaderboard → Sorted Set → ZREVRANGE with scores Unique visitors → HyperLogLog → O(1) cardinality, 0.81% error Feature flags → Hash → HGET per flag, HGETALL for bulk Presence (who's online) → Set → SADD/SREM, SMEMBERS Geolocation → Geo → GEOSEARCH within radius ``` ## Distributed Lock (Redlock-lite) ```typescript import Redis from 'ioredis' const redis = new Redis(process.env.REDIS_URL!) async function acquireLock( key: string, ttlMs: number = 10_000 ): Promise<string | null> { const token = crypto.randomUUID() const acquired = await redis.set( `lock:${key}`, token, 'PX', ttlMs, 'NX' // Only set if not exists ) return acquired === 'OK' ? token : null } async function releaseLock(key: string, token: string): Promise<boolean> { // Lua script: only delete if token matches (atomic check-and-delete) const script = ` if redis.call("get", KEYS[1]) == ARGV[1] then return redis

What's inside
Steps it walks through
  1. Data Structure Selection
  2. Distributed Lock (Redlock-lite)
  3. Sliding Window Rate Limiter
  4. Lua Scripting for Atomicity
  5. Pipeline for Bulk Operations
  6. Pub/Sub with Redis Streams
  7. Checklist
  8. Anti-Patterns
More from vibecosystem
All skills →
About this skill
What does the redis-patterns skill do?

Data structure selection, pub/sub patterns, Lua scripting, pipelining, and cluster topology strategies.

How do I install it?

Run `npx skills add vibeeval/vibecosystem --skill redis-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From vibeeval/vibecosystem, a repository with 521 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going