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

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.

agentmods
npx agentmods add skills/plazmodium/odin-workflow/redis
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00019 $0.01028
Opus 5 $0.00010 $0.00514
Sonnet 5 $0.00004 $0.00206
Haiku 4.5 $0.00002 $0.00103

Measured 3d ago against content hash d29f8a2ff930, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 3mo ago), licensed MIT. It adds 19 tokens to every session and 1,028 once invoked, about $0.0001 per session on Opus 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.

Related

Other skills, from other repositories

lore-onboard

First-time setup wizard for LoreConvo. Verifies the MCP server is connected, the database is accessible, hooks are configured, and runs a test save/load cycle. Use when the user says "set up loreconvo", "onboard", "/lore-onboard", "verify loreconvo", "test loreconvo setup", or after first installing the plugin.

labyrinth-analytics/loreconvo · 81 tokens

crestapps-core-postgresql

Skill for integrating PostgreSQL pgvector indexing data sources documents vector retrieval and memory in CrestApps.Core.

CrestApps/CrestApps.AgentSkills · 26 tokens

notion

Read, create, and update Notion pages and databases via the Notion REST API.

taracodlabs/aiden · 20 tokens

hmem-write

Hmem write protocol — picks prefix (L/E/D/P/N/R/I/H…), tree location, and tags, and detects duplicates before persisting. Use before any writememory or appendmemory call (skipping it creates duplicates and misplaced entries), or when the user says 'remember this', 'save this', 'log this', or invokes /hmem-write.

Bumblebiber/hmem · 77 tokens

hmem-config

View and change hmem memory settings, hooks, sync, and checkpoints. Use on /hmem-config, or when the user asks why context is huge, how to change auto-save, how often checkpoints fire, or how to set up sync.

Bumblebiber/hmem · 54 tokens

hmem-read

Load long-term memory from hmem via readmemory or loadproject. Use when starting fresh with no L1 summaries, after /compact, when the user asks 'what do you remember', 'continue where we left off', 'was war der letzte Stand', or about a project/topic visible in L1 summaries. Covers search, prefix filter, findrelated…

Bumblebiber/hmem · 85 tokens