Skip to content
Back to skills

Redis

ASecurity

Redis and Valkey — data structures for the job (strings, hashes, sorted sets, streams), TTLs and eviction policies, persistence modes, atomicity with Lua/transactions, distributed locks caveats, rate limiting, queues, memory sizing, cluster mode. Use for caching, rate limiting, queues or ephemeral state in Redis (Redis, Valkey, cache, rate limit, lock, streams).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgo

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --skill redis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Redis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Redis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectora-os-redis/badge)](https://www.skillsdirectory.com/skills/vectora-os-redis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: redis
description: Redis and Valkey — data structures for the job (strings, hashes, sorted sets, streams), TTLs and eviction policies, persistence modes, atomicity with Lua/transactions, distributed locks caveats, rate limiting, queues, memory sizing, cluster mode. Use for caching, rate limiting, queues or ephemeral state in Redis (Redis, Valkey, cache, rate limit, lock, streams).
metadata:
  category: data
---

# Redis

## Purpose

Use Redis for fast ephemeral state without treating it as a source of truth.

**Use when:** caches, counters, rate limits, queues.

**Not for:** durable primary storage.

## Inputs

- Use case, data volume, durability needs.

## Outputs

- Key design, TTL/eviction policy, memory estimate.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "redis"` for prior decisions, patterns and anti-patterns.

## Steps

1. **Structure.** Choose the data structure fitting the operation.
   Done when operations are O(1)/O(log n).
2. **Keys.** Namespaced keys with tenant; TTL on everything ephemeral.
   Done when no keys without TTL unless justified.
3. **Atomicity.** Use Lua or MULTI for multi-step updates.
   Done when races are impossible.
4. **Capacity.** Estimate memory; set `maxmemory-policy`.
   Done when eviction behaviour is defined.

## Best practices

- Sliding-window rate limits with sorted sets or GCRA.
- Avoid `KEYS` in production; use `SCAN`.

## Common mistakes

- Using Redlock as a correctness guarantee.
- Huge keys blocking the server.

## Example

Per-account password reset limit: `INCR` with `EXPIRE` in Lua; key `rl:reset:{tenant}:{account}`.

## Reusable prompt

```text
Apply the Redis skill (.agents/skills/redis/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Design keys, structures, TTLs, atomic operations and memory/eviction policy for the use case.
Return: Key design, TTL/eviction policy, memory estimate..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.