AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Redis

skill-kubiyabot-skill-redis-skill · by kubiyabot

Redis CLI client for cache and data store operations running inside a Docker container

No reviews yet
0 installs
34 views
0.0% view→install

Install

$ agentstack add skill-kubiyabot-skill-redis-skill

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-kubiyabot-skill-redis-skill)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
7mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Redis? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Redis Skill

Access Redis databases using the redis-cli client running inside a Docker container. Set/get keys, manage data structures, monitor performance, and perform cache operations without installing Redis locally.

Overview

This skill provides the redis-cli command-line client through a containerized runtime. Connect to any Redis instance (local or remote), execute commands, manipulate data structures, and manage your cache - all while keeping your host system clean.

When to Use This Skill

Use this skill when you need to:

  • Connect to Redis instances without local installation
  • Set and get cached values
  • Manage Redis data structures (strings, lists, sets, hashes, sorted sets)
  • Monitor Redis performance and commands
  • Test cache connections
  • Debug caching issues
  • Flush databases and manage keys
  • Pub/Sub messaging operations
  • Execute administrative commands

Prerequisites

Docker

The Redis client runs inside a Docker container:

# macOS (using Homebrew)
brew install --cask docker

# Linux (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install docker.io
sudo systemctl start docker

Redis Server

You need access to a Redis server:

  • Local Redis instance
  • Remote Redis server
  • Cloud-hosted Redis (AWS ElastiCache, Redis Cloud, Azure Cache, etc.)
  • Docker Redis container

Configuration

Add to your .skill-engine.toml:

[skills.redis]
source = "docker:redis:7-alpine"
runtime = "docker"
description = "Redis CLI client"

[skills.redis.docker]
image = "redis:7-alpine"
entrypoint = "redis-cli"
network = "bridge"
memory = "128m"
rm = true

Configuration Explained

  • image: redis:7-alpine - Redis 7.x Alpine image (~30MB)
  • entrypoint: redis-cli - Redis command-line interface
  • network: bridge - Allows connections to Redis servers (local and remote)
  • memory: 128m - Limits container to 128MB RAM
  • rm: true - Automatically removes container after execution

Usage

Redis skill uses pass-through syntax - all arguments after -- are passed directly to redis-cli:

skill run redis -- [redis-cli arguments] [COMMAND] [args...]

Connection Methods

Using Command-Line Arguments

# Connect to local Redis
skill run redis -- -h localhost

# Connect with specific port
skill run redis -- -h localhost -p 6379

# Connect to remote Redis
skill run redis -- -h redis.example.com -p 6379

# Connect with authentication
skill run redis -- -h localhost -a password

# Connect to specific database number
skill run redis -- -h localhost -n 1

Using Environment Variables

# Set Redis password
export REDISCLI_AUTH=your_password

# Connect with authentication
skill run redis -- -h localhost

Common Operations

String Operations

# Set a key
skill run redis -- -h localhost SET mykey "myvalue"

# Get a key
skill run redis -- -h localhost GET mykey

# Set with expiry (EX = seconds)
skill run redis -- -h localhost SET session:123 "data" EX 3600

# Set multiple keys
skill run redis -- -h localhost MSET key1 "value1" key2 "value2"

# Get multiple keys
skill run redis -- -h localhost MGET key1 key2

# Increment counter
skill run redis -- -h localhost INCR counter

# Decrement counter
skill run redis -- -h localhost DECR counter

# Append to string
skill run redis -- -h localhost APPEND mykey " more data"

# Get string length
skill run redis -- -h localhost STRLEN mykey

Key Management

# List all keys
skill run redis -- -h localhost KEYS "*"

# List keys with pattern
skill run redis -- -h localhost KEYS "user:*"

# Check if key exists
skill run redis -- -h localhost EXISTS mykey

# Delete key
skill run redis -- -h localhost DEL mykey

# Delete multiple keys
skill run redis -- -h localhost DEL key1 key2 key3

# Rename key
skill run redis -- -h localhost RENAME oldkey newkey

# Get key type
skill run redis -- -h localhost TYPE mykey

# Set expiration (seconds)
skill run redis -- -h localhost EXPIRE mykey 60

# Set expiration (milliseconds)
skill run redis -- -h localhost PEXPIRE mykey 60000

# Remove expiration
skill run redis -- -h localhost PERSIST mykey

# Get time to live
skill run redis -- -h localhost TTL mykey

# Get TTL in milliseconds
skill run redis -- -h localhost PTTL mykey

Hash Operations

# Set hash field
skill run redis -- -h localhost HSET user:1 name "John"

# Set multiple hash fields
skill run redis -- -h localhost HMSET user:1 name "John" email "john@example.com" age 30

# Get hash field
skill run redis -- -h localhost HGET user:1 name

# Get multiple hash fields
skill run redis -- -h localhost HMGET user:1 name email

# Get all hash fields and values
skill run redis -- -h localhost HGETALL user:1

# Get all hash keys
skill run redis -- -h localhost HKEYS user:1

# Get all hash values
skill run redis -- -h localhost HVALS user:1

# Check if hash field exists
skill run redis -- -h localhost HEXISTS user:1 name

# Delete hash field
skill run redis -- -h localhost HDEL user:1 age

# Increment hash field
skill run redis -- -h localhost HINCRBY user:1 visits 1

List Operations

# Push to left (beginning)
skill run redis -- -h localhost LPUSH mylist "item1"

# Push to right (end)
skill run redis -- -h localhost RPUSH mylist "item2"

# Push multiple items
skill run redis -- -h localhost RPUSH mylist "item3" "item4" "item5"

# Get list length
skill run redis -- -h localhost LLEN mylist

# Get list range
skill run redis -- -h localhost LRANGE mylist 0 -1  # All items

# Get first N items
skill run redis -- -h localhost LRANGE mylist 0 9

# Get specific range
skill run redis -- -h localhost LRANGE mylist 5 10

# Pop from left
skill run redis -- -h localhost LPOP mylist

# Pop from right
skill run redis -- -h localhost RPOP mylist

# Get item by index
skill run redis -- -h localhost LINDEX mylist 0

# Set item by index
skill run redis -- -h localhost LSET mylist 0 "new value"

# Trim list
skill run redis -- -h localhost LTRIM mylist 0 99

Set Operations

# Add members to set
skill run redis -- -h localhost SADD myset "member1"

# Add multiple members
skill run redis -- -h localhost SADD myset "member2" "member3"

# Get all members
skill run redis -- -h localhost SMEMBERS myset

# Check if member exists
skill run redis -- -h localhost SISMEMBER myset "member1"

# Get set size
skill run redis -- -h localhost SCARD myset

# Remove member
skill run redis -- -h localhost SREM myset "member1"

# Pop random member
skill run redis -- -h localhost SPOP myset

# Get random member (without removing)
skill run redis -- -h localhost SRANDMEMBER myset

# Set intersection
skill run redis -- -h localhost SINTER set1 set2

# Set union
skill run redis -- -h localhost SUNION set1 set2

# Set difference
skill run redis -- -h localhost SDIFF set1 set2

Sorted Set Operations

# Add member with score
skill run redis -- -h localhost ZADD leaderboard 100 "player1"

# Add multiple members
skill run redis -- -h localhost ZADD leaderboard 85 "player2" 92 "player3"

# Get range by rank
skill run redis -- -h localhost ZRANGE leaderboard 0 -1

# Get range with scores
skill run redis -- -h localhost ZRANGE leaderboard 0 -1 WITHSCORES

# Get reverse range (highest first)
skill run redis -- -h localhost ZREVRANGE leaderboard 0 -1 WITHSCORES

# Get range by score
skill run redis -- -h localhost ZRANGEBYSCORE leaderboard 80 100

# Get member score
skill run redis -- -h localhost ZSCORE leaderboard "player1"

# Get member rank
skill run redis -- -h localhost ZRANK leaderboard "player1"

# Increment score
skill run redis -- -h localhost ZINCRBY leaderboard 5 "player1"

# Get sorted set size
skill run redis -- -h localhost ZCARD leaderboard

# Remove member
skill run redis -- -h localhost ZREM leaderboard "player1"

# Remove by rank range
skill run redis -- -h localhost ZREMRANGEBYRANK leaderboard 0 2

# Remove by score range
skill run redis -- -h localhost ZREMRANGEBYSCORE leaderboard 0 50

Pub/Sub Operations

# Subscribe to channel
skill run redis -- -h localhost SUBSCRIBE mychannel

# Subscribe to multiple channels
skill run redis -- -h localhost SUBSCRIBE channel1 channel2

# Subscribe to pattern
skill run redis -- -h localhost PSUBSCRIBE "news:*"

# Publish message
skill run redis -- -h localhost PUBLISH mychannel "Hello World"

# List active channels
skill run redis -- -h localhost PUBSUB CHANNELS

# Count subscribers
skill run redis -- -h localhost PUBSUB NUMSUB mychannel

Database Management

Select Database

# Switch to database 0 (default)
skill run redis -- -h localhost -n 0

# Switch to database 1
skill run redis -- -h localhost -n 1

# Select within session
skill run redis -- -h localhost SELECT 2

Flush Operations

# Flush current database
skill run redis -- -h localhost FLUSHDB

# Flush all databases
skill run redis -- -h localhost FLUSHALL

# Async flush (non-blocking)
skill run redis -- -h localhost FLUSHDB ASYNC

Monitoring & Administration

Server Information

# Get all server info
skill run redis -- -h localhost INFO

# Get specific section
skill run redis -- -h localhost INFO server
skill run redis -- -h localhost INFO memory
skill run redis -- -h localhost INFO stats
skill run redis -- -h localhost INFO replication
skill run redis -- -h localhost INFO cpu

# Get server config
skill run redis -- -h localhost CONFIG GET "*"

# Get specific config
skill run redis -- -h localhost CONFIG GET maxmemory

# Set config value
skill run redis -- -h localhost CONFIG SET maxmemory 100mb

Monitoring Commands

# Monitor all commands in real-time
skill run redis -- -h localhost MONITOR

# Get slow log
skill run redis -- -h localhost SLOWLOG GET 10

# Reset slow log
skill run redis -- -h localhost SLOWLOG RESET

# Get client list
skill run redis -- -h localhost CLIENT LIST

# Get current client name
skill run redis -- -h localhost CLIENT GETNAME

# Set client name
skill run redis -- -h localhost CLIENT SETNAME myapp

# Kill client
skill run redis -- -h localhost CLIENT KILL addr 127.0.0.1:6379

Performance & Statistics

# Get database size
skill run redis -- -h localhost DBSIZE

# Get last save time
skill run redis -- -h localhost LASTSAVE

# Measure command latency
skill run redis -- -h localhost --latency

# Continuous latency monitoring
skill run redis -- -h localhost --latency-history

# Benchmark
skill run redis -- -h localhost --stat

# Ping server
skill run redis -- -h localhost PING

Advanced Examples

Cache Pattern

# Check cache
skill run redis -- -h localhost GET cache:user:123

# If miss, set cache with TTL
skill run redis -- -h localhost SET cache:user:123 '{"name":"John"}' EX 300

# Delete cache
skill run redis -- -h localhost DEL cache:user:123

# Clear all cache keys
skill run redis -- -h localhost EVAL "return redis.call('del', unpack(redis.call('keys', 'cache:*')))" 0

Session Management

# Create session
skill run redis -- -h localhost SET session:abc123 '{"user_id":1,"email":"user@example.com"}' EX 3600

# Get session
skill run redis -- -h localhost GET session:abc123

# Extend session TTL
skill run redis -- -h localhost EXPIRE session:abc123 3600

# Delete session
skill run redis -- -h localhost DEL session:abc123

Rate Limiting

# Simple rate limit (5 requests per minute)
skill run redis -- -h localhost INCR rate:user:123:minute
skill run redis -- -h localhost EXPIRE rate:user:123:minute 60

# Check rate limit
skill run redis -- -h localhost GET rate:user:123:minute

Distributed Locks

# Acquire lock
skill run redis -- -h localhost SET lock:resource:1 "token123" NX EX 30

# Release lock
skill run redis -- -h localhost DEL lock:resource:1

# Check lock
skill run redis -- -h localhost GET lock:resource:1

Batch Operations

Execute Multiple Commands

# Pipe commands to redis-cli
cat password ~cached:* +get

# Delete user
skill run redis -- -h localhost ACL DELUSER alice

Troubleshooting

Connection Issues

# Test connection
skill run redis -- -h localhost PING

# Check server is running
docker ps | grep redis

# Verify port
telnet localhost 6379

Authentication Failed

# Check password
export REDISCLI_AUTH=correct_password
skill run redis -- -h localhost PING

# Or use -a flag
skill run redis -- -h localhost -a correct_password PING

Cannot Connect to Docker Network

# Connect to host Redis from container
# macOS/Windows: use host.docker.internal
skill run redis -- -h host.docker.internal

# Linux: use host IP
skill run redis -- -h 172.17.0.1

Performance Issues

# Check slow queries
skill run redis -- -h localhost SLOWLOG GET 10

# Check memory usage
skill run redis -- -h localhost INFO memory

# Check connected clients
skill run redis -- -h localhost CLIENT LIST

Common Errors

| Error | Cause | Solution | |-------|-------|----------| | "Connection refused" | Redis not running or wrong port | Check server status and port | | "NOAUTH Authentication required" | Password needed | Use -a password or set REDISCLI_AUTH | | "WRONGPASS invalid password" | Incorrect password | Verify password | | "MOVED" or "ASK" | Redis Cluster redirect | Connect to correct node | | "OOM command not allowed" | Out of memory | Check maxmemory setting |

Redis CLI Options

Useful Flags

# Raw output (no formatting)
skill run redis -- -h localhost --raw GET mykey

# CSV output
skill run redis -- -h localhost --csv LRANGE mylist 0 -1

# Execute and exit
skill run redis -- -h localhost -c "SET key value"

# Repeat command N times
skill run redis -- -h localhost --repeat 5 PING

# Sleep between commands
skill run redis -- -h localhost --interval 1 --repeat 10 INFO stats

# Enable cluster mode
skill run redis -- -h localhost -c --cluster

# SSL/TLS connection
skill run redis -- -h localhost --tls --cacert ca.crt

Docker Image Details

  • Image: redis:7-alpine
  • Base: Alpine Linux
  • Size: ~30MB
  • Redis Version: 7.x
  • Included Tools: redis-cli, redis-benchmark
  • Platforms: linux/amd64, linux/arm64

Resources

Quick Reference

Essential Commands Table

| Operation | Command | |-----------|---------| | Connect | -h host -p port | | Authenticate | -a password | | Set key | SET key value | | Get key | GET key | | Set with TTL | SET key value EX seconds | | Delete key | DEL key | | List keys | KEYS pattern | | Check exists | EXISTS key | | Set expiry | EXPIRE key seconds | | Get TTL | TTL key | | Hash set | HSET hash field value | | Hash get | HGET hash field | | List push | RPUSH list value | | List range | LRANGE list 0 -1 | | Set add | SADD set member | | Sorted set add | ZADD zset score member | | Publish | PUBLISH channel message | | Subscribe | SUBSCRIBE channel | | Server info | INFO | | Monitor | MONITOR | | Flush DB | FLUSHDB | | Ping | PING |

Source & license

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

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

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.