Command Palette

Search for a command to run...

Назад к скиллам
скилл № 25288

Redis

Designs, tunes, and debugs Redis: data structures, memory limits, persistence, Streams and queues, locks, replication, and cluster. Use when writing Redis…

БесплатноБез исполняемых скриптов
clawicот clawic★ 23 звезды на GitHub

Установить Redis в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

User preferences and memory live in ~/Clawic/data/redis-store/ (see setup.md on first use, memory-template.md for the file format). If you have data at an old location (~/redis-store/ or ~/clawic/redis-store/), move it to ~/Clawic/data/redis-store/, and say in one line that you moved it and from where.

When To Use

  • Choosing how to model something in Redis: hash vs JSON string vs separate keys, sorted set vs stream, set vs bitmap vs HyperLogLog
  • Writing Redis commands, pipelines, Lua scripts or Functions, and getting atomicity right
  • Building the standard recipes: cache, session store, job queue, distributed lock, rate limiter, leaderboard, dedup/idempotency key, counter
  • Operating a server: maxmemory and eviction, persistence and backups, ACLs, connection limits, replication, Sentinel, Cluster
  • A production incident: OOM on writes, latency spike, unresponsive server, keyspace evicted or wiped, failover that lost writes, replica that never syncs
  • Migrating: standalone to cluster, version upgrade, a managed provider (ElastiCache, MemoryDB, Redis Cloud, Upstash, Memorystore, Azure) or the Valkey fork
  • Not for store-agnostic cache hierarchy design (caching), rate-limit algorithm selection (rate-limiting), or relational modeling (pg, sql)

Quick Reference

Situation Play
Writes fail with OOM command not allowed maxmemory reached under noeviction (the default policy) — Expiration And Eviction, then memory-eviction.md
Memory grows forever, hit rate fine Keys written without a TTL, or a stream nobody trims (→ memory-eviction.md, queues.md)
Keys disappear before their TTL Eviction, not expiry: check evicted_keys in INFO stats (→ memory-eviction.md)
Keys never expire A plain SET on an existing key clears its TTL — use SET ... KEEPTTL (Redis >=6.0) or re-set it (→ keys-ttl.md)
Server froze for seconds An O(N) command on a big collection, a fork, or swap — Latency Triage
Need to walk the keyspace SCAN cursor loop with COUNT 500, never KEYS (→ cli.md)
Which structure for this data Choosing The Data Structure
Job queue with retries and acks Stream + consumer group; a List only for fire-and-forget (→ queues.md)
Subscribers miss messages sent while down Pub/Sub is at-most-once and stores nothing — move to Streams (→ pubsub.md)
Two workers must not run at once SET lock <token> NX EX <ttl> + Lua release comparing the token (→ locks.md)
Read-modify-write race One atomic command or one Lua script; MULTI is not a rollback (→ scripting.md)
CROSSSLOT keys ... don't hash to the same slot Hash-tag the related keys: {user:1}:profile (→ cluster.md)
MOVED / ASK reaching the app Client is not cluster-aware, or its slot map is stale (→ cluster.md)
MISCONF ... unable to persist to disk The last background save failed; writes are refused on purpose (→ persistence.md)
Writes acknowledged then lost after failover Replication is asynchronous by default — WAIT, min-replicas-to-write (→ high-availability.md)
Latency spike with no CPU load Fork for RDB/AOF rewrite, transparent huge pages, or swap (→ performance.md)
Throughput far below 10^5 ops/s Round trips, not Redis: pipeline or use multi-key commands (→ performance.md)
Everything recomputes at once after a deploy or restart Cache stampede: TTL jitter + single-flight recompute (→ caching.md)
Instance was reachable from the internet Treat as compromised, then bind, ACL, TLS (→ security.md)
Provider rejects CONFIG SET, DEBUG, SHUTDOWN Managed capability matrix (→ managed-redis.md)
Tests are flaky or slow around Redis Real server in a container, unique prefix per test, no shared FLUSHDB (→ testing.md)
Anything else INFO, SLOWLOG GET 10, LATENCY DOCTOR, MEMORY DOCTOR before changing anything; reproduce in redis-cli before blaming the client library

Depth on demand, by phase:

  • Model — data-types.md which structure wins and what it costs · keys-ttl.md key design, expiry semantics, SCAN, keyspace notifications · patterns.md sessions, leaderboards, counters, dedup, autocomplete, geo · modules.md JSON, Search, vectors, Bloom, TimeSeries
  • Build — caching.md cache-aside, invalidation, stampede, client-side caching · queues.md Streams, consumer groups, retries, delayed jobs · pubsub.md fan-out, sharded Pub/Sub, notifications · locks.md distributed locks and fencing · scripting.md atomicity, MULTI, Lua, Functions · testing.md test isolation and CI
  • Operate — memory-eviction.md maxmemory, eviction, big keys, fragmentation · persistence.md RDB, AOF, backups, restore drills · connections.md pooling, timeouts, buffers, TLS · security.md ACLs, exposure, command policy · cli.md the redis-cli forensics toolkit · managed-redis.md ElastiCache, MemoryDB, Redis Cloud, Upstash, Memorystore, Azure
  • **Scale
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • _meta.json
  • caching.md
  • cli.md
  • cluster.md
  • connections.md
  • data-types.md
  • high-availability.md
  • incidents.md
  • keys-ttl.md
  • locks.md
  • managed-redis.md
  • memory-eviction.md
  • memory-template.md
  • migrations.md
  • modules.md
  • patterns.md
  • performance.md
  • persistence.md
  • pubsub.md
  • queues.md
  • scripting.md
  • security.md
  • setup.md
  • testing.md

FAQ

Что делает скилл Redis?

Designs, tunes, and debugs Redis: data structures, memory limits, persistence, Streams and queues, locks, replication, and cluster. Use when writing Redis commands or Lua, choosing between a hash, a sorted set and a stream, setting expirations on cache keys, building a queue, distributed lock, rate limiter, leaderboard, session store or counter, or when Redis answers OOM, MISCONF, CROSSSLOT, MOVED, BUSY, LOADING or WRONGTYPE, latency spikes, memory keeps growing, keys vanish early or never expire, a replica lags or a failover loses writes, KEYS or a big DEL freezes the server, connections are refused, or a cluster reshard, a Valkey / ElastiCache / MemoryDB / Upstash move, or a persistence and backup plan is on the table. Covers redis-cli forensics, pipelining, eviction policies, keyspace notifications, ACLs and exposed-instance hardening, and the JSON, Search and TimeSeries modules. Not for store-agnostic cache hierarchy strategy (caching) or picking a rate-limit algorithm (rate-limiting).

Как установить скилл Redis?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Redis запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Redis с