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 saajunaid/caddis-plugin --skill caching-patternsgit clone --depth 1 https://github.com/saajunaid/caddis-pluginWrote 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/saajunaid/caddis-plugin/caching-patterns)<a href="https://agentmods.dev/skills/saajunaid/caddis-plugin/caching-patterns"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/caching-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/saajunaid/caddis-plugin/caching-patterns"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/caching-patterns.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.00014 | $0.03516 |
| Opus 5.5 | $0.00006 | $0.01406 |
| Sonnet 5.5 | $0.00003 | $0.00703 |
| Haiku 4.5 | $0.00001 | $0.00352 |
Grade A, and why
caching-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 2mo 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 — 386 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Caching Patterns
Project Context — Read
project-config.mdin the repo root for brand tokens, shared-library paths, and deployment targets.
When to Use
Invoke this skill when:
- Adding caching to Streamlit data fetches
- Caching database connections or ML models
- Implementing multi-user caching for dashboards
- Setting up Redis caching for FastAPI
- Deciding cache TTL values for application data
- Debugging stale data issues
- Optimizing page load performance
Steps
Step 1: Choose the Right Caching Strategy
| Scenario | Strategy | Decorator/Tool |
|---|---|---|
| SQL query results (DataFrames) | Data cache with TTL | @st.cache_data(ttl=...) |
| DB connections, adapters | Resource cache (singleton) | @st.cache_resource |
| ML models, LLM clients | Resource cache (singleton) | @st.cache_resource |
| Multi-user shared data | Cached repository pattern | Custom get_repo() |
| FastAPI endpoint responses | Redis or in-memory | redis / cachetools |
| Static config, lookups | Long TTL or no TTL | @st.cache_data |
Step 2: Implement Streamlit Caching
Data Caching (returns serialized copy per caller)
from datetime import timedelta
import streamlit as st
import pandas as pd
@st.cache_data(ttl=timedelta(minutes=15), show_spinner="Loading records...")
def load_records() -> pd.DataFrame:
"""Cached data fetch -- each caller gets an independent copy."""
from libs.data import DatabaseAdapter
adapter = DatabaseAdapter()
return adapter.fetch_dataframe(
"SELECT * FROM AppRecords WHERE [Created Date Time] >= DATEADD(day, -7, GETDATE())"
)
Resource Caching (shared singleton)
@st.cache_resource
def get_database_adapter():
"""Singleton resource -- shared across all users."""
from libs.data import DatabaseAdapter
return DatabaseAdapter()
@st.cache_resource
def load_ml_model():
"""Load and cache ML model."""
import joblib
return joblib.load("models/classifier.joblib")
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.
- 2mo ago First seen · 386 lines · 14 tokens per session scan A c8847d49d9f3
caching-patterns is a skill published in the GitHub repository saajunaid/caddis-plugin (0 stars, last pushed 3d ago), licensed MIT. It adds 14 tokens to every session and 3,516 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.
caching-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| caching-patternssaajunaid/caddis-plugin | Skill | 0 | 3d ago | MIT | A | 14 | Claude Code, Codex |
| agent-raft-managerruvnet/ruflo | Skill | 83k | today | MIT | A | 18 | Claude Code |
| moai-ref-api-patternsmodu-ai/moai-adk | Skill | 1.3k | today | Apache-2.0 | A | 85 | Claude Code |
| continuum-tools-mcpshyftlabs/continuum | Skill | 86 | 3d ago | Apache-2.0 | A | 94 | Claude Code |
| goga-define-challengeqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 6 | Claude Code, Codex |
| goga-define-goalsqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 6 | Claude Code, Codex |
| skill-creatoreigent-ai/eigent | Skill | 16k | yesterday | Apache-2.0 | A | 35 | Claude Code, Codex |