redis

redis is a skill for Claude Code, Codex from Plazmodium/odin-workflow. It costs 19 tokens per session (1,028 once invoked), scanned A, original, MIT.

Guidance for using Redis, a fast in-memory data store that can hold temporary data, user sessions, queues, and real-time application data. It covers caching patterns and Redis data structures.

In plain words
What is it for?
Use it to cache database results, store login sessions, build queues, and support real-time features.
Why use it?
It helps applications retrieve frequently used data faster and manage short-lived information with expiration times. It also helps keep cached data consistent when records change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to cache database results, store login sessions, build queues, and support real-time features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/plazmodium/odin-workflow/redis
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Plazmodium/odin-workflow --skill redis
Clone the repo
git clone --depth 1 https://github.com/Plazmodium/odin-workflow

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for redis

README.md
[![agentmods](https://agentmods.dev/badge/skills/plazmodium/odin-workflow/redis/github.svg)](https://agentmods.dev/skills/plazmodium/odin-workflow/redis)
Your own site
<a href="https://agentmods.dev/skills/plazmodium/odin-workflow/redis"><img src="https://agentmods.dev/badge/skills/plazmodium/odin-workflow/redis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for redis

Your own site · 80×15
<a href="https://agentmods.dev/skills/plazmodium/odin-workflow/redis"><img src="https://agentmods.dev/badge/skills/plazmodium/odin-workflow/redis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,028 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.01028
Opus 5.5 $0.00008 $0.00411
Sonnet 5.5 $0.00004 $0.00206
Haiku 4.5 $0.00002 $0.00103

Measured 1mo ago against content hash d29f8a2ff930, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

redis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/skills/database/redis/SKILL.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Redis

Overview

Redis is an in-memory data structure store used as a cache, message broker, and database. This skill covers caching patterns, data structures, and common use cases.

Common Use Cases

Caching

// Cache-aside pattern (most common)
async function getUser(id: string): Promise<User> {
  const cacheKey = `user:${id}`;

  // 1. Check cache
  const cached = await redis.get(cacheKey);
  if (cached) return JSON.parse(cached);

  // 2. Cache miss → fetch from DB
  const user = await db.users.findById(id);
  if (!user) throw new NotFoundError();

  // 3. Populate cache with TTL
  await redis.set(cacheKey, JSON.stringify(user), 'EX', 3600); // 1 hour

  return user;
}

// Invalidate on mutation
async function updateUser(id: string, data: UpdateUserDto): Promise<User> {
  const user = await db.users.update(id, data);
  await redis.del(`user:${id}`); // Invalidate cache
  return user;
}

Sessions

// Store session data with TTL
await redis.set(`session:${sessionId}`, JSON.stringify({
  userId: user.id,
  role: user.role,
  loginAt: Date.now(),
}), 'EX', 86400); // 24 hours

// Retrieve
const session = JSON.parse(await redis.get(`session:${sessionId}`) || 'null');

Rate Limiting

// Sliding window rate limiter
async function checkRateLimit(ip: string, limit: number, windowSec: number): Promise<boolean> {
  const key = `ratelimit:${ip}`;
  const current = await redis.incr(key);

  if (current === 1) {
    await redis.expire(key, windowSec);
  }

  return current <= limit;
}

Pub/Sub

// Publisher
await redis.publish('notifications', JSON.stringify({
  userId: '123',
  type: 'new_message',
  payload: { from: 'Jane', text: 'Hello' },
}));

// Subscriber
const sub = redis.duplicate();
await sub.subscribe('notifications');
sub.on('message', (channel, message) => {
  const notification = JSON.parse(message);
  sendToWebSocket(notification.userId, notification);
});

Data Structures

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 141 lines · 19 tokens per session scan A d29f8a2ff930

Subscribe to this mod's changes

redis is a skill published in the GitHub repository Plazmodium/odin-workflow (0 stars, last pushed 4mo ago), licensed MIT. It adds 19 tokens to every session and 1,028 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.