[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FAS6ZR04MX7800B9J2HDCJ":3,"skill-same:01M6FAS6ZR04MX7800B9J2HDCJ":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":28,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":59,"install":60,"resources":73},"01M6FAS6ZR04MX7800B9J2HDCJ","redis",null,"Configure Redis for caching and data storage. Set up clustering, persistence, and Sentinel. Use when implementing Redis caching or queues.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-redis\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"up","2026","when","implementing","relevant","scripts","critical","os","platform","caching","main","community","security","only","configure","access","devops-security","SET","clustering","sentinel","data","storage","2026-11-10 10:12:30",false,"---\nname: redis\ndescription: Configure Redis for caching and data storage. Set up clustering, persistence,\n  and Sentinel. Use when implementing Redis caching or queues.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant OS\u002Fplatform tooling and privileged access where\n  noted. Docs-only; helper scripts and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Redis\n\nConfigure, operate, and optimize Redis for caching, queues, rate limiting, and real-time data storage.\n\n## When to Use\n\n- You need a low-latency in-memory cache to reduce database load.\n- Your application requires rate limiting, session storage, or leaderboards.\n- You need pub\u002Fsub messaging between services.\n- You want a distributed lock or job queue backed by an in-memory store.\n\n## Prerequisites\n\n- Linux server or Docker.\n- Root or sudo access for package installation.\n- Redis 7.x recommended for production.\n\n## Installation and Setup\n\n```bash\n# Debian \u002F Ubuntu\nsudo apt update\nsudo apt install -y redis-server\n\n# RHEL \u002F Amazon Linux\nsudo dnf install -y redis\n\n# Start and enable\nsudo systemctl enable --now redis-server\n\n# Verify\nredis-cli ping\n# Expected output: PONG\n```\n\n## Data durability, access and concurrency\n\nDefault to private\u002Floopback access; use authenticated TLS and least-privilege ACLs for remote clients and protect Sentinel\u002Fmanagement UIs too. Password strings below are placeholders, never real command-line secrets; use approved secret injection and avoid MONITOR\u002FSLOWLOG exports containing private data. `allkeys-lru` can evict queues, sessions or locks: use noeviction\u002Fappropriate isolation for durable job\u002Fcoordination data. RDB\u002FAOF and async replication do not guarantee zero data loss; test backups\u002Ffailover. The lock uses a unique per-acquisition token and atomic owner-checked release, but needs fencing\u002Fexpiry handling and is not Redlock. The multi-command limiter is not atomic and its sample boundary is illustrative; use a reviewed atomic script\u002Ffunction for concurrent enforcement.\n\n## Core Configuration\n\nEdit `\u002Fetc\u002Fredis\u002Fredis.conf`:\n\n```ini\n# Network\nbind 127.0.0.1\nport 6379\nprotected-mode yes\nrequirepass strong_redis_password\n\n# Memory\nmaxmemory 2gb\nmaxmemory-policy allkeys-lru\n\n# Connections\nmaxclients 10000\ntimeout 300\ntcp-keepalive 60\n\n# Logging\nloglevel notice\nlogfile \u002Fvar\u002Flog\u002Fredis\u002Fredis-server.log\n\n# Security — disable dangerous commands in production\nrename-command FLUSHALL \"\"\nrename-command FLUSHDB \"\"\nrename-command CONFIG \"\"\nrename-command DEBUG \"\"\n```\n\n```bash\nsudo systemctl restart redis-server\n```\n\n## redis-cli Commands Reference\n\n```bash\n# Connect with authentication\nredis-cli -a strong_redis_password\n\n# Connect to a remote host\nredis-cli -h 10.0.0.5 -p 6379 -a strong_redis_password\n```\n\n### String Operations\n\n```\nSET user:1:name \"Alice\"\nGET user:1:name\n\n# Set with TTL (seconds)\nSETEX session:abc123 3600 '{\"userId\":1}'\n\n# Set only if key does not exist (distributed lock pattern)\nSET lock:order:42 \"worker-1\" NX EX 30\n\n# Increment counters\nINCR page:views:\u002Fhome\nINCRBY api:quota:user:1 -1\n```\n\n### Hash Operations\n\n```\nHSET user:1 name \"Alice\" email \"alice@example.com\" plan \"pro\"\nHGET user:1 email\nHGETALL user:1\nHINCRBY user:1 login_count 1\n```\n\n### List Operations (Queues)\n\n```\nLPUSH queue:emails '{\"to\":\"alice@example.com\",\"subject\":\"Welcome\"}'\nRPOP queue:emails\nLLEN queue:emails\n\n# Blocking pop (worker pattern)\nBRPOP queue:emails 30\n```\n\n### Set and Sorted Set Operations\n\n```\n# Sets — unique tags\nSADD article:1:tags \"redis\" \"database\" \"caching\"\nSMEMBERS article:1:tags\nSISMEMBER article:1:tags \"redis\"\n\n# Sorted sets — leaderboards\nZADD leaderboard 1500 \"player:1\" 2300 \"player:2\" 1800 \"player:3\"\nZREVRANGE leaderboard 0 9 WITHSCORES\nZINCRBY leaderboard 100 \"player:1\"\nZRANK leaderboard \"player:2\"\n```\n\n### Key Management\n\n```\nKEYS user:*             # avoid in production — use SCAN instead\nSCAN 0 MATCH user:* COUNT 100\nTTL session:abc123\nPERSIST session:abc123\nDEL user:old\nEXPIRE user:1 86400\nTYPE user:1\n```\n\n## Persistence\n\n### RDB Snapshots\n\n```ini\n# redis.conf — save snapshots at intervals\nsave 900 1       # snapshot if >= 1 key changed in 900 seconds\nsave 300 10      # snapshot if >= 10 keys changed in 300 seconds\nsave 60 10000    # snapshot if >= 10000 keys changed in 60 seconds\n\ndbfilename dump.rdb\ndir \u002Fvar\u002Flib\u002Fredis\nrdbcompression yes\n```\n\n### AOF (Append-Only File)\n\n```ini\nappendonly yes\nappendfilename \"appendonly.aof\"\nappendfsync everysec    # good balance of safety and performance\n# Options: always (safest, slowest), everysec (recommended), no (OS decides)\n\n# AOF rewrite thresholds\nauto-aof-rewrite-percentage 100\nauto-aof-rewrite-min-size 64mb\n```\n\n### Recommended Production Strategy\n\nUse both RDB and AOF together. RDB provides fast restarts and compact backups. AOF provides durability down to 1-second granularity.\n\n```ini\nsave 900 1\nsave 300 10\nappendonly yes\nappendfsync everysec\n```\n\n## Redis Sentinel (High Availability)\n\nSentinel monitors Redis instances and performs automatic failover.\n\n### Sentinel Configuration\n\n```ini\n# \u002Fetc\u002Fredis\u002Fsentinel.conf\nport 26379\nsentinel monitor mymaster 10.0.0.1 6379 2\nsentinel auth-pass mymaster strong_redis_password\nsentinel down-after-milliseconds mymaster 5000\nsentinel failover-timeout mymaster 60000\nsentinel parallel-syncs mymaster 1\n```\n\nRun at least three Sentinel instances for quorum.\n\n```bash\n# Start Sentinel\nredis-sentinel \u002Fetc\u002Fredis\u002Fsentinel.conf\n\n# Query Sentinel\nredis-cli -p 26379 SENTINEL masters\nredis-cli -p 26379 SENTINEL get-master-addr-by-name mymaster\nredis-cli -p 26379 SENTINEL replicas mymaster\n```\n\n## Redis Cluster Mode\n\nCluster mode distributes data across multiple shards automatically.\n\n```bash\n# Create a 6-node cluster (3 masters + 3 replicas)\nredis-cli --cluster create \\\n  10.0.0.1:6379 10.0.0.2:6379 10.0.0.3:6379 \\\n  10.0.0.4:6379 10.0.0.5:6379 10.0.0.6:6379 \\\n  --cluster-replicas 1 -a strong_redis_password\n\n# Check cluster status\nredis-cli -c -a strong_redis_password CLUSTER INFO\nredis-cli -c -a strong_redis_password CLUSTER NODES\n\n# Add a new node\nredis-cli --cluster add-node 10.0.0.7:6379 10.0.0.1:6379\n\n# Rebalance slots\nredis-cli --cluster rebalance 10.0.0.1:6379\n```\n\n```ini\n# redis.conf for cluster nodes\ncluster-enabled yes\ncluster-config-file nodes.conf\ncluster-node-timeout 5000\n```\n\n## Common Patterns\n\n### Caching with TTL\n\n```bash\n# Cache a database query result for 5 minutes\nSET cache:user:42:profile '{\"name\":\"Alice\",\"plan\":\"pro\"}' EX 300\n\n# Cache-aside pattern (pseudocode):\n# 1. GET cache:key -> if hit, return\n# 2. Query database\n# 3. SET cache:key result EX 300\n# 4. Return result\n```\n\n### Rate Limiting (Sliding Window)\n\n```bash\n# Allow 100 requests per minute per user\n# Using a sorted set with timestamps as scores\nZADD ratelimit:user:42 1700000000.123 \"req-uuid-1\"\nZREMRANGEBYSCORE ratelimit:user:42 0 1699999940.000\nZCARD ratelimit:user:42\nEXPIRE ratelimit:user:42 60\n# If ZCARD >= 100, reject the request\n```\n\n### Pub\u002FSub Messaging\n\n```bash\n# Terminal 1 — subscriber\nredis-cli -a strong_redis_password\nSUBSCRIBE notifications:order-updates\n\n# Terminal 2 — publisher\nredis-cli -a strong_redis_password\nPUBLISH notifications:order-updates '{\"orderId\":42,\"status\":\"shipped\"}'\n\n# Pattern subscription\nPSUBSCRIBE notifications:*\n```\n\n### Single-instance lease illustration (not Redlock)\n\n```bash\n# Acquire lock\nSET lock:resource:42 \"worker-abc\" NX EX 30\n# Returns OK if acquired, nil if already held\n\n# Release lock (use Lua script to ensure atomicity)\nredis-cli -a strong_redis_password EVAL \"\n  if redis.call('get', KEYS[1]) == ARGV[1] then\n    return redis.call('del', KEYS[1])\n  else\n    return 0\n  end\n\" 1 lock:resource:42 \"worker-abc\"\n```\n\n## Docker Compose Setup\n\n```yaml\n# docker-compose.yml\nversion: \"3.9\"\n\nservices:\n  redis:\n    image: redis:7-alpine\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:6379:6379\"\n    volumes:\n      - redis_data:\u002Fdata\n      - .\u002Fredis.conf:\u002Fusr\u002Flocal\u002Fetc\u002Fredis\u002Fredis.conf:ro\n    command: redis-server \u002Fusr\u002Flocal\u002Fetc\u002Fredis\u002Fredis.conf\n    healthcheck:\n      test: [\"CMD\", \"redis-cli\", \"-a\", \"strong_redis_password\", \"ping\"]\n      interval: 10s\n      timeout: 5s\n      retries: 5\n\n  redis-sentinel:\n    image: redis:7-alpine\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:26379:26379\"\n    volumes:\n      - .\u002Fsentinel.conf:\u002Fusr\u002Flocal\u002Fetc\u002Fredis\u002Fsentinel.conf\n    command: redis-sentinel \u002Fusr\u002Flocal\u002Fetc\u002Fredis\u002Fsentinel.conf\n    depends_on:\n      redis:\n        condition: service_healthy\n\n  redis-commander:\n    image: rediscommander\u002Fredis-commander:latest\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:8081:8081\"\n    environment:\n      REDIS_HOSTS: \"local:redis:6379:0:strong_redis_password\"\n    depends_on:\n      redis:\n        condition: service_healthy\n\nvolumes:\n  redis_data:\n```\n\n```bash\ndocker compose up -d\nredis-cli -h 127.0.0.1 -a strong_redis_password ping\n```\n\n## Monitoring\n\n```bash\n# Real-time stats\nredis-cli -a strong_redis_password INFO stats\nredis-cli -a strong_redis_password INFO memory\nredis-cli -a strong_redis_password INFO replication\n\n# Key metrics to watch\nredis-cli -a strong_redis_password INFO stats | grep -E \"keyspace_hits|keyspace_misses\"\n# Hit ratio = hits \u002F (hits + misses) — aim for > 95%\n\n# Memory usage breakdown\nredis-cli -a strong_redis_password MEMORY STATS\n\n# Slow log (queries > 10ms by default)\nredis-cli -a strong_redis_password SLOWLOG GET 10\nredis-cli -a strong_redis_password SLOWLOG LEN\n\n# Monitor all commands in real time (debugging only — impacts performance)\nredis-cli -a strong_redis_password MONITOR\n\n# Connected clients\nredis-cli -a strong_redis_password CLIENT LIST\n```\n\n## Troubleshooting\n\n| Symptom | Likely Cause | Fix |\n|---|---|---|\n| `OOM command not allowed` | `maxmemory` limit reached | Increase `maxmemory` or set a stricter eviction policy |\n| High latency spikes | RDB save or AOF rewrite forking | Use `save \"\"` to disable RDB if AOF is enabled; tune `auto-aof-rewrite-min-size` |\n| `LOADING Redis is loading the dataset in memory` | Large dataset being restored on startup | Wait for load to complete; consider smaller dataset or faster disk |\n| Cache hit ratio \u003C 90% | TTLs too short or working set exceeds memory | Increase `maxmemory`; review TTL strategy |\n| Sentinel not failing over | Fewer than quorum Sentinels reachable | Ensure >= 3 Sentinels are running and network-connected |\n| `CROSSSLOT` error in cluster | Multi-key command spans slots | Use hash tags `{user:42}:profile` to colocate related keys |\n\n## Related Skills\n\n- postgresql (`postgresql-devsec`) - Primary database that Redis caches\n- mysql (`mysql`) - Primary database that Redis caches\n- mongodb (`mongodb`) - Document database that Redis can front\n- database-backups (`database-backups`) - Include RDB files in backup strategy\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n","# Redis\n\nConfigure, operate, and optimize Redis for caching, queues, rate limiting, and real-time data storage.\n\n## When to Use\n\n- You need a low-latency in-memory cache to reduce database load.\n- Your application requires rate limiting, session storage, or leaderboards.\n- You need pub\u002Fsub messaging between services.\n- You want a distributed lock or job queue backed by an in-memory store.\n\n## Prerequisites\n\n- Linux server or Docker.\n- Root or sudo access for package installation.\n- Redis 7.x recommended for production.\n\n## Installation and Setup\n\n```bash\n# Debian \u002F Ubuntu\nsudo apt update\nsudo apt install -y redis-server\n\n# RHEL \u002F Amazon Linux\nsudo dnf install -y redis\n\n# Start and enable\nsudo systemctl enable --now redis-server\n\n# Verify\nredis-cli ping\n# Expected output: PONG\n```\n\n## Data durability, access and concurrency\n\nDefault to private\u002Floopback access; use authenticated TLS and least-privilege ACLs for remote clients and protect Sentinel\u002Fmanagement UIs too. Password strings below are placeholders, never real command-line secrets; use approved secret injection and avoid MONITOR\u002FSLOWLOG exports containing private data. `allkeys-lru` can evict queues, sessions or locks: use noeviction\u002Fappropriate isolation for durable job\u002Fcoordination data. RDB\u002FAOF and async replication do not guarantee zero data loss; test backups\u002Ffailover. The lock uses a unique per-acquisition token and atomic owner-checked release, but needs fencing\u002Fexpiry handling and is not Redlock. The multi-command limiter is not atomic and its sample boundary is illustrative; use a reviewed atomic script\u002Ffunction for concurrent enforcement.\n\n## Core Configuration\n\nEdit `\u002Fetc\u002Fredis\u002Fredis.conf`:\n\n```ini\n# Network\nbind 127.0.0.1\nport 6379\nprotected-mode yes\nrequirepass strong_redis_password\n\n# Memory\nmaxmemory 2gb\nmaxmemory-policy allkeys-lru\n\n# Connections\nmaxclients 10000\ntimeout 300\ntcp-keepalive 60\n\n# Logging\nloglevel notice\nlogfile \u002Fvar\u002Flog\u002Fredis\u002Fredis-server.log\n\n# Security — disable dangerous commands in production\nrename-command FLUSHALL \"\"\nrename-command FLUSHDB \"\"\nrename-command CONFIG \"\"\nrename-command DEBUG \"\"\n```\n\n```bash\nsudo systemctl restart redis-server\n```\n\n## redis-cli Commands Reference\n\n```bash\n# Connect with authentication\nredis-cli -a strong_redis_password\n\n# Connect to a remote host\nredis-cli -h 10.0.0.5 -p 6379 -a strong_redis_password\n```\n\n### String Operations\n\n```\nSET user:1:name \"Alice\"\nGET user:1:name\n\n# Set with TTL (seconds)\nSETEX session:abc123 3600 '{\"userId\":1}'\n\n# Set only if key does not exist (distributed lock pattern)\nSET lock:order:42 \"worker-1\" NX EX 30\n\n# Increment counters\nINCR page:views:\u002Fhome\nINCRBY api:quota:user:1 -1\n```\n\n### Hash Operations\n\n```\nHSET user:1 name \"Alice\" email \"alice@example.com\" plan \"pro\"\nHGET user:1 email\nHGETALL user:1\nHINCRBY user:1 login_count 1\n```\n\n### List Operations (Queues)\n\n```\nLPUSH queue:emails '{\"to\":\"alice@example.com\",\"subject\":\"Welcome\"}'\nRPOP queue:emails\nLLEN queue:emails\n\n# Blocking pop (worker pattern)\nBRPOP queue:emails 30\n```\n\n### Set and Sorted Set Operations\n\n```\n# Sets — unique tags\nSADD article:1:tags \"redis\" \"database\" \"caching\"\nSMEMBERS article:1:tags\nSISMEMBER article:1:tags \"redis\"\n\n# Sorted sets — leaderboards\nZADD leaderboard 1500 \"player:1\" 2300 \"player:2\" 1800 \"player:3\"\nZREVRANGE leaderboard 0 9 WITHSCORES\nZINCRBY leaderboard 100 \"player:1\"\nZRANK leaderboard \"player:2\"\n```\n\n### Key Management\n\n```\nKEYS user:*             # avoid in production — use SCAN instead\nSCAN 0 MATCH user:* COUNT 100\nTTL session:abc123\nPERSIST session:abc123\nDEL user:old\nEXPIRE user:1 86400\nTYPE user:1\n```\n\n## Persistence\n\n### RDB Snapshots\n\n```ini\n# redis.conf — save snapshots at intervals\nsave 900 1       # snapshot if >= 1 key changed in 900 seconds\nsave 300 10      # snapshot if >= 10 keys changed in 300 seconds\nsave 60 10000    # snapshot if >= 10000 keys changed in 60 seconds\n\ndbfilename dump.rdb\ndir \u002Fvar\u002Flib\u002Fredis\nrdbcompression yes\n```\n\n### AOF (Append-Only File)\n\n```ini\nappendonly yes\nappendfilename \"appendonly.aof\"\nappendfsync everysec    # good balance of safety and performance\n# Options: always (safest, slowest), everysec (recommended), no (OS decides)\n\n# AOF rewrite thresholds\nauto-aof-rewrite-percentage 100\nauto-aof-rewrite-min-size 64mb\n```\n\n### Recommended Production Strategy\n\nUse both RDB and AOF together. RDB provides fast restarts and compact backups. AOF provides durability down to 1-second granularity.\n\n```ini\nsave 900 1\nsave 300 10\nappendonly yes\nappendfsync everysec\n```\n\n## Redis Sentinel (High Availability)\n\nSentinel monitors Redis instances and performs automatic failover.\n\n### Sentinel Configuration\n\n```ini\n# \u002Fetc\u002Fredis\u002Fsentinel.conf\nport 26379\nsentinel monitor mymaster 10.0.0.1 6379 2\nsentinel auth-pass mymaster strong_redis_password\nsentinel down-after-milliseconds mymaster 5000\nsentinel failover-timeout mymaster 60000\nsentinel parallel-syncs mymaster 1\n```\n\nRun at least three Sentinel instances for quorum.\n\n```bash\n# Start Sentinel\nredis-sentinel \u002Fetc\u002Fredis\u002Fsentinel.conf\n\n# Query Sentinel\nredis-cli -p 26379 SENTINEL masters\nredis-cli -p 26379 SENTINEL get-master-addr-by-name mymaster\nredis-cli -p 26379 SENTINEL replicas mymaster\n```\n\n## Redis Cluster Mode\n\nCluster mode distributes data across multiple shards automatically.\n\n```bash\n# Create a 6-node cluster (3 masters + 3 replicas)\nredis-cli --cluster create \\\n  10.0.0.1:6379 10.0.0.2:6379 10.0.0.3:6379 \\\n  10.0.0.4:6379 10.0.0.5:6379 10.0.0.6:6379 \\\n  --cluster-replicas 1 -a strong_redis_password\n\n# Check cluster status\nredis-cli -c -a strong_redis_password CLUSTER INFO\nredis-cli -c -a strong_redis_password CLUSTER NODES\n\n# Add a new node\nredis-cli --cluster add-node 10.0.0.7:6379 10.0.0.1:6379\n\n# Rebalance slots\nredis-cli --cluster rebalance 10.0.0.1:6379\n```\n\n```ini\n# redis.conf for cluster nodes\ncluster-enabled yes\ncluster-config-file nodes.conf\ncluster-node-timeout 5000\n```\n\n## Common Patterns\n\n### Caching with TTL\n\n```bash\n# Cache a database query result for 5 minutes\nSET cache:user:42:profile '{\"name\":\"Alice\",\"plan\":\"pro\"}' EX 300\n\n# Cache-aside pattern (pseudocode):\n# 1. GET cache:key -> if hit, return\n# 2. Query database\n# 3. SET cache:key result EX 300\n# 4. Return result\n```\n\n### Rate Limiting (Sliding Window)\n\n```bash\n# Allow 100 requests per minute per user\n# Using a sorted set with timestamps as scores\nZADD ratelimit:user:42 1700000000.123 \"req-uuid-1\"\nZREMRANGEBYSCORE ratelimit:user:42 0 1699999940.000\nZCARD ratelimit:user:42\nEXPIRE ratelimit:user:42 60\n# If ZCARD >= 100, reject the request\n```\n\n### Pub\u002FSub Messaging\n\n```bash\n# Terminal 1 — subscriber\nredis-cli -a strong_redis_password\nSUBSCRIBE notifications:order-updates\n\n# Terminal 2 — publisher\nredis-cli -a strong_redis_password\nPUBLISH notifications:order-updates '{\"orderId\":42,\"status\":\"shipped\"}'\n\n# Pattern subscription\nPSUBSCRIBE notifications:*\n```\n\n### Single-instance lease illustration (not Redlock)\n\n```bash\n# Acquire lock\nSET lock:resource:42 \"worker-abc\" NX EX 30\n# Returns OK if acquired, nil if already held\n\n# Release lock (use Lua script to ensure atomicity)\nredis-cli -a strong_redis_password EVAL \"\n  if redis.call('get', KEYS[1]) == ARGV[1] then\n    return redis.call('del', KEYS[1])\n  else\n    return 0\n  end\n\" 1 lock:resource:42 \"worker-abc\"\n```\n\n## Docker Compose Setup\n\n```yaml\n# docker-compose.yml\nversion: \"3.9\"\n\nservices:\n  redis:\n    image: redis:7-alpine\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:6379:6379\"\n    volumes:\n      - redis_data:\u002Fdata\n      - .\u002Fredis.conf:\u002Fusr\u002Flocal\u002Fetc\u002Fredis\u002Fredis.conf:ro\n    command: redis-server \u002Fusr\u002Flocal\u002Fetc\u002Fredis\u002Fredis.conf\n    healthcheck:\n      test: [\"CMD\", \"redis-cli\", \"-a\", \"strong_redis_password\", \"ping\"]\n      interval: 10s\n      timeout: 5s\n      retries: 5\n\n  redis-sentinel:\n    image: redis:7-alpine\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:26379:26379\"\n    volumes:\n      - .\u002Fsentinel.conf:\u002Fusr\u002Flocal\u002Fetc\u002Fredis\u002Fsentinel.conf\n    command: redis-sentinel \u002Fusr\u002Flocal\u002Fetc\u002Fredis\u002Fsentinel.conf\n    depends_on:\n      redis:\n        condition: service_healthy\n\n  redis-commander:\n    image: rediscommander\u002Fredis-commander:latest\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:8081:8081\"\n    environment:\n      REDIS_HOSTS: \"local:redis:6379:0:strong_redis_password\"\n    depends_on:\n      redis:\n        condition: service_healthy\n\nvolumes:\n  redis_data:\n```\n\n```bash\ndocker compose up -d\nredis-cli -h 127.0.0.1 -a strong_redis_password ping\n```\n\n## Monitoring\n\n```bash\n# Real-time stats\nredis-cli -a strong_redis_password INFO stats\nredis-cli -a strong_redis_password INFO memory\nredis-cli -a strong_redis_password INFO replication\n\n# Key metrics to watch\nredis-cli -a strong_redis_password INFO stats | grep -E \"keyspace_hits|keyspace_misses\"\n# Hit ratio = hits \u002F (hits + misses) — aim for > 95%\n\n# Memory usage breakdown\nredis-cli -a strong_redis_password MEMORY STATS\n\n# Slow log (queries > 10ms by default)\nredis-cli -a strong_redis_password SLOWLOG GET 10\nredis-cli -a strong_redis_password SLOWLOG LEN\n\n# Monitor all commands in real time (debugging only — impacts performance)\nredis-cli -a strong_redis_password MONITOR\n\n# Connected clients\nredis-cli -a strong_redis_password CLIENT LIST\n```\n\n## Troubleshooting\n\n| Symptom | Likely Cause | Fix |\n|---|---|---|\n| `OOM command not allowed` | `maxmemory` limit reached | Increase `maxmemory` or set a stricter eviction policy |\n| High latency spikes | RDB save or AOF rewrite forking | Use `save \"\"` to disable RDB if AOF is enabled; tune `auto-aof-rewrite-min-size` |\n| `LOADING Redis is loading the dataset in memory` | Large dataset being restored on startup | Wait for load to complete; consider smaller dataset or faster disk |\n| Cache hit ratio \u003C 90% | TTLs too short or working set exceeds memory | Increase `maxmemory`; review TTL strategy |\n| Sentinel not failing over | Fewer than quorum Sentinels reachable | Ensure >= 3 Sentinels are running and network-connected |\n| `CROSSSLOT` error in cluster | Multi-key command spans slots | Use hash tags `{user:42}:profile` to colocate related keys |\n\n## Related Skills\n\n- postgresql (`postgresql-devsec`) - Primary database that Redis caches\n- mysql (`mysql`) - Primary database that Redis caches\n- mongodb (`mongodb`) - Document database that Redis can front\n- database-backups (`database-backups`) - Include RDB files in backup strategy\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n",{"name":5,"risk":24,"source":45,"license":14,"category":46,"metadata":47,"date_added":50,"description":7,"source_repo":51,"source_type":29,"compatibility":52,"license_source":53},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":48,"version":49},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant OS\u002Fplatform tooling and privileged access where noted. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-redis",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add boisenoise\u002Fskills-collections --skill redis",{"tool":66,"command":67},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill redis",{"tool":69,"command":70},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill redis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-redis\u002FSKILL.md",true,[],[75,84,92,101,109,117],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":83},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":83},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":100},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":100},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":100},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":121,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":100},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]