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 hoangatg/ai-agent-toolkit --skill redis-cachinggit clone --depth 1 https://github.com/hoangatg/ai-agent-toolkitWrote 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/hoangatg/ai-agent-toolkit/redis-caching)<a href="https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/redis-caching"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/redis-caching/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/hoangatg/ai-agent-toolkit/redis-caching"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/redis-caching.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.00714 |
| Opus 5.5 | $0.00013 | $0.00286 |
| Sonnet 5.5 | $0.00006 | $0.00143 |
| Haiku 4.5 | $0.00003 | $0.00071 |
Grade A, and why
redis-caching 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.
How it starts
The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Redis Caching
The in-memory data structure store that makes everything faster.
1. Caching Strategies
| Strategy | How It Works | Use Case |
|---|---|---|
| Cache-Aside | App checks cache → miss → fetch DB → store cache | General purpose |
| Write-Through | Write to cache + DB simultaneously | Consistency critical |
| Write-Behind | Write to cache → async write to DB | High write throughput |
| Read-Through | Cache auto-fetches on miss | Transparent caching |
2. Data Structures
| Structure | Use Case |
|---|---|
| String | Simple key-value, counters |
| Hash | Object storage, user profiles |
| List | Queues, timelines, logs |
| Set | Unique collections, tags |
| Sorted Set | Leaderboards, rate limiting |
| Stream | Event sourcing, message queue |
| HyperLogLog | Cardinality estimation |
3. Key Design
| Principle | Example |
|---|---|
| Namespaced | user:1234:profile |
| Hierarchical | app:module:entity:id |
| Versioned | v2:user:1234:cache |
| TTL always | Every key should expire |
| Predictable | Same input → same key |
4. Common Patterns
Rate Limiting
| Algorithm | Method |
|---|---|
| Fixed window | INCR + EXPIRE |
| Sliding window | Sorted Set + timestamp |
| Token bucket | Script-based atomic |
Session Management
| Principle | Application |
|---|---|
| Store session data | Hash per session ID |
| TTL | Auto-expire inactive sessions |
| Secure ID | Cryptographically random |
| Minimal data | Only what's needed server-side |
Pub/Sub & Streams
| Feature | Pub/Sub | Streams |
|---|---|---|
| Persistence | ❌ Fire-and-forget | ✅ Persisted |
| Consumer groups | ❌ | ✅ |
| Replay | ❌ | ✅ |
| Best for | Notifications | Event processing |
5. Performance
| Technique | Impact |
|---|---|
| Pipelining | Batch multiple commands |
| Connection pooling | Reuse connections |
| Lua scripts | Atomic multi-step operations |
| Cluster | Horizontal scaling |
| Memory policy | allkeys-lru for cache nodes |
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.
- 1mo ago First seen · 104 lines · 32 tokens per session scan A 8d05dd368acf
redis-caching is a skill published in the GitHub repository hoangatg/ai-agent-toolkit (1 stars, last pushed 7mo ago), licensed MIT. It adds 32 tokens to every session and 714 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-03.
Other skills, from other repositories
database-migrations
Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Django, TypeORM, golang-migrate).
clickhouse-io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
redis-best-practices
Redis development best practices for caching, data structures, and high-performance key-value operations.
huawei-cloud-dds-dcs-instance-management
Huawei Cloud DDS (Document Database Service) and DCS (Distributed Cache Service) unified management skill. Provides 16 operations across five capability domains: (1) Query — list/get DDS/DCS instances, DCS node info, DCS custom templates; (2) Analysis — analyze DDS deployment architecture and DCS security posture; (3)…
azure-cache-redis
Expert knowledge for Azure Cache for Redis development including troubleshooting, best practices, decision making, architecture & design patterns, security, configuration, and deployment. Use when configuring geo-replication, persistence, VNet/private endpoints, Entra/RBAC auth, or ARM/Bicep deployments, and other…
azure-managed-redis
Expert knowledge for Azure Managed Redis development including troubleshooting, best practices, decision making, architecture & design patterns, security, configuration, integrations & coding patterns, and deployment. Use when using Redis tiers, clustering/sharding, Entra ID auth, geo-replication, or ARM/Bicep…