# Redis Operations

> Redis operational runbooks — memory management, eviction policy, persistence config, Sentinel/Cluster, K8s-hosted Redis ops.

- **Type:** Skill
- **Install:** `agentstack add skill-sawrus-agent-guides-redis-operations`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [sawrus](https://agentstack.voostack.com/s/sawrus)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [sawrus](https://github.com/sawrus)
- **Source:** https://github.com/sawrus/agent-guides/tree/main/areas/devops/database-ops/skills/redis-operations
- **Website:** https://sawrus.github.io/agent-guides

## Install

```sh
agentstack add skill-sawrus-agent-guides-redis-operations
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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

```bash
# 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

```bash
# Check memory usage breakdown
redis-cli MEMORY DOCTOR        # health analysis + recommendations
redis-cli MEMORY STATS         # detailed breakdown
redis-cli MEMORY USAGE    # 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, ` |
| Connection refused | maxclients reached | `CONFIG SET maxclients 10000` |
| Slow KEYS command | Running `KEYS *` in production | Replace with SCAN; never use KEYS in prod |
| AOF growing unbounded | Auto-rewrite threshold too high | Lower `auto-aof-rewrite-percentage` to 50 |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [sawrus](https://github.com/sawrus)
- **Source:** [sawrus/agent-guides](https://github.com/sawrus/agent-guides)
- **License:** MIT
- **Homepage:** https://sawrus.github.io/agent-guides

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-sawrus-agent-guides-redis-operations
- Seller: https://agentstack.voostack.com/s/sawrus
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
