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 marcusgoll/Spec-Flow --skill caching-strategygit clone --depth 1 https://github.com/marcusgoll/Spec-FlowWrote 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/marcusgoll/spec-flow/caching-strategy)<a href="https://agentmods.dev/skills/marcusgoll/spec-flow/caching-strategy"><img src="https://agentmods.dev/badge/skills/marcusgoll/spec-flow/caching-strategy/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/marcusgoll/spec-flow/caching-strategy"><img src="https://agentmods.dev/badge/skills/marcusgoll/spec-flow/caching-strategy.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.00074 | $0.07576 |
| Opus 5.5 | $0.00030 | $0.03030 |
| Sonnet 5.5 | $0.00015 | $0.01515 |
| Haiku 4.5 | $0.00007 | $0.00758 |
Grade A, and why
caching-strategy 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.
How it starts
The opening of the file, as written. The whole thing — 1,060 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repeated work wastes time and resources:
- Reading docs/project/api-strategy.md 5 times in /plan phase (5× file I/O)
- Searching codebase for "user" pattern 3 times (3× grep execution)
- Fetching npm package info for same package repeatedly (3× network calls)
- Counting tokens in spec.md every phase (5× token calculation)
- Web searching "React hooks best practices" multiple times (3× API calls)
This skill implements smart caching with:
- File read cache: Cache file contents until file modified (mtime check)
- Search result cache: Cache grep/glob results for 30 minutes
- Network request cache: Cache npm/web API calls for 15-60 minutes
- Computed value cache: Cache expensive calculations until inputs change
- Automatic invalidation: TTL expiration + file modification detection
The result: 20-40% faster workflow execution with zero behavior changes (transparent caching).
<quick_start> <cacheable_operations> High-value caching targets (biggest time savings):
-
Project documentation reads (15min TTL):
docs/project/api-strategy.mddocs/project/system-architecture.mddocs/project/tech-stack.md- Read once per phase, not 5× per phase
-
Codebase searches (30min TTL):
- Grep:
"user"in**/*.ts→ Cache results - Glob:
**/components/**/*.tsx→ Cache file list - Repeated in anti-duplication, implementation, review
- Grep:
-
Package registry queries (60min TTL):
- npm info for package versions
- Dependency metadata
- Rarely changes during single workflow
-
Web searches (15min TTL):
- Documentation lookups
- Error message searches
- Best practice research
-
Token counts (until file modified):
- spec.md token count
- plan.md token count
- Recompute only when file changes </cacheable_operations>
<basic_workflow> Before caching:
Phase 1 (/plan):
- Read api-strategy.md (250ms)
- Read tech-stack.md (200ms)
- Read api-strategy.md again (250ms) ← Redundant
- Grep "user" in codebase (3s)
Total: 3.7s
After caching:
Phase 1 (/plan):
- Read api-strategy.md (250ms) → Cache
- Read tech-stack.md (200ms) → Cache
- Read api-strategy.md (from cache: 5ms) ← Cached!
- Grep "user" (3s) → Cache
Total: 3.45s saved 250ms (6.7%)
Across multiple phases:
/plan: Read api-strategy.md (250ms) → Cache
/tasks: Read api-strategy.md (from cache: 5ms) ← Saved 245ms
/impl: Read api-strategy.md (from cache: 5ms) ← Saved 245ms
/opt: Read api-strategy.md (from cache: 5ms) ← Saved 245ms
Total saved: 735ms on single file across 4 phases
</basic_workflow>
<immediate_value> Typical /feature workflow (7 phases):
Without caching:
Phase reads:
- api-strategy.md: 7 reads × 250ms = 1.75s
- tech-stack.md: 5 reads × 200ms = 1s
- spec.md: 10 reads × 150ms = 1.5s
- Grep "user": 3 searches × 3s = 9s
- npm info react: 2 calls × 500ms = 1s
Total redundant work: 14.25s
With caching:
Phase reads:
- api-strategy.md: 1 read (250ms) + 6 cache hits (30ms) = 280ms
- tech-stack.md: 1 read (200ms) + 4 cache hits (20ms) = 220ms
- spec.md: 1 read (150ms) + 9 cache hits (45ms) = 195ms
- Grep "user": 1 search (3s) + 2 cache hits (10ms) = 3.01s
- npm info react: 1 call (500ms) + 1 cache hit (5ms) = 505ms
Total with caching: 4.21s
Time saved: 14.25s - 4.21s = 10.04s (70% reduction)
Savings scale with workflow length:
- Single phase: 5-10% faster
- Full /feature (7 phases): 20-30% faster
- /epic (20+ phases): 30-40% faster </immediate_value> </quick_start>
Identify operations that are:
- Idempotent: Same input → Same output
- Expensive: Takes >100ms
- Repeated: Called 2+ times
- Predictable: Output doesn't change rapidly
Cacheable:
- File reads (same file, unchanged content)
- Codebase searches (same pattern, unchanged code)
- API calls (package info, docs, rarely changes)
- Expensive computations (token counts, parsing)
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 1,060 lines · 74 tokens per session scan A ac90da460b1d
caching-strategy is a skill published in the GitHub repository marcusgoll/Spec-Flow (97 stars, last pushed 2mo ago), licensed MIT. It adds 74 tokens to every session and 7,576 once invoked, about $0.0003 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-08-30.
caching-strategy compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| caching-strategymarcusgoll/Spec-Flow | Skill | 97 | 2mo ago | MIT | A | 74 | Claude Code |
| llm-evaluationsickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 25 | Claude Code |
| agent-harness-fault-injectionsickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 34 | Claude Code |
| apify-youtube-transcript-scrapersickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 48 | Claude Code |
| ariasickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 18 | Claude Code |
| apify-competitor-intelligencesickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 39 | Claude Code |
| mcp-tool-developersickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 38 | Claude Code |