Use Redis effectively for caching, queues, and data structures with proper expiration and persistence.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install redis-store或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install redis-store⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/redis-store/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: Redis description: Use Redis effectively for caching, queues, and data structures with proper expiration and persistence. metadata: {"clawdbot":{"emoji":"🔴","requires":{"anyBins":["redis-cli"]},"os":["linux","darwin","win32"]}} ---
SET key value EX 3600SETEX or SET ... EXEXPIRE resets on key update by default—SET removes TTL; use SET ... KEEPTTL (Redis 6+)SCAN with large database: expired keys still show until cleanup cycle runsZADD limits:{user} {now} {request_id} + ZREMRANGEBYSCORE for sliding windowPFADD visitors {ip} uses 12KB for billions of uniquesXADD, XREAD, XACK—better than LIST for reliable queuesHSET user:1 name "Alice" email "[email protected]"—more memory efficient than JSON stringGET then SET is not atomic—another client can modify between; use INCR, SETNX, or LuaSETNX for locks: SET lock:resource {token} NX EX 30—NX = only if not existsWATCH/MULTI/EXEC for optimistic locking—transaction aborts if watched key changedEVAL "script" keys argsXREAD BLOCK + XACK patternappendfsync everysec is good balanceBGSAVE for manual snapshot—doesn't block but forks process, needs memory headroommaxmemory must be set—without it, Redis uses all RAM, then swap = disasterallkeys-lru for cache, volatile-lru for mixed, noeviction for persistent dataINFO memory shows usage—monitor used_memory vs maxmemory{user:1}:profile and {user:1}:sessions go to same slot—use for related keysMGET/MSET—error unless all keys in same slotMOVED redirect: client must follow—use cluster-aware client libraryINCR requests:{ip}:{minute} with EXPIRE—simple fixed windowSET ... NX EX + unique token—verify token on releaseQUIT on shutdown—graceful disconnectKEYS * blocks everything; use SCANmaxmemory—production Redis without limit will crash host安装 Redis 后,可以对 AI 说这些话来触发它
Help me get started with Redis
Explains what Redis does, walks through the setup, and runs a quick demo based on your current project
Use Redis to use Redis effectively for caching, queues, and data structures with...
Invokes Redis with the right parameters and returns the result directly in the conversation
What can I do with Redis in my developer & devops workflow?
Lists the top use cases for Redis, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/redis-store/ 目录(个人级,所有项目可用),或 .claude/skills/redis-store/(项目级)。重启 AI 客户端后,用 /redis-store 主动调用,或让 AI 根据上下文自动发现并使用。
Redis 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Redis 可免费安装使用。请查阅仓库了解许可证信息。
Use Redis effectively for caching, queues, and data structures with proper expiration and persistence.
Redis 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Redis
Identifies repetitive steps in your workflow and sets up Redis to handle them automatically