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 patricio0312rev/skillset --skill caching-strategistgit clone --depth 1 https://github.com/patricio0312rev/skillsetWrote 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/patricio0312rev/skillset/caching-strategist)<a href="https://agentmods.dev/skills/patricio0312rev/skillset/caching-strategist"><img src="https://agentmods.dev/badge/skills/patricio0312rev/skillset/caching-strategist/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/patricio0312rev/skillset/caching-strategist"><img src="https://agentmods.dev/badge/skills/patricio0312rev/skillset/caching-strategist.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.00060 | $0.01226 |
| Opus 5.5 | $0.00024 | $0.00490 |
| Sonnet 5.5 | $0.00012 | $0.00245 |
| Haiku 4.5 | $0.00006 | $0.00123 |
Grade A, and why
caching-strategist 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 3mo 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.
This is a copy
100% identical to caching-strategist — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Caching Strategist
Design effective caching strategies for performance and consistency.
Cache Layers
CDN: Static assets, public pages (TTL: days/weeks) Application Cache (Redis): API responses, sessions (TTL: minutes/hours) Database Cache: Query results (TTL: seconds/minutes) Client Cache: Browser/app local cache
Cache Key Strategy
// Hierarchical key structure
const CACHE_KEYS = {
user: (id: string) => `user:${id}`,
userPosts: (userId: string, page: number) => `user:${userId}:posts:${page}`,
post: (id: string) => `post:${id}`,
postComments: (postId: string) => `post:${postId}:comments`,
};
// Include version in keys for easy invalidation
const CACHE_VERSION = "v1";
const key = `${CACHE_VERSION}:${CACHE_KEYS.user(userId)}`;
TTL Strategy
const TTL = {
// Frequently changing
REALTIME: 10, // 10 seconds
SHORT: 60, // 1 minute
// Moderate updates
MEDIUM: 300, // 5 minutes
STANDARD: 3600, // 1 hour
// Rarely changing
LONG: 86400, // 1 day
VERY_LONG: 604800, // 1 week
};
// Usage
await redis.setex(key, TTL.MEDIUM, JSON.stringify(data));
Cache-Aside Pattern
export const getCachedUser = async (userId: string): Promise<User> => {
const key = CACHE_KEYS.user(userId);
// Try cache first
const cached = await redis.get(key);
if (cached) {
return JSON.parse(cached);
}
// Cache miss - fetch from DB
const user = await db.users.findById(userId);
// Store in cache
await redis.setex(key, TTL.STANDARD, JSON.stringify(user));
return user;
};
Cache Invalidation
// Invalidate on update
export const updateUser = async (userId: string, data: UpdateUserDto) => {
const user = await db.users.update(userId, data);
// Invalidate cache
await redis.del(CACHE_KEYS.user(userId));
// Invalidate related caches
await redis.del(CACHE_KEYS.userPosts(userId, "*"));
return user;
};
// Tag-based invalidation
const addCacheTags = (key: string, tags: string[]) => {
tags.forEach((tag) => {
redis.sadd(`cache_tag:${tag}`, key);
});
};
const invalidateByTag = async (tag: string) => {
const keys = await redis.smembers(`cache_tag:${tag}`);
if (keys.length) {
await redis.del(...keys);
await redis.del(`cache_tag:${tag}`);
}
};
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.
- 3mo ago First seen · 191 lines · 60 tokens per session scan A 92257b8c9720
caching-strategist is a skill published in the GitHub repository patricio0312rev/skillset (7 stars, last pushed 10mo ago), licensed MIT. It adds 60 tokens to every session and 1,226 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to caching-strategist, differing in 0 lines, and is treated as a copy.
caching-strategist compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| caching-strategistpatricio0312rev/skillset | Skill | 7 | 10mo ago | MIT | A | 60 | Claude Code, Codex |
| using-redis-token-bucketsPostHog/posthog-foss | Skill | 734 | today | MIT | A | 148 | Claude Code, Codex |
| background-job-orchestratorcuriositech/some_claude_skills | Skill | 282 | 3d ago | MIT | A | 95 | Claude Code |
| using-redis-token-bucketsPostHog/posthog | Skill | 41k | today | none | A | 148 | Claude Code, Codex |
| spring-data-redisrrezartprebreza/spring-boot-skills | Skill | 371 | 14d ago | MIT | A | 37 | Claude Code, Codex |
| idempotency-handlingsecondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 46 | Claude Code |
| bullmqzhe-qi/clhoria-template | Skill | 193 | 3d ago | MIT | A | 45 | Claude Code |