Skip to content
Agentmart
Submit a tool

redis

Use when interacting with Redis — caching strategies, pub/sub, rate limiting, session storage, queue management, and debugging key expiration.

Skill by fworks-tech

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/fworks-tech-redis

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when interacting with Redis — caching strategies, pub/sub, rate limiting, session storage, queue management, and debugging key expiration. Use ONLY when the task involves Redis specifically, not general caching.

Use cases: productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/redis

What's inside

Skill name
redis
Description
Use when interacting with Redis — caching strategies, pub/sub, rate limiting, session storage, queue management, and debugging key expiration. Use ONLY when the task involves Redis specifically, not general caching.
License
MIT
Instructions
80 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Redis

## Overview

Redis is the Society's caching and real-time specialist. It handles caching strategies, pub/sub messaging, rate limiting, session storage, and queue management using Redis data structures. Redis follows the principle that cache invalidation is hard, so design for expiration from the start.

## When to Use

- When implementing caching layers (read-through, write-through, write-behind)
- When setting up rate limiting (sliding window, token bucket)
- When building real-time features with pub/sub
- When managing session storage
- When implementing job queues with Redis Lists or Streams
- When debugging key expiration or memory issues

## Process

### Caching Strategy

1. Define cache key namespace: `service:entity:id:field`
2. Set TTL based on data volatility (short for fast-changing, long for static)
3. Use `SET key value EX ttl` for simple caching
4. Use hash for object caching: `HSET key field value`
5. Implement cache-aside: check cache first, fall back to DB, populate cache
6. Handle cache stampede: use `SET NX EX` for lock-based refresh

### Rate Limiting

1. Sliding window: use `ZRANGEBYSCORE` with timestamps
2. Token bucket: use `INCR` with `EXPIRE`
3. Fixed window: use `INCR` with `EXPIRE` (simplest, least accurate)
4. Store rate limit key with TTL matching window size
5. Return `429 Too Many Requests` when limit exceeded

### Pub/Sub

1. Use `SUBSCRIBE channel` for consumers
2. Use `PUBLISH channel message` for producers
3. Messages are fire-and-forget — no persistence
4. For persistent messaging, use Redis Streams instead
5. Use pattern subscribe for topic routing: `PSUBSCRIBE pattern`

### Debugging

1. Check key existence: `EXISTS key`
2. Check TTL: `TTL key`
3. Inspect type: `TYPE key`
4. Scan for keys: `SCAN 0 MATCH pattern COUNT 100`
5. Check memory: `INFO memory`
6. Check slow log: `SLOWLOG GET 10`

## Red Flags

- Using `KEYS *` in production (blocks all clients)
- Storing large objects (>100KB) in Redis
- No TTL on cache keys (memory leak)
- Using Redis as primary database without persistence strategy
- Hardcoded Redis URLs without connection pooling

## Rationalizations

| What you think | What Redis knows |
|----------------|-----------------|
| "I'll use KEYS to find my keys" | KEYS blocks the entire server. Use SCAN. Always. |
| "No TTL is fine, I'll clean up later" | Later means never. Every key without TTL is a memory leak. |
| "Redis is just a cache" | Redis is a data structure server. Use Lists, Sets, Sorted Sets, and Streams. |
| "My data is small enough" | It's small today. Redis stores everything in memory. Plan for growth. |

## Verification

Before confirming the change is done:

- [ ] All cache keys have explicit TTLs
- [ ] No `KEYS *` in application code (use `SCAN`)
- [ ] Rate limiting uses atomic operations (INCR/ZADD, not GET+SET)
- [ ] Pub/sub messages are idempotent (fire-and-forget guarantee)
- [ ] Connection pooling is configured
- [ ] Memory usage is monitored: `INFO memory`

From fworks-tech/agenthood, MIT.

More from fworks-tech/agenthood

Signals

Stars
3
Forks
0
Open issues
95
Last commit (this folder)
Sep 5, 2026 (1 month ago)
Last release
Oct 8, 2026 (20 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from fworks-tech

Cite this page

redis skill. Agent Mart. https://agentmart.dev/skills/fworks-tech-redis (last updated 2026-10-24)