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/kraitdev/skill.md/caching-strategiesnpx skills add KraitDev/skiLL.Md --skill caching-strategiesgit clone --depth 1 https://github.com/KraitDev/skiLL.MdWhat 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.00015 | $0.01898 |
| Opus 5 | $0.00008 | $0.00949 |
| Sonnet 5 | $0.00003 | $0.00380 |
| Haiku 4.5 | $0.00002 | $0.00190 |
Grade A, and why
caching-strategies 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.
How it starts
The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Caching Strategies
Purpose
Databases are slow; caches are fast. This skill teaches teams to strategically cache frequently accessed data in fast storage (Redis, Memcached) to intercept requests before they hit the database, dramatically reducing latency and database load. Caching is NOT a substitute for proper database optimization.
When to use
- System is experiencing high latency on read-heavy API endpoints
- Database CPU/Memory usage is constantly peaking due to repeated queries
- Designing a new system expecting massive read throughput
- Content rarely changes but reads happen constantly
When NOT to use
- Before optimizing database queries (optimize first, cache second)
- For data that changes frequently or is highly personalized
- When consistency is more important than performance
- As a quick fix for poor application architecture
Inputs required
- Slow query logs or endpoint metrics
- Cache infrastructure (Redis, Memcached)
- Read/write patterns of the data
- Acceptable staleness window (TTL)
Workflow
- Identify Bottlenecks: Profile APIs to find read-heavy, slow-changing data (user profiles, static config, product catalogs)
- Measure Access Patterns: How often is data read vs. written? How large? How old can it be?
- Select Strategy:
- Cache-Aside: App checks cache; on miss, fetches DB, writes cache
- Write-Through: App writes to cache and DB simultaneously
- Write-Behind: App writes to cache only; batch updates to DB later (use cautiously)
- Set Eviction Policy: Assign Time-To-Live (TTL) values based on business tolerance for stale data
- Handle Invalidation: Implement cache invalidation logic on mutations (UPDATE/DELETE)
- Prevent Stampedes: Implement caching locks or staggered TTLs to prevent multiple clients fetching from DB simultaneously when a key expires
- Add Monitoring: Track cache hit rates, eviction rates, and staleness
Rules
- MUST treat cache as ephemeral (can disappear at any time)
- MUST NOT cache highly personalized or sensitive data (PII) in shared caches
- MUST ALWAYS implement fallback to primary data store on cache failure
- MUST set TTL values (no infinite cache)
- MUST invalidate cache on mutations (UPDATE, DELETE operations)
- MUST use separate caches for different data types/sensitivity levels
- MUST NOT use cache as source of truth
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 · 201 lines · 15 tokens per session scan A a4e433ceaed1
caching-strategies is a skill published in the GitHub repository KraitDev/skiLL.Md (7 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 1,898 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-08-31.
Other skills, from other repositories
sql-query-optimization
Diagnoses and optimises slow SQL queries using EXPLAIN ANALYZE. Covers identifying bottlenecks (sequential scans, bad estimates, heap fetches), index strategy, query rewrites, and verification. Invoked when the user asks to optimize a query, fix a slow database query, or improve database performance.
cache_patterns
Instruction set for enabling and operating the Spring Cache abstraction in Spring Boot when implementing application-level caching for performance-sensitive workloads.
cache_patterns
Instruction set for enabling and operating the Spring Cache abstraction in Spring Boot when implementing application-level caching for performance-sensitive workloads.
jira-operations
JIRA cache and performance operations. TRIGGERS: 'warm the cache', 'warm cache', 'cache status', 'clear cache', 'cache warm', 'cache for project', 'discover project', 'project discovery', 'cache hit rate', 'optimize performance', 'rate limit'. Use for JIRA API performance optimization and project context discovery.…
nosql-database-design
Designs a NoSQL data model by leading with access pattern analysis. Covers DynamoDB single-table design (PK/SK/GSI) and MongoDB embedding vs referencing, consistency models, and capacity planning. Invoked when the user asks to design a DynamoDB schema, MongoDB data model, or NoSQL data model.
relational-database-design
Designs or reviews a relational database schema for a given domain. Covers table structure, normalization, indexes, constraints, and migration strategy. Invoked when the user asks to design a schema, review a database structure, or optimize a data model.