[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PCPF78BRY9ZGSMFM2QCA7W":3,"skill-same:01M6PCPF78BRY9ZGSMFM2QCA7W":70},{"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":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":26,"commitSha":51,"skillDirectory":52,"forksCount":13,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6PCPF78BRY9ZGSMFM2QCA7W","redis",null,"Configure Redis for caching and data storage. Set up clustering, persistence, and Sentinel. Use when implementing Redis caching or queues.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fredis\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"up","queues","implementing","relevant","scripts","critical","os","caching","main","community","security","only","configure","access","devops-security","SET","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## Core Configuration\n\nEdit `\u002Fetc\u002Fredis\u002Fredis.conf`:\n\n```ini\n# Network\nbind 0.0.0.0\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### Distributed Locking (Redlock Pattern)\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      - \"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      - \"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      - \"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## Core Configuration\n\nEdit `\u002Fetc\u002Fredis\u002Fredis.conf`:\n\n```ini\n# Network\nbind 0.0.0.0\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### Distributed Locking (Redlock Pattern)\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      - \"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      - \"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      - \"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":23,"source":42,"license":14,"category":43,"metadata":44,"date_added":47,"description":7,"source_repo":48,"source_type":27,"compatibility":49,"license_source":50},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":45,"version":46},"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","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fredis","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill redis",{"tool":62,"command":63},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill redis",{"tool":65,"command":66},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill redis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fredis\u002FSKILL.md",true,[],[71,87,111,136,153,173],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":37},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[],[78,79,80,81,82,83,73,84,32,31,30,29,27,26,85,23,86,22,21,20],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","active","scope",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":37},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[94,95,96,97,98,99,100,101,102,103,104,105,106,29,107,27,108,109,23,110],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":37},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[118,119,120,121,122,123,124,125,126,127,128,129,130,27,26,131,132,133,134,135],"transcript","youtube transcript","youtube","safe","github","codex","research","license","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":37},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[],[118,119,120,143,121,144,122,123,125,145,146,147,148,128,149,27,26,150,151,152],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":37},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[],[120,160,161,98,121,162,163,164,165,125,147,166,167,168,169,26,170,131,171,172],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":37},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[],[180,120,181,182,121,144,145,183,184,146,147,148,128,185,149,27,26,150,186,134],"youtube full","full","google","server","dlp","credits","automatic"]