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 cached-system-instructionsgit 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/cached-system-instructions)<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/cached-system-instructions"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/cached-system-instructions/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/cached-system-instructions"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/cached-system-instructions.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.00020 | $0.01285 |
| Opus 5 | $0.00010 | $0.00642 |
| Sonnet 5 | $0.00004 | $0.00257 |
| Haiku 4.5 | $0.00002 | $0.00128 |
Grade A, and why
cached-system-instructions 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 today.
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 — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cached System Instructions (KV-Cache Prefix Architecture)
Overview
In Large Language Models, processing input tokens requires running dense matrix multiplications across the entire input sequence on every turn. In a 50-turn agent session with a 4,000-token system prompt, the provider re-processes the exact same 4,000 tokens 50 separate times ($200,000\text{ redundant token computations}$).
Prompt Caching (Anthropic Prompt Caching, OpenAI Automatic Prefix Caching, DeepSeek Context Caching) saves the transformer's Key-Value (KV) Activation States in GPU memory. Re-sending an identical prefix reuses the precomputed KV cache, cutting Time-to-First-Token (TTFT) latency by 80% and applying an automatic 90% cost discount.
The Hierarchical System Caching Protocol organizes instructions to guarantee uninterrupted prefix matching.
Uncached Re-computation vs. KV-Cache Hit
┌─────────────────────────────────────────────────────────────┐
│ KV-Cache Mechanics Comparison │
│ │
│ Uncached Execution (Every Turn): │
│ • Re-computes Attention Matrices for 4,000 System Tokens │
│ • TTFT Latency: 2.8 seconds │
│ • Full Input Rate: $3.00 / M tokens │
│ │
│ KV-Cache Hit (Unbroken Static Prefix): │
│ • Directly loads KV-tensors from GPU VRAM │
│ • TTFT Latency: 0.35 seconds (8x Faster!) │
│ • Cached Input Rate: $0.30 / M tokens (90% Cost Discount) │
└─────────────────────────────────────────────────────────────┘
The 4-Layer Caching Hierarchy
To prevent accidental cache invalidation, place instructions in order of decreasing stability:
┌───────────────────────────────────────────────────────────────────────────┐
│ LAYER 1: Base Agent Identity & Tool Schemas (100% Immutable) ──► CACHED │
│ LAYER 2: Repository Architecture Blueprint (Static for Session)──► CACHED │
│ LAYER 3: MCP Tool Definitions & Skill Instructions ──► CACHED │
│ ───────────────────────────────────────────────────────────────────────── │
│ LAYER 4: Dynamic User Requests & Shell Outputs (Dynamic Tail)──► UNCACHED │
└───────────────────────────────────────────────────────────────────────────┘
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.
- today Changed · -28 tokens per session 1cb2754b4d81
- 12d ago First seen · 123 lines · 48 tokens per session scan A e92a1cfe3288
cached-system-instructions is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 1,285 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
ai-wrapper-product-v2
AI Wrapper Product workflow skill. Use this skill when the user needs Expert in building products that wrap AI APIs (OpenAI, Anthropic, and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.
ai-engineering-toolkit
AI Engineering Toolkit workflow skill. Use this skill when the user needs 6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching and the operator…
zipai-optimizer
Skill "zipai-optimizer" from nickdesi/ZipAI, covering zipai: ultra-dense token optimizer, rules, 1. zero filler, 2. ambiguity and 3. prompt caching.
azure-ai-projects-py
Build AI applications using the Azure AI Projects Python SDK (azure-ai-projects). Use when working with Foundry project clients, creating versioned agents with PromptAgentDefinition, running evalua...
azure-ai-projects-ts
Build AI applications using Azure AI Projects SDK for JavaScript (@azure/ai-projects). Use when working with Foundry project clients, agents, connections, deployments, datasets, indexes, evaluation...
ai-product
Every product will be AI-powered. The question is whether you'll build it right or ship a demo that falls apart in production. This skill covers LLM integration patterns, RAG architecture, prompt ...