Codex skills for Redis
These skills give Codex rules for Redis and Valkey that hold up under load: cache-aside reads with jittered TTLs and stampede guards, data types chosen by access pattern, Lua-scripted rate limiters, and locks that use fencing tokens when correctness matters. Every key gets a TTL or trim plan, and SCAN replaces KEYS.
Start with these 3
- Redis Data Structures The right Redis type, key and expiry per job Codex picks a Redis type by access pattern and complexity rather than habit: hashes for objects, sorted sets for rankings and windows, streams with consumer groups for recoverable queues. Every key gets a naming scheme, owner and TTL or trim plan, multi-step updates run as scripts with keys passed for Cluster routing, and memory is measured with MEMORY USAGE before anything ships.
- Redis Caching Faster reads without stale or leaked data Codex first checks whether caching is the right fix, then adds cache-aside reads with keys that include every output dimension, jittered TTLs, a token-guarded rebuild lock, short negative caching and invalidation that runs only after the database commits. It sets the eviction policy based on what else lives in Redis and proves the result with hit-rate, stampede and Redis-down tests.
- API Rate Limiting Fair limits that hold under concurrency Codex matches the limiter to the goal: brute-force protection, tenant fairness, plan quotas or expensive endpoints. It keys limits on authenticated identity, makes each decision atomic with tested Redis Lua scripts for token bucket, GCRA, sliding window and concurrency, returns 429 with Retry-After, chooses fail-open or fail-closed on purpose, and rolls out in shadow mode first.
5 more Redis skills
-
WebSockets Realtime
Sockets that survive proxies, deploys and replicas -
Session Auth
Revocable logins behind a locked-down cookie -
Semantic Caching
Cut LLM spend without serving wrong answers -
Caching Architecture
Caches with owners, limits and no surprises -
Distributed Locks
Leases, fencing tokens, or no lock at all
General skills with Redis guidance
Not built around Redis, but they include steps or tools for it. Not part of the install-all command.
Every Redis skill in one command
Installs these 8 into ~/.agents/skills/. Add --project after -- to install into the current repository instead.
The installer is a 104-line POSIX shell script. It fetches the skills you name from codexskills.dev and unpacks each into its own folder in your skills directory. No sudo, no telemetry, and every skill page shows the full SKILL.md first. Read install.sh
curl -fsSL codexskills.dev/install.sh | sh -s -- redis-data-structures redis-caching api-rate-limiting websockets-realtime session-auth semantic-caching caching-architecture distributed-locks Redis FAQ
Do these Codex skills work with Valkey as well as Redis?
Yes. Redis Caching and Redis Data Structures are written for Redis or Valkey and note that Redis 8 changed its licensing while Valkey is a compatible fork. Redis Data Structures also checks whether JSON, time series and other types bundled with Redis 8 are available before using commands like JSON.*, since Valkey and older Redis may need modules.
Is it safe to let Codex run commands against a production Redis?
Redis Data Structures never uses KEYS * in production and switches to SCAN with COUNT. FLUSHDB, FLUSHALL, mass UNLINK and CONFIG SET on shared instances require your explicit confirmation, and --bigkeys or --memkeys scans run against production only with approval, ideally on a replica.
Should I use Redlock for distributed locks?
Distributed Locks says no when the lock protects correctness: Redlock gives no fencing token and relies on timing assumptions. The skill first checks whether a unique constraint, optimistic versioning or SKIP LOCKED would do, and otherwise pairs a token-checked Redis lease with a fencing token that the protected resource verifies.
How do I install all 8 Redis skills at once?
Pass every name to the installer in one command: curl -fsSL https://codexskills.dev/install.sh | sh -s -- redis-data-structures redis-caching api-rate-limiting websockets-realtime session-auth semantic-caching caching-architecture distributed-locks. Add --project right after -- to put them in the current repository's .agents/skills/ so your team gets them too.
Which Redis skill should I try first?
Redis Data Structures is the closest fit for most Redis work. Mention it with $redis-data-structures in a prompt to load it on purpose; after that, Codex picks it up on its own whenever a task matches.