Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

redis-storeRedis store 效率

Agent Skill

用于辅助数据库表结构、查询语句、迁移脚本和数据维护任务。它适合让 Agent 分析 schema、编写 SQL、排查查询问题、整理索引或生成迁移建议。使用时需要明确数据库类型、连接环境和目标表,区分只读分析与写入变更;涉及删除、更新、迁移和批量导入时,应优先 dry-run、备份或事务保护,避免误操作。

总安装

79,298

周安装

3,177

GitHub Stars

4

下载量

25,670
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:redis-store(Redis store 效率)
来源仓库:https://github.com/ivangdavila/redis-store
安装命令:
openclaw skills install redis-store
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install redis-store

简介

有效地使用 Redis 进行缓存、队列和数据结构,并具有适当的过期和持久性。

  • 适用于高性能数据存储与消息传递场景。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 通过 clawhub 在 OpenClaw 中安装使用。
  • 需设置 Redis 服务端地址与认证凭据。
  • redis-store 属于效率类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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"]}}

Expiration (Memory Leaks)

  • Keys without TTL live forever—set expiry on every cache key: SET key value EX 3600
  • Can't add TTL after SET without another command—use SETEX or SET ... EX
  • EXPIRE resets on key update by default—SET removes TTL; use SET ... KEEPTTL (Redis 6+)
  • Lazy expiration: expired keys removed on access—may consume memory until touched
  • SCAN with large database: expired keys still show until cleanup cycle runs

Data Structures I Underuse

  • Sorted sets for rate limiting: ZADD limits:{user} {now} {request_id} + ZREMRANGEBYSCORE for sliding window
  • HyperLogLog for unique counts: PFADD visitors {ip} uses 12KB for billions of uniques
  • Streams for queues: XADD, XREAD, XACK—better than LIST for reliable queues
  • Hashes for objects: HSET user:1 name "Alice" email "a@b.com"—more memory efficient than JSON string

Atomicity Traps

  • GET then SET is not atomic—another client can modify between; use INCR, SETNX, or Lua
  • SETNX for locks: SET lock:resource {token} NX EX 30—NX = only if not exists
  • WATCH/MULTI/EXEC for optimistic locking—transaction aborts if watched key changed
  • Lua scripts are atomic—use for complex operations: EVAL "script" keys args

Pub/Sub Limitations

  • Messages not persisted—subscribers miss messages sent while disconnected
  • At-most-once delivery—no acknowledgment, no retry
  • Use Streams for reliable messaging—XREAD BLOCK + XACK pattern
  • Pub/Sub across cluster: message goes to all nodes—works but adds overhead

Persistence Configuration

  • RDB (snapshots): fast recovery, but data loss between snapshots—default every 5min
  • AOF (append log): less data loss, slower recovery—appendfsync everysec is good balance
  • Both off = pure cache—acceptable if data can be regenerated
  • BGSAVE for manual snapshot—doesn't block but forks process, needs memory headroom

Memory Management (Critical)

  • maxmemory must be set—without it, Redis uses all RAM, then swap = disaster
  • Eviction policies: allkeys-lru for cache, volatile-lru for mixed, noeviction for persistent data
  • INFO memory shows usage—monitor used_memory vs maxmemory
  • Large keys hurt eviction—one 1GB key evicts poorly; prefer many small keys

Clustering

  • Hash slots: keys distributed by hash—same slot required for multi-key operations
  • Hash tags: {user:1}:profile and {user:1}:sessions go to same slot—use for related keys
  • No cross-slot MGET/MSET—error unless all keys in same slot
  • MOVED redirect: client must follow—use cluster-aware client library

Common Patterns

  • Cache-aside: check Redis, miss → fetch DB → write Redis—standard caching
  • Write-through: write DB + Redis together—keeps cache fresh
  • Rate limiter: INCR requests:{ip}:{minute} with EXPIRE—simple fixed window
  • Distributed lock: SET ... NX EX + unique token—verify token on release

Connection Management

  • Connection pooling: reuse connections—creating is expensive
  • Pipeline commands: send batch without waiting—reduces round trips
  • QUIT on shutdown—graceful disconnect
  • Sentinel or Cluster for HA—single Redis is SPOF

Common Mistakes

  • No TTL on cache keys—memory grows until OOM
  • Using as primary database without persistence—data loss on restart
  • Blocking operations in single-threaded Redis—KEYS * blocks everything; use SCAN
  • Storing large blobs—Redis is RAM; 100MB values are expensive
  • Ignoring maxmemory—production Redis without limit will crash host

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

81.28%
按下载量换算20,865

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills