redis

redis is a skill for Claude Code from arbazkhan971/godmode. It costs 8 tokens per session (1,342 once invoked), scanned A, original, MIT.

A guide to using Redis for caches, queues, sessions, counters, locks, leaderboards, messaging, and other fast data tasks. Redis is an in-memory data store that can also persist data.

In plain words
What is it for?
Use it to design or review Redis deployments, choose structures such as hashes or sorted sets, plan cache reads and writes, and handle expiration or invalidation.
Why use it?
It helps match each job to an appropriate Redis data structure and caching strategy. This avoids inefficient keys, confusing operations, and unreliable cache behavior.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the godmode plugin — 132 skills, 1 command, 7 agents, 3 MCP servers shipped together

Good fit Use it to design or review Redis deployments, choose structures such as hashes or sorted sets, plan cache reads and writes, and handle expiration or invalidation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arbazkhan971/godmode/redis
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add arbazkhan971/godmode --skill redis
Clone the repo
git clone --depth 1 https://github.com/arbazkhan971/godmode

Made for: Claude Code.

Or install godmode, the plugin that ships this one along with the rest of its 132 skills, 1 command, 7 agents, 3 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for redis

README.md
[![agentmods](https://agentmods.dev/badge/skills/arbazkhan971/godmode/redis/github.svg)](https://agentmods.dev/skills/arbazkhan971/godmode/redis)
Your own site
<a href="https://agentmods.dev/skills/arbazkhan971/godmode/redis"><img src="https://agentmods.dev/badge/skills/arbazkhan971/godmode/redis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for redis

Your own site · 80×15
<a href="https://agentmods.dev/skills/arbazkhan971/godmode/redis"><img src="https://agentmods.dev/badge/skills/arbazkhan971/godmode/redis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,342 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 164
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.01342
Opus 5.5 $0.00003 $0.00537
Sonnet 5.5 $0.00002 $0.00268
Haiku 4.5 $0.00001 $0.00134

Measured 1mo ago against content hash f05bf7844ac2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

redis scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:8080/health/redis
skills/redis/SKILL.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Activate When

  • /godmode:redis, "design a cache", "redis cluster"
  • "pub/sub", "rate limiting", "session store"
  • "leaderboard", "Lua scripting", "redis streams"
  • "redis caching", "tune redis", "redis cache"

Workflow

1. Use Case Assessment

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

2. Data Structure Selection

| 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.

3. Caching Strategies

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.

4. Queue and Pub/Sub

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.

5. Cluster and Sentinel

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.

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 174 lines · 8 tokens per session scan A f05bf7844ac2

Subscribe to this mod's changes

redis is a skill published in the GitHub repository arbazkhan971/godmode (27 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 1,342 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.