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 agentmods add skills/arbazkhan971/godmode/cachenpx skills add arbazkhan971/godmode --skill cachegit clone --depth 1 https://github.com/arbazkhan971/godmodeWrote 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/arbazkhan971/godmode/cache)<a href="https://agentmods.dev/skills/arbazkhan971/godmode/cache"><img src="https://agentmods.dev/badge/skills/arbazkhan971/godmode/cache.svg" alt="Measured on agentmods" 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 | $0.00033 | $0.01975 |
| Opus 5 | $0.00016 | $0.00988 |
| Sonnet 5 | $0.00007 | $0.00395 |
| Haiku 4.5 | $0.00003 | $0.00198 |
Grade A, and why
cache scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s http://localhost:8080/cache/stats How it starts
The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cache -- Caching Strategy
Activate When
- User invokes
/godmode:cache - User says "add caching", "cache invalidation", "stale data", "cache consistency"
- User says "Redis setup", "Memcached config", "CDN configuration"
- User says "cache stampede", "thundering herd", "hot key"
- When
/godmode:perfidentifies slow queries or high latency
Workflow
Step 1: Cache Opportunity Assessment
CACHE ASSESSMENT:
Project: <name>
Current Caching: None | CDN only | App-level | Multi-layer
Performance Baseline: P50/P95 latency, Database QPS, Cache hit rate
HOT PATH ANALYSIS: Endpoint, QPS, Latency, Cacheable (Y/N), TTL
IMPACT ESTIMATE: Hit rate, latency reduction, DB load reduction
Step 2: Cache Layer Design
Multi-layer architecture: CDN/Edge -> Application (Redis/Memcached) -> DB Query Cache -> Source of Truth (Database).
Cache-Aside Pattern (Default):
- Read: check cache -> HIT: return | MISS: query DB, store in cache with TTL, return
- Write: write to DB, then delete cache key (not update). Next read repopulates.
- Use when: read-heavy (10:1+), brief staleness OK. Start here.
Step 3: Cache Invalidation Strategies
TTL-Based: TTL = max acceptable staleness. Static config: 24h. Product catalog: 10m. Search results: 1m. Real-time pricing: 10s. Always set a TTL.
Event-Based: On data change, publish event -> consumer deletes cache keys + purges CDN. Near-real-time, precise.
Write-Through: Write to cache AND DB synchronously. Always consistent. Higher write latency.
Write-Behind: Write to cache immediately, async flush to DB. Fast writes. Risk of data loss.
Default recommendation: Cache-aside + TTL + event-based invalidation.
Step 4: Redis Configuration
- Deployment: Standalone (dev), Sentinel (simple HA), Cluster (large/high throughput)
- Memory policy:
allkeys-lru(recommended). Setmaxmemory. - Connection pooling: pool_size 20, min_idle 5, connect_timeout 3s, command_timeout 1s
- Key naming:
{entity}:{id},{entity}:{id}:{field},{entity}:list:{filter} - All keys MUST have a TTL — use SETEX or SET with EX option
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.
- 3d ago First seen · 205 lines · 33 tokens per session scan A 2427691aba6c
cache is a skill published in the GitHub repository arbazkhan971/godmode (26 stars, last pushed 5d ago), licensed MIT. It adds 33 tokens to every session and 1,975 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
ena-database
Access European Nucleotide Archive via API/FTP. Retrieve DNA/RNA sequences, raw reads (FASTQ), genome assemblies by accession, for genomics and bioinformatics pipelines. Supports multiple formats.
ddia-systems
Design data systems by understanding storage engines, replication, partitioning, transactions, and consistency models. Use when the user mentions "database choice", "which database should I use", "SQL or NoSQL", "replication lag", "partitioning strategy", "consistency vs availability", "stream processing", "ACID…
055-design-parallel-change
Use when a database schema or data-meaning change needs Parallel Change, including expand, migrate, and contract sequencing for column renames, type or data reinterpretation, large-table backfills, relationship-table changes, enum/status transitions, timezone/default changes, and index or uniqueness changes. This…
managed-db-services
Configure DigitalOcean Managed MySQL, MongoDB, Valkey, Kafka, and OpenSearch for App Platform. Use when setting up non-PostgreSQL databases, configuring trusted sources, or troubleshooting database connectivity.
postgres
Configure DigitalOcean Managed Postgres with bindable variables or schema isolation. Use when setting up databases, creating users, managing permissions, configuring multi-tenant schemas, or troubleshooting database connectivity on App Platform.
mongo-migration
MongoDB schema migration safety reviewer and migration script generator. ALWAYS use when writing, reviewing, or planning MongoDB schema changes — field additions/removals, index builds, schema validator changes, document type migrations, shard key modifications, or any bulk update touching production collections.…