/godmode:redisfrom godmode
Guides Redis architecture and system design decisions including data structure selection, caching strategies, clustering, and memory optimization.
Ships in godmode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/godmode:redis, "design a cache", "redis cluster"redis-cli INFO server | grep redis_version
redis-cli INFO memory | grep -E \
"used_memory_human|maxmemory_human|maxmemory_policy"
redis-cli INFO stats | grep keyspace_hit
Version: Redis 6|7|8|Valkey 7+
Hosting: self-managed|ElastiCache|Upstash|Redis Cloud
Use cases: cache|queue|pub-sub|session|rate-limit|lock
| Use Case | Structure | Key Pattern |
| Cache | String/Hash | cache:{entity}:{id} |
| Counter | String (INCR) | count:{entity}:{id} |
| Session | Hash | session:{token} |
| Queue | List (LPUSH/BRPOP) | queue:{name} |
| Unique set | Set | set:{entity}:{scope} |
| Leaderboard | Sorted Set | lb:{game}:{period} |
| Events/log | Stream | stream:{topic} |
| Lock | String (SET NX EX) | lock:{resource} |
IF using wrong structure (String for leaderboard): wastes memory and complicates operations.
Cache-aside: app checks Redis, miss->DB->store.
Write-through: write DB+cache simultaneously.
Write-behind: write cache, async flush to DB.
Stampede prevention: lock-based refresh OR
stale-while-revalidate with jitter on TTL.
IF popular key expires and 1000 concurrent requests: use lock-based cache refresh to prevent stampede.
Simple queue: LPUSH + BRPOP (30s timeout)
Reliable queue: BRPOPLPUSH + processing list
Pub/Sub: fire-and-forget (no persistence)
Streams: persistent, consumer groups, ack, replay
IF message must not be lost: use Streams, not Pub/Sub. IF consumer crashes: Streams with XACK survive it.
Sentinel: HA with automatic failover
WHEN: < 100K ops/sec, data fits single node
Cluster: horizontal scaling + auto-sharding
WHEN: data > single node, > 100K ops/sec
Use {hash-tag} for multi-key operations
Replication: primary writes, replicas read
IF mem_fragmentation_ratio > 1.5: MEMORY PURGE or restart.
Set maxmemory and maxmemory-policy ALWAYS.
| Policy | Use When |
| allkeys-lru | General cache |
| volatile-lru | Mix of cache + permanent data |
| allkeys-lfu | Frequency-based (hot data) |
| noeviction | Queue/lock (never lose data) |
IF used_memory > 80% maxmemory: audit with --bigkeys. IF values > 100KB: compress or split.
-- Atomic rate limiter (sliding window)
-- KEYS[1]=key, ARGV[1]=window_ms, ARGV[2]=limit
local count = redis.call('ZCARD', KEYS[1])
if count >= tonumber(ARGV[2]) then return 0 end
redis.call('ZADD', KEYS[1], ARGV[3], ARGV[4])
redis.call('PEXPIRE', KEYS[1], ARGV[1])
return 1
redis-cli EVAL "$(cat rate_limit.lua)" 1 \
"rate:user:1234" 60000 100
Lua scripts MUST be idempotent (may retry on MOVED).
Rate limiter: Sorted Set, score=timestamp
ZREMRANGEBYSCORE + ZCARD + ZADD + PEXPIRE
Distributed lock: SET key uuid NX EX 30
Release: Lua check uuid before DEL
Leaderboard: ZADD lb score player
ZREVRANGE lb 0 9 WITHSCORES (top 10)
# Redis diagnostics
redis-cli INFO memory | grep used_memory_human
redis-cli --latency -i 1
redis-cli DBSIZE
# Redis diagnostics
redis-cli INFO memory | grep used_memory_human
redis-cli DBSIZE
# Redis health check
curl -s http://localhost:8080/health/redis
grep -r "redis" config/ | head -5
Append .godmode/redis.tsv:
timestamp operation data_structure key_pattern ttl verdict
KEEP if: tests pass AND metrics improved.
DISCARD if: tests fail OR regression detected.
STOP when FIRST of:
- used_memory < 80% maxmemory
- keyspace_hit_ratio > 90%
- All keys follow naming convention with TTLs
On failure: git reset --hard HEAD~1. Never pause.
| Failure | Action |
|---|---|
| Connection refused | Check running, host/port, firewall |
| Cache stampede | Lock-based refresh, jitter TTLs |
| OOM | Check maxmemory-policy, audit --bigkeys |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
135 skills in this plugin
/a11yAccessibility. WCAG 2.1 AA/AAA, a11y audit, color contrast, keyboard navigation, screen reader, Axe, Pa11y, Lighthouse./agentAI agent development. ReAct/plan-and-execute/multi-agent architectures, tool design, memory systems, guardrails, orchestration (LangChain, LlamaIndex, CrewAI, AutoGen)./analyticsProduct analytics implementation — event tracking, funnel analysis, A/B testing, Segment/Amplitude/Mixpanel/PostHog, privacy-compliant instrumentation./angularAngular architecture. NgRx, Signals, RxJS, standalone components, lazy loading, dependency injection, Jasmine, Jest.Other plugins' skills for the same job