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 khalilbenaz/claude-skills-collection --skill redis-patternsgit clone --depth 1 https://github.com/khalilbenaz/claude-skills-collectionWrote 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/khalilbenaz/claude-skills-collection/redis-patterns)<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/redis-patterns"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/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/khalilbenaz/claude-skills-collection/redis-patterns"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/redis-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00056 | $0.01926 |
| Opus 5 | $0.00028 | $0.00963 |
| Sonnet 5 | $0.00011 | $0.00385 |
| Haiku 4.5 | $0.00006 | $0.00193 |
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 7d 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 — 220 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Redis Patterns
Workflow
1. Identifier le pattern adapté
| Besoin | Pattern | Structure de données |
|---|---|---|
| Cache lecture | Cache-aside / Write-through | String, Hash |
| Session utilisateur | Session store | Hash + TTL |
| Communication asynchrone | Pub/Sub | Channel |
| File d'attente durable | Streams | Stream |
| Compteur / Rate limiting | Incr atomique | String |
| Classement | Leaderboard | Sorted Set |
| Déduplication / ensemble | Membership | Set |
| Comptage unique approx. | HyperLogLog | HLL |
2. Concevoir le nommage des clés
Convention : {app}:{entité}:{id}:{sous-clé} — toujours en minuscules, séparateur :.
user:42:session # session utilisateur
product:sku:A123:stock # stock d'un produit
rate:api:ip:1.2.3.4 # compteur rate limit
stream:orders # stream de commandes
leaderboard:weekly # classement hebdo
Critères :
- Longueur < 64 chars (impact mémoire des clés)
- Jamais d'informations sensibles dans la clé elle-même
- Préfixe par environnement si Redis partagé :
prod:,staging:
3. Définir les TTL
# Cache applicatif : TTL court
SET product:sku:A123 '{"price":29.99}' EX 300
# Session : TTL glissant via EXPIRE à chaque accès
HSET user:42:session token abc123 role admin
EXPIRE user:42:session 3600
# Données de référence : TTL long ou absent (refresh manuel)
SET config:feature-flags '{"darkMode":true}' EX 86400
Politique d'éviction conseillée :
- Cache pur →
allkeys-lfu - Cache + données persistantes mixées →
volatile-lfu - Jamais d'éviction →
noeviction(monitoring mémoire obligatoire)
redis-cli CONFIG SET maxmemory-policy allkeys-lfu
redis-cli CONFIG SET maxmemory 2gb
4. Implémenter les patterns courants
Cache-aside (read-through manuel)
import redis, json
r = redis.Redis(host='localhost', port=6379, decode_responses=True)
def get_product(sku: str) -> dict:
key = f"product:sku:{sku}"
cached = r.get(key)
if cached:
return json.loads(cached) # cache hit
product = db.fetch_product(sku) # fallback DB
r.set(key, json.dumps(product), ex=300)
return product
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.
- 7d ago First seen · 220 lines · 56 tokens per session scan A 1ab51b179868
redis-patterns is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 16d ago), licensed MIT. It adds 56 tokens to every session and 1,926 once invoked, about $0.0003 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-03.
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…
spring-cache
Spring Cache abstraction for Spring Boot 3.x. Covers @Cacheable, @CacheEvict, @CachePut, cache managers (Caffeine, Redis, EhCache), TTL configuration, cache keys, conditional caching, and cache synchronization. USE WHEN: user mentions "spring cache", "@Cacheable", "@CacheEvict", "cache manager", "Caffeine cache"…
caching-strategies
Application caching patterns. Redis caching, in-memory caches, HTTP caching, cache invalidation strategies, cache-aside, write-through, and CDN caching. USE WHEN: user mentions "caching", "cache invalidation", "Redis cache", "HTTP cache", "CDN caching", "cache-aside", "write-through", "TTL", "stale-while-revalidate"…
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-caching-strategies
Application-level caching strategies, HTTP caching, cache invalidation, and stampede prevention.
api-performance-api-performance
Query optimization, caching, indexing, connection pooling, async patterns.