valkey
Valkey (Redis-compatible) in-memory data store for caching, session storage, pub/sub, queues, and distributed locks. Use when configuring Valkey or Redis-compatible caching, choosing eviction policies, implementing rate limiting, setting up pub/sub or streams, writing Docker Compose services, migrating from Redis, or tuning performance. Use for valkey, redis, cache, session, pub/sub, streams, distributed-lock, rate-limit, sorted-set.
What this skill does
# Valkey
Open-source, Redis-compatible in-memory data store maintained by the Linux Foundation. Forked from Redis OSS 7.2.4 (BSD 3-Clause license). Drop-in replacement for Redis OSS 2.x through 7.2.x — same protocol, commands, and data formats.
**When to use**: Caching, session storage, rate limiting, pub/sub messaging, task queues, leaderboards, distributed locks, real-time counters, or any workload requiring sub-millisecond key-value operations.
**When NOT to use**: Primary relational data store, large object storage (>512 MB values), workloads requiring strong ACID transactions across multiple keys without Lua scripting.
## Quick Reference
| Task | Approach | Key Point |
| ------------------ | -------------------------------------------------------- | --------------------------------------- |
| Cache-aside | `GET` -> miss -> DB read -> `SET key val EX ttl` | Always set a TTL, even a long one |
| Session storage | `HSET session:{id} field val` + `EXPIRE` | Sliding TTL on each request |
| Rate limiting | `INCR` + `EXPIRE` (fixed window) or sorted set (sliding) | Sorted set for precision |
| Distributed lock | `SET lock:{res} token NX PX 30000` | Always set expiry to prevent deadlocks |
| Queue (simple) | `LPUSH` + `BRPOP` | Blocking pop with timeout |
| Queue (reliable) | Streams + `XGROUP` + `XACK` | Consumer groups for at-least-once |
| Pub/Sub | `SUBSCRIBE` / `PUBLISH` | Fire-and-forget, no persistence |
| Streams | `XADD` + `XREADGROUP` | Persistent, replayable, consumer groups |
| Leaderboard | Sorted set: `ZADD` / `ZREVRANGE` | O(log N) rank operations |
| Unique count | `PFADD` + `PFCOUNT` (HyperLogLog) | ~12 KB memory, 0.81% error |
| Eviction policy | `maxmemory-policy allkeys-lru` | Best default for most workloads |
| Docker setup | `valkey/valkey:8.1-alpine` | Health check: `valkey-cli ping` |
| Persistence | AOF (`appendonly yes`) + RDB snapshots | AOF for durability, RDB for backups |
| Client library | `ioredis` or `iovalkey` (official fork) | All Redis clients work unchanged |
| Migrate from Redis | Swap binary, keep data files | RDB/AOF compatible through Redis 7.2 |
## Common Mistakes
| Mistake | Correct Pattern |
| -------------------------------------- | ------------------------------------------------ |
| Using `KEYS *` in production | Use `SCAN` with cursor for iteration |
| No TTL on cache keys | Always set TTL — unbounded growth causes OOM |
| `DEL` on large keys blocking server | Use `UNLINK` for async deletion |
| Pub/Sub for durable messaging | Use Streams with consumer groups for persistence |
| Same TTL on all keys (thundering herd) | Add jitter: `EX (base + random(0, spread))` |
| No `maxmemory` set in production | Set `maxmemory` + eviction policy explicitly |
| Using `MULTI/EXEC` for locking | Use `SET ... NX PX` for distributed locks |
| Storing large blobs (>1 MB values) | Store references; keep values small |
| No health check in Docker Compose | Add `valkey-cli ping` health check |
| Ignoring `requirepass` in production | Always set authentication + ACLs |
## Delegation
- **Discover caching patterns and data model review**: Use `Explore` agent
- **Plan migration strategy from Redis to Valkey**: Use `Plan` agent
- **Implement full caching layer with tests**: Use `Task` agent
> If the `docker` skill is available, delegate Compose networking and multi-stage build patterns to it.
> If the `performance-optimizer` skill is available, delegate application-level caching strategy to it.
> If the `database-security` skill is available, delegate ACL and TLS configuration review to it.
## References
- [Data structures and commands](references/data-structures.md) -- Strings, hashes, lists, sets, sorted sets, streams, HyperLogLog, bitmaps, geospatial
- [Caching patterns](references/caching-patterns.md) -- Cache-aside, write-through, TTL strategies, eviction policies, client-side caching, invalidation
- [Common patterns](references/common-patterns.md) -- Rate limiting, distributed locks, queues, session storage, pub/sub, streams, leaderboards
- [Docker and deployment](references/docker-and-deployment.md) -- Compose setup, persistence, replication, Sentinel, Cluster, security, migration from Redis
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.