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 alivirgo/Major-AI-Skills --skill deduplicated-file-cachinggit clone --depth 1 https://github.com/alivirgo/Major-AI-SkillsWrote 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/alivirgo/major-ai-skills/deduplicated-file-caching)<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/deduplicated-file-caching"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/deduplicated-file-caching/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/alivirgo/major-ai-skills/deduplicated-file-caching"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/deduplicated-file-caching.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.00025 | $0.01276 |
| Opus 5.5 | $0.00010 | $0.00510 |
| Sonnet 5.5 | $0.00005 | $0.00255 |
| Haiku 4.5 | $0.00003 | $0.00128 |
Grade A, and why
deduplicated-file-caching 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 1mo 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 — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.
In-Memory File Ingestion Deduplication (mtime Cache Guard)
Overview
During multi-step debugging and refactoring sessions, AI agents frequently call view_file on the exact same file path 3 to 5 times (e.g., re-reading src/routes.ts at Turn 2, Turn 7, and Turn 14 without any intervening edits on disk).
Each redundant file read re-injects hundreds or thousands of identical tokens into the transcript. In a 20-turn session, redundant file reads account for up to 40% of total input token waste.
The File Ingestion Deduplication Protocol tracks file path access, modification timestamps (mtime), and SHA-256 hashes in the agent runtime - intercepting duplicate read requests and returning a lightweight reference token if the file is already resident in active context and has not changed on disk.
Redundant Re-Reading vs. In-Memory Deduplication
┌─────────────────────────────────────────────────────────────┐
│ File Read Deduplication Flow │
│ │
│ Uncached Redundant Reads (Anti-Pattern): │
│ • Turn 2: `view_file("src/config.ts")` (1,200 tokens) │
│ • Turn 7: `view_file("src/config.ts")` (1,200 tokens) │
│ • Turn 12: `view_file("src/config.ts")` (1,200 tokens) │
│ ↳ 3,600 tokens billed for the exact same file content! │
│ │
│ Deduplication Cache Guard: │
│ • Turn 2: `view_file("src/config.ts")` $\rightarrow$ Ingests (1,200)│
│ • Turn 7: `view_file("src/config.ts")` $\rightarrow$ Intercepted! │
│ ↳ Return: `[CACHE HIT: src/config.ts unchanged (Turn 2)]`│
│ ↳ 12 tokens billed, 99% savings on subsequent reads! │
└─────────────────────────────────────────────────────────────┘
The Deduplication State Machine
┌───────────────────────────────────────────────────────────────────────────┐
│ 1. INSPECT REQUEST: Agent calls `view_file(path)` │
│ 2. CHECK RUNTIME CACHE: Is `path` in active context session? │
│ • NO $\rightarrow$ Read from disk $\rightarrow$ Record `mtime` & `hash` $\rightarrow$ Ingest │
│ • YES $\rightarrow$ Check disk `mtime`: │
│ • Unchanged $\rightarrow$ Intercept & return 1-line Cache Reference │
│ • Changed on disk $\rightarrow$ Ingest updated content $\rightarrow$ Update hash │
└───────────────────────────────────────────────────────────────────────────┘
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.
- 1mo ago Changed · -15 tokens per session e450ac20e19c
- 2mo ago First seen · 116 lines · 40 tokens per session scan A de49a5645b7c
deduplicated-file-caching is a skill published in the GitHub repository alivirgo/Major-AI-Skills (2 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 1,276 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-05.
deduplicated-file-caching compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| deduplicated-file-cachingalivirgo/Major-AI-Skills | Skill | 2 | yesterday | MIT | A | 25 | Claude Code |
| agenttrace-session-auditsickn33/agentic-awesome-skills | Skill | 49k | yesterday | MIT | A | 34 | Claude Code |
| error-experience-libraryhashgraph-online/awesome-codex-plugins | Skill | 1.5k | today | Apache-2.0 | A | 46 | Codex |
| azure-network-watcherMicrosoftDocs/Agent-Skills | Skill | 808 | today | CC-BY-4.0 | A | 110 | Claude Code |
| esp32-expertjohnkozaris/jko-claude-plugins | Skill | 11 | 2d ago | MIT | A | 137 | Claude Code |
| agent-memory-mcp-v2diegosouzapw/awesome-omni-skills | Skill | 171 | 4mo ago | MIT | A | 62 | Claude Code, Codex |
| codebase-insightirfad7/claude-power-skills | Skill | 4 | 3mo ago | MIT | A | 98 | Claude Code |