Token导航 LogoToken导航

Agent Skill · 研究检索

redis-expert(Redis expert 工具)

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

redis-expert 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 38,052。

总安装 1,623周安装 69GitHub Stars 公开资料未说明下载 569核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/lammesen/skills --skill redis-expert

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助数据库表结构、查询语句和数据维护任务。适合分析 schema、编写 SQL 或排查查询问题。使用时需明确数据库类型、连接环境和目标表。区分只读分析与写入变更,避免误操作。redis-expert 属于研究检索类 Skill,可作为该场景下的辅助能力补充。涉及删除、更新或迁移时应优先 dry-run 和备份。

来源仓库内路径:skills/redis-expert

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lammesen/skills --skill redis-expert;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

redis-expert 怎么安装?

在终端执行 npx skills add https://github.com/lammesen/skills --skill redis-expert。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

redis-expert 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

redis-expert 需要什么权限?

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

redis-expert 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

redis-expert 用的人多吗?

公开数据是累计安装 1,623 次,近一周安装 69 次,下载 569 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

redis-expert 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
redis-expert

Redis expert 工具 · 本页

1,623—需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Redis Expert Skill

You are an expert Redis developer with deep knowledge of Redis data structures, caching strategies, Pub/Sub messaging, Streams, Lua scripting, and the Redis Stack modules (RedisJSON, RediSearch, Vector Search). You help users build high-performance applications using Bun's native Redis client (Bun.redis).

Cross-Skill Integration

This skill works alongside the bun-expert skill. When using Redis with Bun:

  • Use Bun.redis for all Redis operations (not external packages)
  • Leverage Bun's native performance optimizations
  • Use Bun.file() for Redis persistence file operations
  • Use Bun's test runner for Redis integration tests

Bun.redis Client Fundamentals

Connection Setup

// Default client (uses VALKEY_URL, REDIS_URL, or localhost:6379)
import { redis } from "bun";
await redis.set("key", "value");

// Custom client with options
import { RedisClient } from "bun";
const client = new RedisClient("redis://username:password@localhost:6379", {
  connectionTimeout: 10000,     // Connection timeout (ms)
  idleTimeout: 0,               // Idle timeout (0 = no timeout)
  autoReconnect: true,          // Auto-reconnect on disconnect
  maxRetries: 10,               // Max reconnection attempts
  enableOfflineQueue: true,     // Queue commands when disconnected
  enableAutoPipelining: true,   // Automatic command batching
  tls: true,                    // Enable TLS (or provide TLSOptions)
});

URL Formats

FormatDescription
redis://localhost:6379Standard connection
redis://user:pass@host:6379/0With auth and database
rediss://host:6379TLS connection
redis+tls://host:6379TLS connection (alternative)
redis+unix:///path/to/socketUnix socket

Connection Lifecycle

const client = new RedisClient();
await client.connect();           // Explicit connect (optional - lazy by default)
await client.duplicate();         // Create duplicate connection for Pub/Sub
client.close();                   // Close connection

// Event handlers
client.onconnect = () => console.log("Connected");
client.onclose = (error) => console.log("Disconnected:", error);

// Status
console.log(client.connected);      // boolean
console.log(client.bufferedAmount); // bytes buffered

Automatic Pipelining

Commands are automatically pipelined for performance. Use Promise.all() for concurrent operations:

const [a, b, c] = await Promise.all([
  redis.get("key1"),
  redis.get("key2"),
  redis.get("key3")
]);

Raw Command Execution

For commands not yet wrapped (66 commands native, 400+ via send):

await redis.send("PFADD", ["hll", "value1", "value2"]);
await redis.send("LRANGE", ["mylist", "0", "-1"]);
await redis.send("SCAN", ["0", "MATCH", "user:*", "COUNT", "100"]);

Error Handling

try {
  await redis.get("key");
} catch (error) {
  if (error.code === "ERR_REDIS_CONNECTION_CLOSED") {
    // Handle connection closed
  } else if (error.code === "ERR_REDIS_AUTHENTICATION_FAILED") {
    // Handle auth failure
  } else if (error.message.includes("WRONGTYPE")) {
    // Handle type mismatch
  }
}

Quick Reference - Native Commands

CategoryCommands
Stringsset, get, getBuffer, del, exists, expire, ttl, incr, decr
Hasheshget, hmget, hmset, hincrby, hincrbyfloat
Setssadd, srem, sismember, smembers, srandmember, spop
Pub/Subpublish, subscribe, unsubscribe

For complete data structure reference, see DATA-STRUCTURES.md.


Key Naming Conventions

Use consistent naming throughout your application:

PatternExampleUse Case
{entity}:{id}user:123Simple keys
{entity}:{id}:{field}user:123:settingsSub-fields
{namespace}:{entity}:{id}app1:user:123Multi-tenant
{operation}:{entity}:{id}cache:user:123Operation-specific
{entity}:{id}:{timestamp}session:abc:1703001234Time-based

Quick Patterns Reference

Cache-Aside Pattern

async function cached<T>(key: string, ttl: number, fetch: () => Promise<T>): Promise<T> {
  const cached = await redis.get(key);
  if (cached) return JSON.parse(cached);

  const data = await fetch();
  await redis.set(key, JSON.stringify(data));
  await redis.expire(key, ttl);
  return data;
}

// Usage
const user = await cached(`user:${id}`, 3600, () => db.findUser(id));

Rate Limiting

async function rateLimit(id: string, limit: number, window: number): Promise<boolean> {
  const key = `ratelimit:${id}`;
  const count = await redis.incr(key);
  if (count === 1) await redis.expire(key, window);
  return count <= limit;
}

// Usage
if (!await rateLimit(userId, 100, 60)) {
  throw new Error("Rate limit exceeded");
}

Distributed Lock

async function acquireLock(resource: string, ttlMs: number): Promise<string | null> {
  const token = crypto.randomUUID();
  const result = await redis.send("SET", [resource, token, "NX", "PX", ttlMs.toString()]);
  return result === "OK" ? token : null;
}

async function releaseLock(resource: string, token: string): Promise<boolean> {
  const script = `
    if redis.call("GET", KEYS[1]) == ARGV[1] then
      return redis.call("DEL", KEYS[1])
    end
    return 0
  `;
  const result = await redis.send("EVAL", [script, "1", resource, token]);
  return result === 1;
}

For complete patterns, see PATTERNS.md.


Performance Guidelines

Do's

  1. Use pipelining for multiple commands: Promise.all([...])
  2. Prefer atomic operations: INCR over GET + SET
  3. Use Lua scripts for complex atomic operations
  4. Set appropriate TTLs to prevent memory bloat
  5. Keep values small (<100KB ideal, <1MB max)
  6. Use connection pooling via RedisClient reuse

Don'ts

  1. Avoid KEYS in production - use SCAN instead
  2. Don't store large objects - break into smaller pieces
  3. Avoid blocking commands on main connection - use duplicate()
  4. Don't ignore TTLs - set expiration on all cached data

Monitoring

// Server info
const info = await redis.send("INFO", ["memory"]);

// Memory usage
const memoryUsage = await redis.send("MEMORY", ["USAGE", "mykey"]);

// Slow log
const slowLog = await redis.send("SLOWLOG", ["GET", "10"]);

// Client list
const clients = await redis.send("CLIENT", ["LIST"]);

Related Documentation

DocumentDescription
DATA-STRUCTURES.mdComplete data structure reference (Strings, Hashes, Lists, Sets, Sorted Sets, Streams, etc.)
STACK-FEATURES.mdRedis Stack modules (RedisJSON, RediSearch, Vector Search, TimeSeries)
PATTERNS.mdCaching strategies, session storage, rate limiting, distributed locks
PUBSUB-STREAMS.mdPub/Sub messaging and Streams for event sourcing
SCRIPTING.mdLua scripting patterns and script management
TESTING.mdTesting patterns for Redis operations with bun:test

Sub-Agents

AgentUse When
redis-cacheImplementing caching strategies, cache invalidation, TTL management
redis-searchFull-text search, vector similarity search, RAG applications
redis-streamsEvent sourcing, message queues, real-time data pipelines

When This Skill Activates

This skill automatically activates when:

  • Working with Bun.redis or RedisClient
  • Implementing caching layers
  • Building real-time features with Pub/Sub
  • Designing event-driven architectures with Streams
  • Adding full-text or vector search
  • Writing Lua scripts for Redis
  • Optimizing Redis performance

平台分布

Claude Code

30.86%
按下载量换算176

Antigravity

22.75%
按下载量换算129

Gemini CLI

17.24%
按下载量换算98

Cursor

14.07%
按下载量换算80

OpenCode

8.07%
按下载量换算46

Codex

4%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills