[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E1PEGAD3V59ZAWHTFH98HZ":3,"skill-same:01M7E1PEGAD3V59ZAWHTFH98HZ":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M7E1PEGAD3V59ZAWHTFH98HZ","redis-cli",null,"Redis command-line interface (redis-cli) reference and usage guide. Use this skill whenever the user mentions redis-cli, Redis CLI, or any task involving querying, inspecting, debugging, or managing Redis from the command line.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: redis-cli\ndescription: Redis command-line interface (redis-cli) reference and usage guide. Use this skill whenever the user mentions redis-cli, Redis CLI, or any task involving querying, inspecting, debugging, or managing Redis from the command line.\ndisable-model-invocation: false\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002Fchaunsin\u002Fagent-skills\u002Ftree\u002Fmaster\u002Fskills\u002Fredis-cli\nsource_repo: chaunsin\u002Fagent-skills\nsource_type: community\ndate_added: 2026-07-01\nlicense: Apache-2.0\nlicense_source: https:\u002F\u002Fgithub.com\u002Fchaunsin\u002Fagent-skills\u002Fblob\u002Fmaster\u002FLICENSE\nversion: 1.0.0\nauthor: Mr-Nobody-Anonymous\ntags:\n- cli\n- redis\ncompatibility:\n  claude-code: '>=1.0'\n  skillhub: '*'\n  cursor: '>=0.40'\n  codex: '*'\nnetwork_access: false\nfilesystem_access: read\ncredential_access: false\ndestructive_operations: false\n---\n\n\n# redis-cli — Redis Command Line Interface\n## When to Use\n\nUse this skill when you need redis command-line interface (redis-cli) reference and usage guide. Use this skill whenever the user mentions redis-cli, Redis CLI, or any task involving querying, inspecting, debugging, or managing Redis from the command line. Triggers on key\u002Fvalue reads and writes, SCAN or keyspace...\n\n\nredis-cli is the primary command-line tool for interacting with Redis. It supports two modes: **command-line execution** (run a command and exit) and **interactive mode** (a REPL with tab completion, history, and hints). It also provides special modes for monitoring, latency analysis, key space scanning, and data import\u002Fexport.\n\n**Official resources:** [Redis CLI Docs](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Ftools\u002Fcli\u002F) | [Commands](https:\u002F\u002Fredis.io\u002Fcommands\u002F) | [Download](https:\u002F\u002Fredis.io\u002Fdownloads\u002F)\n\n## Prerequisites\n\n```bash\n# Check if redis-cli is installed\nredis-cli --version\n\n# Install options:\n\n# macOS (Homebrew)\nbrew install redis\n\n# Ubuntu \u002F Debian\nsudo apt install redis-tools\n\n# CentOS \u002F RHEL\nsudo yum install redis\n\n# Alpine\napk add redis\n\n# Build from source (binary only)\nmake redis-cli\n# Binary at: src\u002Fredis-cli\n\n# Docker (no installation needed)\ndocker run -it --rm redis redis-cli -h \u003Chost> -p \u003Cport> PING\n```\n\n## Security Considerations\n\n> **IMPORTANT**: Redis provides powerful operations that can irreversibly modify or delete data.\n> Pay close attention to the following safety guidelines:\n\n- **Never pass passwords via `-a` in production** — visible in shell history and process listings. Use `REDISCLI_AUTH` environment variable instead.\n- **`KEYS *` blocks the server** on large databases — always use `SCAN` in production code.\n- **`MONITOR` logs all commands** including sensitive data — use cautiously, and never for extended periods on production servers.\n- **`FLUSHALL` \u002F `FLUSHDB` are irreversible** — verify target database with `CLIENT LIST` or `INFO keyspace` first.\n- **`--rdb` transfer during write operations** may produce inconsistent snapshots on busy servers.\n\n## Quick Reference\n\n### Connection\n\n```bash\n# Basic connection (default: 127.0.0.1:6379)\nredis-cli\nredis-cli -h redis15.localnet.org -p 6390 PING\n\n# With password (prefer REDISCLI_AUTH env var for security)\nredis-cli -a myUnguessablePazzzzzword123 PING\n\n# URI connection\nredis-cli -u redis:\u002F\u002Fuser:password@host:port\u002Fdbnum PING\n\n# TLS\nredis-cli --tls --cacert \u002Fpath\u002Fto\u002Fca.crt -h redis.example.com PING\n\n# Specific database\nredis-cli -n 2 DBSIZE\n\n# IPv4\u002FIPv6 preference\nredis-cli -4 PING   # prefer IPv4\nredis-cli -6 PING   # prefer IPv6\n```\n\n### Command-Line vs Interactive Mode\n\n```bash\n# Command-line mode: execute one command and exit\nredis-cli INCR mycounter\nredis-cli GET mykey\n\n# Interactive mode: type commands at the prompt\nredis-cli\n127.0.0.1:6379> PING\nPONG\n127.0.0.1:6379> SELECT 2\nOK\n127.0.0.1:6379[2]> DBSIZE\n(integer) 1\n```\n\nThe prompt shows `host:port[db]`. Use `CONNECT \u003Chost> \u003Cport>` to switch instances interactively.\n\n### Data Query Cheat Sheet\n\n**String operations** (O(1)):\n```\nGET key                        # Get value\nSET key value [NX|XX] [EX sec|PX ms|KEEPTTL]  # Set with conditions\u002FTTL\nSET key value GET              # Set new, return old value\nGETSET key newvalue            # [Use SET key value GET instead]\nMGET key1 key2 ...             # Get multiple values\nINCR key                       # Increment integer (+1)\nINCRBY key 10                  # Increment by amount\nSTRLEN key                     # String length\nGETRANGE key 0 50              # Substring\n```\n\n**Hash operations**:\n```\nHGET key field                 # Get field value            O(1)\nHMGET key f1 f2                # Get multiple fields        O(N)\nHGETALL key                    # Get all fields\u002Fvalues      O(N)\nHKEYS key                      # Get all field names        O(N)\nHLEN key                       # Number of fields           O(1)\nHEXISTS key field              # Check field exists         O(1)\nHSCAN key 0 [MATCH pat]        # Iterate hash fields        O(1) per call\n```\n\n**List operations**:\n```\nLRANGE key 0 -1                # Get all elements           O(N)\nLLEN key                       # List length                O(1)\nLINDEX key 0                   # Get by index               O(N)\nLPOS key value                 # Find element position      O(N)\n```\n\n**Set operations**:\n```\nSMEMBERS key                   # Get all members            O(N)\nSCARD key                      # Set cardinality            O(1)\nSISMEMBER key member           # Check membership           O(1)\nSMISMEMBER key m1 m2           # Multi-membership check     O(N)\nSSCAN key 0 [MATCH pat]        # Iterate set members        O(1) per call\n```\n\n**Sorted Set operations**:\n```\nZRANGE key 0 -1 [WITHSCORES]           # By index              O(log(N)+M)\nZRANGE key -inf +inf BYSCORE           # By score range        O(log(N)+M)\nZRANGE key [a [z BYLEX                 # By lexicographic      O(log(N)+M)\nZCARD key                               # Member count          O(1)\nZSCORE key member                       # Get score             O(1)\nZRANK key member                        # Get rank              O(log(N))\nZSCAN key 0 [MATCH pat]                 # Iterate members       O(1) per call\n```\n\n**Key inspection**:\n```\nEXISTS key [key ...]           # Check existence (O(N) for multi) — returns count\nTYPE key                       # Data type: string|list|set|zset|hash|stream  O(1)\nTTL key                        # Seconds until expiry (-1=none, -2=not exists)  O(1)\nPTTL key                       # Milliseconds until expiry                      O(1)\nMEMORY USAGE key [SAMPLES n]   # Memory consumption in bytes                    O(N)\nOBJECT ENCODING key            # Internal encoding (ziplist, hashtable, etc.)   O(1)\nOBJECT IDLETIME key            # Seconds since last access                      O(1)\nDBSIZE                         # Total keys in current database                 O(1)\nRANDOMKEY                      # Return a random key                            O(1)\n```\n\n### Key Scanning (Production-Safe)\n\nSCAN-based iteration never blocks the server, unlike `KEYS *` which should be avoided in production.\n\n```bash\n# redis-cli built-in scan mode\nredis-cli --scan                          # List all keys\nredis-cli --scan --pattern 'user:*'       # Filter by pattern\nredis-cli --scan --pattern '*:12345*'     # Glob patterns\nredis-cli --scan --count 100              # Batch size hint\n\n# Programmatic SCAN in interactive mode\nSCAN 0 MATCH user:* COUNT 100\n# Returns: 1) next_cursor  2) [keys...]\n# Continue with: SCAN \u003Cnext_cursor> MATCH user:* COUNT 100\n# Iteration complete when cursor returns 0\n\n# Count keys matching a pattern\nredis-cli --scan --pattern 'session:*' | wc -l\n```\n\nSCAN guarantees: a full iteration (cursor 0 → cursor 0) always returns all elements that existed for the entire duration. Elements may appear multiple times — handle duplicates in your application.\n\n### Server Inspection\n\n```bash\n# Real-time stats (updates every second, use -i to change interval)\nredis-cli --stat\n\n# Server information\nredis-cli INFO server             # Server details\nredis-cli INFO memory             # Memory usage\nredis-cli INFO keyspace           # Database key counts\nredis-cli INFO replication        # Replication status\nredis-cli INFO all                # Everything\n\n# Key space analysis\nredis-cli --bigkeys               # Find largest keys by element count\nredis-cli --memkeys               # Find largest keys by memory usage\nredis-cli --keystats              # Combined bigkeys + memkeys with distribution\n\n# Latency analysis\nredis-cli --latency               # Continuous latency sampling\nredis-cli --latency-history       # Latency over time (15s windows)\nredis-cli --latency-dist          # Latency spectrum visualization\nredis-cli --intrinsic-latency 5   # System baseline latency (run on Redis host)\n```\n\n### Output Control\n\n```bash\n# Raw output (no type prefixes) — default when piping\nredis-cli --raw GET mykey\nredis-cli GET mykey > \u002Ftmp\u002Foutput.txt    # auto raw mode\n\n# Human-readable (force) when piping\nredis-cli --no-raw GET mykey | cat\n\n# CSV output\nredis-cli --csv LRANGE mylist 0 -1\n\n# JSON output (RESP3, use -2 for RESP2)\nredis-cli --json HGETALL user:1\n\n# Read last argument from stdin\ncat \u002Fetc\u002Fservices | redis-cli -x SET net_services\n\n# Pipe commands from file\ncat \u002Ftmp\u002Fcommands.txt | redis-cli\n```\n\n### Repeat Commands\n\n```bash\n# Run command N times\nredis-cli -r 5 INCR counter\n\n# Run with delay (seconds, supports decimals)\nredis-cli -r -1 -i 1 INFO | grep rss_human    # infinite, every 1s\n\n# Interactive: prefix with count\n5 INCR mycounter    # runs 5 times\n```\n\n### Server Administration\n\n```bash\n# ACL management\nredis-cli ACL LIST                                    # List all users\nredis-cli ACL SETUSER admin on >pwd ~* +@all          # Create admin user\nredis-cli ACL SETUSER readonly on >pwd ~* +@read      # Create read-only user\nredis-cli ACL DELUSER username                        # Delete user\nredis-cli ACL DRYRUN username GET key                 # Test user permission\nredis-cli ACL GENPASS                                 # Generate random password\n\n# Client management\nredis-cli CLIENT LIST                                 # List all connections\nredis-cli CLIENT KILL ADDR ip:port                    # Disconnect client\nredis-cli CLIENT PAUSE 5000 WRITE                     # Pause writes for 5s\nredis-cli CLIENT SETNAME my-app                       # Name current connection\n\n# Configuration\nredis-cli CONFIG GET maxmemory                        # Read config\nredis-cli CONFIG SET maxmemory 100mb                  # Set config at runtime\nredis-cli CONFIG REWRITE                              # Persist to redis.conf\nredis-cli CONFIG RESETSTAT                            # Reset INFO counters\n\n# Replication acknowledgment\nredis-cli WAIT 2 5000                                 # Wait for 2 replicas (5s timeout)\nredis-cli WAITAOF 1 1 5000                            # Wait for AOF fsync (Redis 7.2+)\n\n# Persistence\nredis-cli BGSAVE                                      # Background RDB save\nredis-cli BGREWRITEAOF                                # Background AOF rewrite\nredis-cli LASTSAVE                                    # Last save timestamp\n\n# Replication\nredis-cli REPLICAOF host port                         # Become replica\nredis-cli REPLICAOF NO ONE                            # Promote to master\n\n# Server lifecycle\nredis-cli SHUTDOWN SAVE                               # Save and stop\nredis-cli SHUTDOWN NOSAVE                             # Stop without saving\n\n# Slow log\nredis-cli SLOWLOG GET 10                              # Recent slow commands\nredis-cli SLOWLOG LEN                                 # Entry count\nredis-cli SLOWLOG RESET                               # Clear entries\n\n# Cluster management\nredis-cli --cluster check host:port                   # Check cluster health\nredis-cli --cluster reshard host:port                 # Move slots between nodes\nredis-cli -c -h cluster-node PING                     # Cluster-aware connection\n```\n\n## Detailed Reference Files\n\n| File | Content | When to read |\n|------|---------|-------------|\n| `references\u002Fconnection-and-options.md` | Full connection options, CLI flags, SSL\u002FTLS, environment variables, interactive mode features (completion, history, preferences), RESP protocol versions | Configuring connections, setting up TLS, customizing CLI behavior |\n| `references\u002Fdata-query-commands.md` | Core data type commands: Strings, Hashes, Lists, Sets, Sorted Sets, Streams, Bitmaps, HyperLogLog, Geospatial, plus Key Operations, Database Operations, and Transactions | Looking up core command syntax, understanding command options and return values |\n| `references\u002Fmodule-data-types.md` | Module data types: JSON (RedisJSON), Vector Sets (Redis 8.0+), Bloom Filter, Cuckoo Filter, Top-K, Count-Min Sketch, T-Digest, TimeSeries (TS.*), Full-Text Search \u002F RediSearch (FT.*) — with full command syntax and behavioral notes | Working with Redis module data types, similarity search, probabilistic data structures, time series data, full-text search |\n| `references\u002Fkey-management.md` | SCAN family details (SCAN\u002FSSCAN\u002FHSCAN\u002FZSCAN), big keys analysis (--bigkeys, --memkeys, --keystats), key expiration (EXPIRE, TTL, PERSIST), key space patterns, mass insertion | Scanning databases, analyzing key distribution, managing key lifecycles |\n| `references\u002Finspection-and-monitoring.md` | INFO sections, MONITOR, --stat mode, latency tools (--latency, --latency-history, --latency-dist, --intrinsic-latency), RDB backup, replica mode, LRU simulation | Monitoring Redis instances, debugging performance, creating backups |\n| `references\u002Fadvanced-features.md` | Lua scripting (--eval, --ldb), Pub\u002FSub mode, pipe mode, CSV\u002FJSON output, string quoting and escaping, get input from stdin, remote RDB transfer, Cluster management (--cluster subcommands, cluster commands) | Running scripts, subscribing to channels, bulk data operations, managing Redis Cluster |\n| `references\u002Fserver-administration.md` | ACL management (ACL SETUSER\u002FDELUSER\u002FLIST\u002FCAT\u002FGENPASS), client management (CLIENT LIST\u002FKILL\u002FPAUSE\u002FTRACKING), configuration (CONFIG GET\u002FSET\u002FREWRITE), replication acknowledgment (WAIT\u002FWAITAOF), persistence (SAVE\u002FBGSAVE\u002FBGREWRITEAOF), replication setup (REPLICAOF), server lifecycle (SHUTDOWN\u002FFAILOVER) | Managing users and permissions, controlling client connections, runtime configuration, ensuring write durability, persistence management, replication setup |\n\n## Common Workflows\n\n### Explore an Unknown Database\n\n```bash\n# Step 1: Basic stats\nredis-cli INFO keyspace\nredis-cli DBSIZE\n\n# Step 2: Find big keys and memory usage\nredis-cli --bigkeys\nredis-cli --memkeys\n\n# Step 3: Sample keys and inspect types\nredis-cli --scan | head -20\nredis-cli TYPE \u003Ckey>\nredis-cli TTL \u003Ckey>\n\n# Step 4: Read data based on type\nredis-cli HGETALL \u003Chash_key>\nredis-cli LRANGE \u003Clist_key> 0 -1\nredis-cli ZRANGE \u003Czset_key> 0 -1 WITHSCORES\n```\n\n### Monitor in Real Time\n\n```bash\n# Live server stats\nredis-cli --stat -i 2\n\n# Watch memory specifically\nredis-cli -r -1 -i 5 INFO memory | grep used_memory_human\n\n# Monitor all commands (caution: high overhead)\nredis-cli MONITOR\n\n# Continuous latency\nredis-cli --latency-history -i 5\n```\n\n### Query Specific Key Patterns\n\n```bash\n# Count keys by pattern\nredis-cli --scan --pattern 'session:*' | wc -l\n\n# Find and inspect hash keys\nredis-cli --scan --pattern 'user:*' | while read key; do\n  echo \"=== $key ===\"\n  redis-cli HGETALL \"$key\"\ndone\n\n# Check TTL of matching keys\nredis-cli --scan --pattern 'cache:*' | while read key; do\n  redis-cli TTL \"$key\"\ndone\n```\n\n## External References\n\n- [Redis CLI Documentation](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Ftools\u002Fcli\u002F)\n- [Redis Commands](https:\u002F\u002Fredis.io\u002Fcommands\u002F)\n- [Redis Data Types](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fdata-types\u002F)\n- [Redis Protocol Specification](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Freference\u002Fprotocol-spec\u002F)\n- [Redis Mass Insertion](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fclients\u002Fpatterns\u002Fbulk-loading\u002F)\n- [Redis Lua Debugger](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fprogrammability\u002Flua-debugging\u002F)\n\n## Limitations\n\n- Use this skill only when the task clearly matches its upstream source and local project context.\n- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.\n- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.\n\n## When NOT to Use\n\n- Do not use for unrelated tasks or domains outside the stated scope.\n- Do not use for minor trivial edits where standard direct execution suffices.\n- Do not use to bypass required human confirmation or security approvals.\n\n","# redis-cli — Redis Command Line Interface\n## When to Use\n\nUse this skill when you need redis command-line interface (redis-cli) reference and usage guide. Use this skill whenever the user mentions redis-cli, Redis CLI, or any task involving querying, inspecting, debugging, or managing Redis from the command line. Triggers on key\u002Fvalue reads and writes, SCAN or keyspace...\n\n\nredis-cli is the primary command-line tool for interacting with Redis. It supports two modes: **command-line execution** (run a command and exit) and **interactive mode** (a REPL with tab completion, history, and hints). It also provides special modes for monitoring, latency analysis, key space scanning, and data import\u002Fexport.\n\n**Official resources:** [Redis CLI Docs](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Ftools\u002Fcli\u002F) | [Commands](https:\u002F\u002Fredis.io\u002Fcommands\u002F) | [Download](https:\u002F\u002Fredis.io\u002Fdownloads\u002F)\n\n## Prerequisites\n\n```bash\n# Check if redis-cli is installed\nredis-cli --version\n\n# Install options:\n\n# macOS (Homebrew)\nbrew install redis\n\n# Ubuntu \u002F Debian\nsudo apt install redis-tools\n\n# CentOS \u002F RHEL\nsudo yum install redis\n\n# Alpine\napk add redis\n\n# Build from source (binary only)\nmake redis-cli\n# Binary at: src\u002Fredis-cli\n\n# Docker (no installation needed)\ndocker run -it --rm redis redis-cli -h \u003Chost> -p \u003Cport> PING\n```\n\n## Security Considerations\n\n> **IMPORTANT**: Redis provides powerful operations that can irreversibly modify or delete data.\n> Pay close attention to the following safety guidelines:\n\n- **Never pass passwords via `-a` in production** — visible in shell history and process listings. Use `REDISCLI_AUTH` environment variable instead.\n- **`KEYS *` blocks the server** on large databases — always use `SCAN` in production code.\n- **`MONITOR` logs all commands** including sensitive data — use cautiously, and never for extended periods on production servers.\n- **`FLUSHALL` \u002F `FLUSHDB` are irreversible** — verify target database with `CLIENT LIST` or `INFO keyspace` first.\n- **`--rdb` transfer during write operations** may produce inconsistent snapshots on busy servers.\n\n## Quick Reference\n\n### Connection\n\n```bash\n# Basic connection (default: 127.0.0.1:6379)\nredis-cli\nredis-cli -h redis15.localnet.org -p 6390 PING\n\n# With password (prefer REDISCLI_AUTH env var for security)\nredis-cli -a myUnguessablePazzzzzword123 PING\n\n# URI connection\nredis-cli -u redis:\u002F\u002Fuser:password@host:port\u002Fdbnum PING\n\n# TLS\nredis-cli --tls --cacert \u002Fpath\u002Fto\u002Fca.crt -h redis.example.com PING\n\n# Specific database\nredis-cli -n 2 DBSIZE\n\n# IPv4\u002FIPv6 preference\nredis-cli -4 PING   # prefer IPv4\nredis-cli -6 PING   # prefer IPv6\n```\n\n### Command-Line vs Interactive Mode\n\n```bash\n# Command-line mode: execute one command and exit\nredis-cli INCR mycounter\nredis-cli GET mykey\n\n# Interactive mode: type commands at the prompt\nredis-cli\n127.0.0.1:6379> PING\nPONG\n127.0.0.1:6379> SELECT 2\nOK\n127.0.0.1:6379[2]> DBSIZE\n(integer) 1\n```\n\nThe prompt shows `host:port[db]`. Use `CONNECT \u003Chost> \u003Cport>` to switch instances interactively.\n\n### Data Query Cheat Sheet\n\n**String operations** (O(1)):\n```\nGET key                        # Get value\nSET key value [NX|XX] [EX sec|PX ms|KEEPTTL]  # Set with conditions\u002FTTL\nSET key value GET              # Set new, return old value\nGETSET key newvalue            # [Use SET key value GET instead]\nMGET key1 key2 ...             # Get multiple values\nINCR key                       # Increment integer (+1)\nINCRBY key 10                  # Increment by amount\nSTRLEN key                     # String length\nGETRANGE key 0 50              # Substring\n```\n\n**Hash operations**:\n```\nHGET key field                 # Get field value            O(1)\nHMGET key f1 f2                # Get multiple fields        O(N)\nHGETALL key                    # Get all fields\u002Fvalues      O(N)\nHKEYS key                      # Get all field names        O(N)\nHLEN key                       # Number of fields           O(1)\nHEXISTS key field              # Check field exists         O(1)\nHSCAN key 0 [MATCH pat]        # Iterate hash fields        O(1) per call\n```\n\n**List operations**:\n```\nLRANGE key 0 -1                # Get all elements           O(N)\nLLEN key                       # List length                O(1)\nLINDEX key 0                   # Get by index               O(N)\nLPOS key value                 # Find element position      O(N)\n```\n\n**Set operations**:\n```\nSMEMBERS key                   # Get all members            O(N)\nSCARD key                      # Set cardinality            O(1)\nSISMEMBER key member           # Check membership           O(1)\nSMISMEMBER key m1 m2           # Multi-membership check     O(N)\nSSCAN key 0 [MATCH pat]        # Iterate set members        O(1) per call\n```\n\n**Sorted Set operations**:\n```\nZRANGE key 0 -1 [WITHSCORES]           # By index              O(log(N)+M)\nZRANGE key -inf +inf BYSCORE           # By score range        O(log(N)+M)\nZRANGE key [a [z BYLEX                 # By lexicographic      O(log(N)+M)\nZCARD key                               # Member count          O(1)\nZSCORE key member                       # Get score             O(1)\nZRANK key member                        # Get rank              O(log(N))\nZSCAN key 0 [MATCH pat]                 # Iterate members       O(1) per call\n```\n\n**Key inspection**:\n```\nEXISTS key [key ...]           # Check existence (O(N) for multi) — returns count\nTYPE key                       # Data type: string|list|set|zset|hash|stream  O(1)\nTTL key                        # Seconds until expiry (-1=none, -2=not exists)  O(1)\nPTTL key                       # Milliseconds until expiry                      O(1)\nMEMORY USAGE key [SAMPLES n]   # Memory consumption in bytes                    O(N)\nOBJECT ENCODING key            # Internal encoding (ziplist, hashtable, etc.)   O(1)\nOBJECT IDLETIME key            # Seconds since last access                      O(1)\nDBSIZE                         # Total keys in current database                 O(1)\nRANDOMKEY                      # Return a random key                            O(1)\n```\n\n### Key Scanning (Production-Safe)\n\nSCAN-based iteration never blocks the server, unlike `KEYS *` which should be avoided in production.\n\n```bash\n# redis-cli built-in scan mode\nredis-cli --scan                          # List all keys\nredis-cli --scan --pattern 'user:*'       # Filter by pattern\nredis-cli --scan --pattern '*:12345*'     # Glob patterns\nredis-cli --scan --count 100              # Batch size hint\n\n# Programmatic SCAN in interactive mode\nSCAN 0 MATCH user:* COUNT 100\n# Returns: 1) next_cursor  2) [keys...]\n# Continue with: SCAN \u003Cnext_cursor> MATCH user:* COUNT 100\n# Iteration complete when cursor returns 0\n\n# Count keys matching a pattern\nredis-cli --scan --pattern 'session:*' | wc -l\n```\n\nSCAN guarantees: a full iteration (cursor 0 → cursor 0) always returns all elements that existed for the entire duration. Elements may appear multiple times — handle duplicates in your application.\n\n### Server Inspection\n\n```bash\n# Real-time stats (updates every second, use -i to change interval)\nredis-cli --stat\n\n# Server information\nredis-cli INFO server             # Server details\nredis-cli INFO memory             # Memory usage\nredis-cli INFO keyspace           # Database key counts\nredis-cli INFO replication        # Replication status\nredis-cli INFO all                # Everything\n\n# Key space analysis\nredis-cli --bigkeys               # Find largest keys by element count\nredis-cli --memkeys               # Find largest keys by memory usage\nredis-cli --keystats              # Combined bigkeys + memkeys with distribution\n\n# Latency analysis\nredis-cli --latency               # Continuous latency sampling\nredis-cli --latency-history       # Latency over time (15s windows)\nredis-cli --latency-dist          # Latency spectrum visualization\nredis-cli --intrinsic-latency 5   # System baseline latency (run on Redis host)\n```\n\n### Output Control\n\n```bash\n# Raw output (no type prefixes) — default when piping\nredis-cli --raw GET mykey\nredis-cli GET mykey > \u002Ftmp\u002Foutput.txt    # auto raw mode\n\n# Human-readable (force) when piping\nredis-cli --no-raw GET mykey | cat\n\n# CSV output\nredis-cli --csv LRANGE mylist 0 -1\n\n# JSON output (RESP3, use -2 for RESP2)\nredis-cli --json HGETALL user:1\n\n# Read last argument from stdin\ncat \u002Fetc\u002Fservices | redis-cli -x SET net_services\n\n# Pipe commands from file\ncat \u002Ftmp\u002Fcommands.txt | redis-cli\n```\n\n### Repeat Commands\n\n```bash\n# Run command N times\nredis-cli -r 5 INCR counter\n\n# Run with delay (seconds, supports decimals)\nredis-cli -r -1 -i 1 INFO | grep rss_human    # infinite, every 1s\n\n# Interactive: prefix with count\n5 INCR mycounter    # runs 5 times\n```\n\n### Server Administration\n\n```bash\n# ACL management\nredis-cli ACL LIST                                    # List all users\nredis-cli ACL SETUSER admin on >pwd ~* +@all          # Create admin user\nredis-cli ACL SETUSER readonly on >pwd ~* +@read      # Create read-only user\nredis-cli ACL DELUSER username                        # Delete user\nredis-cli ACL DRYRUN username GET key                 # Test user permission\nredis-cli ACL GENPASS                                 # Generate random password\n\n# Client management\nredis-cli CLIENT LIST                                 # List all connections\nredis-cli CLIENT KILL ADDR ip:port                    # Disconnect client\nredis-cli CLIENT PAUSE 5000 WRITE                     # Pause writes for 5s\nredis-cli CLIENT SETNAME my-app                       # Name current connection\n\n# Configuration\nredis-cli CONFIG GET maxmemory                        # Read config\nredis-cli CONFIG SET maxmemory 100mb                  # Set config at runtime\nredis-cli CONFIG REWRITE                              # Persist to redis.conf\nredis-cli CONFIG RESETSTAT                            # Reset INFO counters\n\n# Replication acknowledgment\nredis-cli WAIT 2 5000                                 # Wait for 2 replicas (5s timeout)\nredis-cli WAITAOF 1 1 5000                            # Wait for AOF fsync (Redis 7.2+)\n\n# Persistence\nredis-cli BGSAVE                                      # Background RDB save\nredis-cli BGREWRITEAOF                                # Background AOF rewrite\nredis-cli LASTSAVE                                    # Last save timestamp\n\n# Replication\nredis-cli REPLICAOF host port                         # Become replica\nredis-cli REPLICAOF NO ONE                            # Promote to master\n\n# Server lifecycle\nredis-cli SHUTDOWN SAVE                               # Save and stop\nredis-cli SHUTDOWN NOSAVE                             # Stop without saving\n\n# Slow log\nredis-cli SLOWLOG GET 10                              # Recent slow commands\nredis-cli SLOWLOG LEN                                 # Entry count\nredis-cli SLOWLOG RESET                               # Clear entries\n\n# Cluster management\nredis-cli --cluster check host:port                   # Check cluster health\nredis-cli --cluster reshard host:port                 # Move slots between nodes\nredis-cli -c -h cluster-node PING                     # Cluster-aware connection\n```\n\n## Detailed Reference Files\n\n| File | Content | When to read |\n|------|---------|-------------|\n| `references\u002Fconnection-and-options.md` | Full connection options, CLI flags, SSL\u002FTLS, environment variables, interactive mode features (completion, history, preferences), RESP protocol versions | Configuring connections, setting up TLS, customizing CLI behavior |\n| `references\u002Fdata-query-commands.md` | Core data type commands: Strings, Hashes, Lists, Sets, Sorted Sets, Streams, Bitmaps, HyperLogLog, Geospatial, plus Key Operations, Database Operations, and Transactions | Looking up core command syntax, understanding command options and return values |\n| `references\u002Fmodule-data-types.md` | Module data types: JSON (RedisJSON), Vector Sets (Redis 8.0+), Bloom Filter, Cuckoo Filter, Top-K, Count-Min Sketch, T-Digest, TimeSeries (TS.*), Full-Text Search \u002F RediSearch (FT.*) — with full command syntax and behavioral notes | Working with Redis module data types, similarity search, probabilistic data structures, time series data, full-text search |\n| `references\u002Fkey-management.md` | SCAN family details (SCAN\u002FSSCAN\u002FHSCAN\u002FZSCAN), big keys analysis (--bigkeys, --memkeys, --keystats), key expiration (EXPIRE, TTL, PERSIST), key space patterns, mass insertion | Scanning databases, analyzing key distribution, managing key lifecycles |\n| `references\u002Finspection-and-monitoring.md` | INFO sections, MONITOR, --stat mode, latency tools (--latency, --latency-history, --latency-dist, --intrinsic-latency), RDB backup, replica mode, LRU simulation | Monitoring Redis instances, debugging performance, creating backups |\n| `references\u002Fadvanced-features.md` | Lua scripting (--eval, --ldb), Pub\u002FSub mode, pipe mode, CSV\u002FJSON output, string quoting and escaping, get input from stdin, remote RDB transfer, Cluster management (--cluster subcommands, cluster commands) | Running scripts, subscribing to channels, bulk data operations, managing Redis Cluster |\n| `references\u002Fserver-administration.md` | ACL management (ACL SETUSER\u002FDELUSER\u002FLIST\u002FCAT\u002FGENPASS), client management (CLIENT LIST\u002FKILL\u002FPAUSE\u002FTRACKING), configuration (CONFIG GET\u002FSET\u002FREWRITE), replication acknowledgment (WAIT\u002FWAITAOF), persistence (SAVE\u002FBGSAVE\u002FBGREWRITEAOF), replication setup (REPLICAOF), server lifecycle (SHUTDOWN\u002FFAILOVER) | Managing users and permissions, controlling client connections, runtime configuration, ensuring write durability, persistence management, replication setup |\n\n## Common Workflows\n\n### Explore an Unknown Database\n\n```bash\n# Step 1: Basic stats\nredis-cli INFO keyspace\nredis-cli DBSIZE\n\n# Step 2: Find big keys and memory usage\nredis-cli --bigkeys\nredis-cli --memkeys\n\n# Step 3: Sample keys and inspect types\nredis-cli --scan | head -20\nredis-cli TYPE \u003Ckey>\nredis-cli TTL \u003Ckey>\n\n# Step 4: Read data based on type\nredis-cli HGETALL \u003Chash_key>\nredis-cli LRANGE \u003Clist_key> 0 -1\nredis-cli ZRANGE \u003Czset_key> 0 -1 WITHSCORES\n```\n\n### Monitor in Real Time\n\n```bash\n# Live server stats\nredis-cli --stat -i 2\n\n# Watch memory specifically\nredis-cli -r -1 -i 5 INFO memory | grep used_memory_human\n\n# Monitor all commands (caution: high overhead)\nredis-cli MONITOR\n\n# Continuous latency\nredis-cli --latency-history -i 5\n```\n\n### Query Specific Key Patterns\n\n```bash\n# Count keys by pattern\nredis-cli --scan --pattern 'session:*' | wc -l\n\n# Find and inspect hash keys\nredis-cli --scan --pattern 'user:*' | while read key; do\n  echo \"=== $key ===\"\n  redis-cli HGETALL \"$key\"\ndone\n\n# Check TTL of matching keys\nredis-cli --scan --pattern 'cache:*' | while read key; do\n  redis-cli TTL \"$key\"\ndone\n```\n\n## External References\n\n- [Redis CLI Documentation](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Ftools\u002Fcli\u002F)\n- [Redis Commands](https:\u002F\u002Fredis.io\u002Fcommands\u002F)\n- [Redis Data Types](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fdata-types\u002F)\n- [Redis Protocol Specification](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Freference\u002Fprotocol-spec\u002F)\n- [Redis Mass Insertion](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fclients\u002Fpatterns\u002Fbulk-loading\u002F)\n- [Redis Lua Debugger](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fprogrammability\u002Flua-debugging\u002F)\n\n## Limitations\n\n- Use this skill only when the task clearly matches its upstream source and local project context.\n- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.\n- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.\n\n## When NOT to Use\n\n- Do not use for unrelated tasks or domains outside the stated scope.\n- Do not use for minor trivial edits where standard direct execution suffices.\n- Do not use to bypass required human confirmation or security approvals.\n\n",{"name":5,"risk":24,"tags":25,"author":9,"source":28,"license":15,"version":29,"date_added":30,"description":7,"source_repo":31,"source_type":32,"compatibility":33,"license_source":37,"network_access":20,"credential_access":20,"filesystem_access":38,"destructive_operations":20,"disable-model-invocation":20},"critical",[26,27],"cli","redis","https:\u002F\u002Fgithub.com\u002Fchaunsin\u002Fagent-skills\u002Ftree\u002Fmaster\u002Fskills\u002Fredis-cli","1.0.0",1782864000000,"chaunsin\u002Fagent-skills","community",{"codex":34,"cursor":35,"skillhub":34,"claude-code":36},"*",">=0.40",">=1.0","https:\u002F\u002Fgithub.com\u002Fchaunsin\u002Fagent-skills\u002Fblob\u002Fmaster\u002FLICENSE","read","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea",".agents\u002Fskills\u002Fredis-cli","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill redis-cli",{"tool":51,"command":52},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill redis-cli",{"tool":54,"command":55},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill redis-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002FSKILL.md",true,[59,65,69,73,77,81,85],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fadvanced-features.md","REFERENCE","参考文档",9170,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002Freferences\u002Fadvanced-features.md",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fconnection-and-options.md",8651,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002Freferences\u002Fconnection-and-options.md",{"path":70,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fdata-query-commands.md",21460,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002Freferences\u002Fdata-query-commands.md",{"path":74,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Finspection-and-monitoring.md",8532,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002Freferences\u002Finspection-and-monitoring.md",{"path":78,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fkey-management.md",8163,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002Freferences\u002Fkey-management.md",{"path":82,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fmodule-data-types.md",20175,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002Freferences\u002Fmodule-data-types.md",{"path":86,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fserver-administration.md",9781,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fredis-cli\u002Freferences\u002Fserver-administration.md",[90,99,106,113,120,127],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":98},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":98},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":98},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":98},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":98},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":98},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]