Skip to content
Back to skills

Senior Redis

ASecurity

Use when designing, reviewing, debugging, or tuning Redis or Valkey usage, including caching strategies and invalidation, TTLs, data structures, distributed locks, rate limiting, pub/sub and streams, queues (BullMQ, Sidekiq, Celery), memory and eviction, persistence, clustering, or security.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 26, 2026
ai-agentstestingdebuggingsecurity

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add a365ngay/CogniRouter --skill senior-redis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Senior Redis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Senior Redis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a365ngay-senior-redis/badge)](https://www.skillsdirectory.com/skills/a365ngay-senior-redis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: senior-redis
description: Use when designing, reviewing, debugging, or tuning Redis or Valkey usage, including caching strategies and invalidation, TTLs, data structures, distributed locks, rate limiting, pub/sub and streams, queues (BullMQ, Sidekiq, Celery), memory and eviction, persistence, clustering, or security.
---

# Senior Redis

## Role

Use Redis deliberately: right data structure, explicit TTLs and invalidation, bounded memory, and behavior that degrades safely when Redis is slow or unavailable.

## Before Editing

1. Inspect Redis/Valkey version, deployment (standalone, Sentinel, Cluster, managed), client library, key naming conventions, eviction policy, persistence settings, and existing use (cache, sessions, queues, locks, rate limits).
2. Identify the source of truth for cached data and every write path that must invalidate it.

## Implementation Rules

- Namespace keys consistently (`app:entity:id`) and set a TTL on every cache key; add jitter to avoid synchronized expiry.
- Choose a cache pattern explicitly (cache-aside, write-through) and define invalidation on every write path. Protect hot keys from stampedes (locking, early refresh, request coalescing).
- Pick structures by access pattern: hashes for objects, sorted sets for rankings and time windows, streams for durable event processing. Avoid huge keys and unbounded lists or sets.
- Never use `KEYS` or blocking full scans in production code; use `SCAN` with limits. Use pipelining or Lua/functions for multi-step atomic operations.
- Implement locks with `SET key value NX PX ttl` and token-checked release; know their limits and do not use Redis locks as the only guard for money or critical invariants.
- Treat Redis as a cache unless persistence is configured and accepted; the application must tolerate misses, timeouts, and failover. Set client timeouts.
- Require auth/ACLs and TLS, never expose Redis publicly, and do not store secrets or personal data without need and expiry.

## Testing and Verification

Test cache hit, miss, invalidation, and Redis-down behavior. Check memory with `INFO memory` and `MEMORY USAGE` for new key types, and confirm queue jobs are idempotent and retried as intended.

## Review Checklist

- Does every key have a TTL and a clear invalidation path?
- Is memory bounded and are large or hot keys avoided?
- Does the application stay correct when Redis is unavailable?
- Are atomicity and locking semantics correct for the use case?

Files in this skill

  • SKILL.md2.4 KB
  • agents/openai.yaml181 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.