
redis
Redis data structures and commands including strings, lists, hashes, sets, sorted sets, streams, and transactions for high-performance caching and real-time applications.
- Installs
- 55
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-sql --skill redis- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads redis automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Redis Data Structures
Getting Started
# Start Redis server
redis-server
# Connect to Redis CLI
redis-cli
# Test connection
ping # Returns "PONG"
# Select database
SELECT 0 # Default database
SELECT 1 # Database 1
String Operations
// SET and GET
SET key value
SET user:1:name "John Doe"
GET user:1:name
// SET with options
SET key value EX 3600 // Expire in 3600 seconds
SET key value PX 3600000 // Expire in milliseconds
SET key value NX // Only if not exists
SET key value XX // Only if exists
// Numeric operations
SET counter 0
INCR counter // Increment by 1
INCRBY counter 5 // Increment by N
DECR counter // Decrement by 1
DECRBY counter 3 // Decrement by N
INCRBYFLOAT counter 2.5 // Increment by float
// String operations
APPEND key " suffix" // Append to string
STRLEN key // Get length
GETRANGE key 0 3 // Get substring
SETRANGE key 0 "new" // Set substring
// Multiple keys
MSET key1 val1 key2 val2 // Set multiple
MGET key1 key2 // Get multiple
GETSET key newval // Get old value and set new
List Operations (Ordered collections)
// Push operations
LPUSH list value1 value2 // Push to left
RPUSH list value1 value2 // Push to right
LPUSHX list value // Push only if exists
RPUSHX list value // Push only if exists
// Pop operations
LPOP list // Remove and get from left
RPOP list // Remove and get from right
LPOP list 2 // Pop multiple (Redis 6.2+)
// List queries
LRANGE list 0 -1 // Get all elements
LRANGE list 0 2 // Get first 3 elements
LINDEX list 1 // Get element at index
LLEN list // Get list length
LSET list 0 newvalue // Set element at index
// Blocking operations
BLPOP list1 list2 10 // Block until pop or timeout
BRPOP list1 list2 10 // Block until right pop
BRPOPLPUSH src dst 10 // Block, pop right, push left
// Trimming
LTRIM list 0 2 // Keep only first 3 elements
Hash Operations (Maps/objects)
// SET and GET
HSET hash field value // Set single field
HSET hash f1 v1 f2 v2 // Set multiple fields
HGET hash field // Get field value
HGETALL hash // Get all fields and values
// Existence and length
HEXISTS hash field // Check field exists
HLEN hash // Number of fields
HKEYS hash // Get all field names
HVALS hash // Get all values
HSTRLEN hash field // Get value length
// Update operations
HINCRBY hash field 5 // Increment numeric field
HINCRBYFLOAT hash field 2.5 // Increment by float
HSETNX hash field value // Set only if not exists
// Delete
HDEL hash field1 field2 // Delete fields
Set Operations (Unordered unique values)
// Add and remove
SADD set member1 member2 // Add members
SREM set member1 member2 // Remove members
SISMEMBER set member // Check membership
SMEMBERS set // Get all members
SCARD set // Count members
// Set operations
SINTER set1 set2 // Intersection
SUNION set1 set2 // Union
SDIFF set1 set2 // Difference
SINTERSTORE dest s1 s2 // Store intersection result
SUNIONSTORE dest s1 s2 // Store union result
SDIFFSTORE dest s1 s2 // Store difference result
// Pop operations
SPOP set // Remove and return random member
SPOP set 2 // Remove and return N members
SRANDMEMBER set // Get random member without removing
SRANDMEMBER set 3 // Get N random members
Sorted Set Operations (Ordered by score)
// Add and remove
ZADD zset 1 member1 2 member2 // Add with scores
ZREM zset member1 // Remove members
ZCARD zset // Count members
ZSCORE zset member // Get score
// Range queries by score
ZRANGE zset 0 -1 // Get all by index
ZRANGE zset 0 -1 WITHSCORES // With scores
ZREVRANGE zset 0 -1 // Reverse order
ZREVRANGE zset 0 -1 WITHSCORES // Reverse with scores
ZRANGEBYSCORE zset 10 50 // Get by score range
ZRANGEBYSCORE zset -inf +inf // All scores
ZRANGEBYSCORE zset 10 50 LIMIT 0 5 // Pagination
// Score operations
ZINCRBY zset 5 member // Increment score
ZCOUNT zset 10 50 // Count in score range
// Rank queries
ZRANK zset member // Get rank (0-based)
ZREVRANK zset member // Get reverse rank
Key Operations
// Key management
KEYS pattern // Find keys matching pattern
EXISTS key1 key2 // Check key existence
DEL key1 key2 // Delete keys
UNLINK key1 key2 // Async delete
TYPE key // Get key type
// Expiration
EXPIRE key 3600 // Set expiration (seconds)
PEXPIRE key 3600000 // Set expiration (milliseconds)
TTL key // Get TTL (seconds)
PTTL key // Get TTL (milliseconds)
PERSIST key // Remove expiration
// Renaming
RENAME oldkey newkey // Rename key
RENAMENX oldkey newkey // Rename only if new doesn't exist
Transactions & Atomicity
// Transaction execution
MULTI // Start transaction
SET key1 value1
INCR key2
GET key3
EXEC // Execute all commands atomically
// Discard transaction
MULTI
SET key value
DISCARD // Cancel transaction
// Watch keys
WATCH key1 key2 // Monitor keys for changes
MULTI
SET key1 newvalue
EXEC // Fails if keys changed
Pub/Sub Messaging
// Publisher
PUBLISH channel "message" // Publish to channel
// Subscriber
SUBSCRIBE channel1 channel2 // Subscribe to channels
PSUBSCRIBE pattern* // Subscribe to pattern
UNSUBSCRIBE channel // Unsubscribe
PUNSUBSCRIBE pattern // Unsubscribe from pattern
// Query subscriptions
PUBSUB CHANNELS // Active channels
PUBSUB NUMSUB ch1 ch2 // Subscribers per channel
PUBSUB NUMPAT // Pattern subscriptions count
Server Commands
DBSIZE // Total keys in DB
FLUSHDB // Clear current DB
FLUSHALL // Clear all DBs
SAVE // Synchronous save
BGSAVE // Background save
LASTSAVE // Last save time
INFO // Server statistics
CONFIG GET parameter // Get config value
CONFIG SET parameter value // Set config value
Next Steps
Learn Redis patterns for caching, sessions, rate limiting, and real-time applications in the redis-patterns skill.
FAQ
What does the redis skill do?
Redis data structures and commands including strings, lists, hashes, sets, sorted sets, streams, and transactions for high-performance caching and real-time applications.
How do I install redis?
Run npx skills add https://github.com/pluginagentmarketplace/custom-plugin-sql --skill redis in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/redis/ (personal) or .claude/skills/redis/ (project).
Which AI agents can use redis?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is redis safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains redis?
It is published by pluginagentmarketplace in pluginagentmarketplace/custom-plugin-sql. It has 55 recorded installs.
More from pluginagentmarketplace/custom-plugin-sql
mysql
pluginagentmarketplace/custom-plugin-sql
MySQL database administration and development
data-analysis-sql
pluginagentmarketplace/custom-plugin-sql
SQL for data analysis with exploratory analysis, advanced aggregations, statistical functions, outlier detection, and business insights. 50+ real-world analytics queries.
data-warehouse
pluginagentmarketplace/custom-plugin-sql
Data warehouse design mastery with star schema, dimensional modeling, fact/dimension tables, slowly changing dimensions, and enterprise best practices. Complete schema examples included.
postgresql
pluginagentmarketplace/custom-plugin-sql
PostgreSQL administration and setup including installation, configuration, backup/recovery, replication, and high-availability. Learn production PostgreSQL operations.
bi-fundamentals
pluginagentmarketplace/custom-plugin-sql
Open the skill to read its SKILL.md instructions.
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.