redis-operations

redis-operations is a skill for Claude Code from sawrus/agent-guides. It costs 30 tokens per session (1,469 once invoked), scanned A, original, MIT.

A set of operational runbooks for Redis, an in-memory data store commonly used for caching, queues, and fast application data.

In plain words
What is it for?
Use it to inspect Redis health, manage memory and persistence, investigate performance, and operate Redis Sentinel, Redis Cluster, or Kubernetes-hosted Redis.
Why use it?
It helps diagnose memory pressure, slow commands, evictions, persistence problems, and high-availability failures.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to inspect Redis health, manage memory and persistence, investigate performance, and operate Redis Sentinel, Redis Cluster, or Kubernetes-hosted Redis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawrus/agent-guides/redis-operations
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 sawrus/agent-guides --skill redis-operations
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/sawrus/agent-guides/redis-operations.svg)](https://agentmods.dev/skills/sawrus/agent-guides/redis-operations)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/redis-operations"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/redis-operations.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,469 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00030 $0.01469
Opus 5 $0.00015 $0.00734
Sonnet 5 $0.00006 $0.00294
Haiku 4.5 $0.00003 $0.00147

Measured 8d ago against content hash 092500735655, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

redis-operations scanned grade A with 0 findings 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

areas/devops/database-ops/skills/redis-operations/SKILL.md · 175 lines

How it starts

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

Skill: Redis Operations

Expertise: Redis memory management, eviction, persistence (RDB+AOF), Redis Sentinel, Redis Cluster, K8s Redis (Bitnami/Spotahome operator).

When to load

When investigating Redis memory pressure, configuring persistence, debugging eviction, or setting up Redis HA.

Health Check Commands

# Connect to Redis
redis-cli -h redis-master -p 6379 -a $REDIS_PASSWORD

# Server info overview
redis-cli INFO server | grep -E "redis_version|uptime|tcp_port"
redis-cli INFO memory | grep -E "used_memory_human|used_memory_peak_human|mem_fragmentation_ratio|maxmemory"
redis-cli INFO stats   | grep -E "total_commands_processed|rejected_connections|evicted_keys"
redis-cli INFO keyspace  # databases with key counts + expires

# Real-time monitoring (ops/sec per command)
redis-cli --stat          # 1-second interval stats
redis-cli MONITOR         # log every command (NEVER in production for long — high overhead)

# Slow log (commands over threshold)
redis-cli CONFIG SET slowlog-log-slower-than 10000   # 10ms threshold
redis-cli SLOWLOG GET 20   # last 20 slow commands
redis-cli SLOWLOG LEN
redis-cli SLOWLOG RESET

Memory Management

# Check memory usage breakdown
redis-cli MEMORY DOCTOR        # health analysis + recommendations
redis-cli MEMORY STATS         # detailed breakdown
redis-cli MEMORY USAGE <key>   # bytes used by a specific key

# Find big keys (scan, not KEYS — non-blocking)
redis-cli --bigkeys            # sample-based big key finder
redis-cli --memkeys            # memory usage per key (sample)

# Memory fragmentation: ratio > 1.5 = fragmentation, < 1.0 = swap
redis-cli INFO memory | grep mem_fragmentation_ratio

# Defragment memory online (Redis 4+)
redis-cli CONFIG SET activedefrag yes
redis-cli CONFIG SET active-defrag-threshold-lower 10   # start at 10% frag

Eviction Policy

# View current policy
redis-cli CONFIG GET maxmemory-policy

# Set eviction policy
# allkeys-lru    — evict any key by LRU (general-purpose cache)
# volatile-lru   — evict only keys with TTL by LRU (mixed TTL/no-TTL use)
# allkeys-lfu    — evict by LFU (access frequency, Redis 4+) — best for skewed access
# noeviction     — return OOM error when full (use for session store / queue — no silent data loss)
redis-cli CONFIG SET maxmemory-policy allkeys-lru

# Set memory limit
redis-cli CONFIG SET maxmemory 4gb

# Persist config to redis.conf
redis-cli CONFIG REWRITE

Read the full file on GitHub · 175 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. 8d ago First seen · 175 lines · 30 tokens per session scan A 092500735655

Subscribe to this mod's changes

redis-operations is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 7d ago), licensed MIT. It adds 30 tokens to every session and 1,469 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.