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.
npx skills add medy-gribkov/arcana --skill redis-patternsgit clone --depth 1 https://github.com/medy-gribkov/arcanaWrote 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.
[](https://agentmods.dev/skills/medy-gribkov/arcana/redis-patterns)<a href="https://agentmods.dev/skills/medy-gribkov/arcana/redis-patterns"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/redis-patterns/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.
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/redis-patterns"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/redis-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.03335 |
| Opus 5 | $0.00016 | $0.01667 |
| Sonnet 5 | $0.00006 | $0.00667 |
| Haiku 4.5 | $0.00003 | $0.00333 |
Grade A, and why
redis-patterns 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 466 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Redis Patterns
Production patterns for Redis covering caching, session management, rate limiting, distributed systems, and performance optimization.
Cache-Aside Pattern
BAD: No TTL, cache stampede vulnerability
// ioredis
import Redis from 'ioredis';
const redis = new Redis();
async function getUser(id: string) {
const cached = await redis.get(`user:${id}`);
if (cached) return JSON.parse(cached);
const user = await db.query('SELECT * FROM users WHERE id = $1', [id]);
await redis.set(`user:${id}`, JSON.stringify(user)); // No TTL!
return user;
}
GOOD: TTL + stampede protection with locking
async function getUser(id: string) {
const key = `user:${id}`;
const cached = await redis.get(key);
if (cached) return JSON.parse(cached);
// Acquire lock to prevent stampede
const lockKey = `lock:${key}`;
const acquired = await redis.set(lockKey, '1', 'NX', 'EX', 10);
if (!acquired) {
// Wait and retry if another process is loading
await new Promise(resolve => setTimeout(resolve, 100));
return getUser(id);
}
try {
const user = await db.query('SELECT * FROM users WHERE id = $1', [id]);
await redis.setex(key, 3600, JSON.stringify(user)); // 1 hour TTL
return user;
} finally {
await redis.del(lockKey);
}
}
Write-Through Cache
BAD: Cache and DB out of sync
// go-redis
import "github.com/redis/go-redis/v9"
func updateUser(ctx context.Context, rdb *redis.Client, user User) error {
data, _ := json.Marshal(user)
rdb.Set(ctx, fmt.Sprintf("user:%s", user.ID), data, 0)
return db.Exec("UPDATE users SET name = $1 WHERE id = $2", user.Name, user.ID)
// If DB fails, cache is dirty!
}
GOOD: Write DB first, then invalidate cache
func updateUser(ctx context.Context, rdb *redis.Client, user User) error {
// Write to DB first
if err := db.Exec("UPDATE users SET name = $1 WHERE id = $2", user.Name, user.ID); err != nil {
return err
}
// Invalidate cache, don't care if this fails
key := fmt.Sprintf("user:%s", user.ID)
rdb.Del(ctx, key)
return nil
}
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.
- 8d ago First seen · 466 lines · 32 tokens per session scan A dcf527ef4d30
redis-patterns is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 3,335 once invoked, about $0.0002 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-08-31.
Other skills, from other repositories
redis-cache-strategy
Redis caching strategy designer and reviewer. ALWAYS use when designing, reviewing, or troubleshooting Redis caching layers — cache pattern selection (cache-aside, write-through, write-behind), TTL strategy, cache stampede/penetration/avalanche prevention, hot key handling, cache-DB consistency, distributed locking…
api-caching-strategies
Application-level caching strategies, HTTP caching, cache invalidation, and stampede prevention.
api-database-redis
Redis in-memory data store patterns with ioredis and node-redis -- caching, sessions, rate limiting, pub/sub, streams, queues, transactions, cluster.
api-database-upstash
Upstash serverless Redis -- REST-based client, auto-serialization, pipelines, rate limiting, QStash, edge compatibility, global replication.
desktop-storage-electron
Persistent storage, SQLite databases, and credential management in Electron apps.
mobile-storage-sqlite-powersync
PowerSync offline-first sync engine on SQLite for React Native - schema definition, watched queries, CRUD operations, backend connectors, sync rules, conflict resolution, attachments.