prompt-caching

prompt-caching is a skill for Claude Code, Codex from IgorWarzocha/howaboua-pi-stuff. It costs 22 tokens per session (681 once invoked), scanned A, original, MIT.

A guide for designing and checking prompt caching in an agent system. Prompt caching reuses an unchanged beginning of a model request so later requests can avoid processing it again.

In plain words
What is it for?
Use it when designing, measuring, tracing, or debugging cache behavior across repeated model requests and session events.
Why use it?
It helps distinguish real provider cache hits from related mechanisms such as conversation continuation, connection prewarming, or cache predictions. It also helps define whether caching actually reduces cost or response time.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing, measuring, tracing, or debugging cache behavior across repeated model requests and session events.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/igorwarzocha/howaboua-pi-stuff/prompt-caching
Install

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.

Any agent
npx skills add IgorWarzocha/howaboua-pi-stuff --skill prompt-caching
Clone the repo
git clone --depth 1 https://github.com/IgorWarzocha/howaboua-pi-stuff

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for prompt-caching

README.md
[![agentmods](https://agentmods.dev/badge/skills/igorwarzocha/howaboua-pi-stuff/prompt-caching/github.svg)](https://agentmods.dev/skills/igorwarzocha/howaboua-pi-stuff/prompt-caching)
Your own site
<a href="https://agentmods.dev/skills/igorwarzocha/howaboua-pi-stuff/prompt-caching"><img src="https://agentmods.dev/badge/skills/igorwarzocha/howaboua-pi-stuff/prompt-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.

agentmods 80×15 button for prompt-caching

Your own site · 80×15
<a href="https://agentmods.dev/skills/igorwarzocha/howaboua-pi-stuff/prompt-caching"><img src="https://agentmods.dev/badge/skills/igorwarzocha/howaboua-pi-stuff/prompt-caching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 681 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00681
Opus 5.5 $0.00009 $0.00272
Sonnet 5.5 $0.00004 $0.00136
Haiku 4.5 $0.00002 $0.00068

Measured 1mo ago against content hash d80a3a03f652, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prompt-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.

packages/pi-skill-harness-and-agent-engineering/skills/prompt-caching/SKILL.md · 27 lines

How it starts

The opening of the file, as written. The whole thing — 27 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use provider-reported cache reads and writes as evidence. Continuation IDs, prewarm readiness, predictions, keys, and latency do not prove a hit. Verify the active endpoint and usage mapping rather than assuming public-API parity.

Design for a small, stable static prefix before adding capabilities. Prefer code-mode or deferred tool discovery over loading every schema upfront. Keep available capabilities discoverable while revealing their current arguments on demand. Supply tool-specific instructions through supported mid-session system or developer messages, help, or tool results instead of rewriting the prefix. Do not preload instructions merely because a tool may become relevant later.

Locate the first unexplained miss

  • For a reported miss, start with the transition and adjacent provider calls, not an aggregate hit ratio. Expand lifecycle coverage when shared state or an explicit audit requires it. An agent turn may contain several requests. Mark deliberate model, reasoning, mode, prompt, tool, compaction, and history boundaries first.
  • Compare final provider requests in order: system and developer instructions, ordered tool contracts, ordered input items and their identities, structured-output definitions, then lane and continuation properties. Session logs and source strings are not the wire payload.
  • Trace the first divergence backwards through the actual preparation and rewrite chain. Identify the owner and capture event of each consumed snapshot, its completed hooks, lane, consumers, and invalidators. Correct bytes captured before authoritative preparation are stale. Use the latest completed final request in the same lane, not session-start state. Guard against late asynchronous work overwriting a newer lane.
  • Adding context and starting a prepared run are different operations. Verify hook coverage for the implicated kickoff and queued paths. An idle check is not a reservation. Use an atomic route or revalidate at invocation.
  • Prove the local mechanism in isolation, then exercise the affected multi-turn boundary in the user's complete extension setup. A later extension may change the same prompt, tools, or history.

Read the full file on GitHub · 27 lines

Changes

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.

  1. 1mo ago Changed · +2 lines d80a3a03f652
  2. 1mo ago Changed · -72 lines 752bb1311c38
  3. 2mo ago First seen · 97 lines · 22 tokens per session scan A d88fc770dfa9

Subscribe to this mod's changes

prompt-caching is a skill published in the GitHub repository IgorWarzocha/howaboua-pi-stuff (413 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 681 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-08-30.

Related

prompt-caching compared with skills from other repositories

prompt-caching next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
prompt-cachingIgorWarzocha/howaboua-pi-stuffSkill413yesterdayMITA22Claude Code, Codex
llm-app-patternsdavila7/claude-code-templatesSkill33kyesterdayMITA54Claude Code, Codex
prompt-engineerJeffallan/claude-skillsSkill12k7d agoMITA93Claude Code
prompt-optimizationlangwatch/langwatchSkill5.0kyesterdayApache-2.0A105Claude Code, Codex
omh-model-optimizationrlaope/oh-my-hermesSkill5.2ktodayMITA84Claude Code, Codex
ideogram4digitalsamba/claude-code-video-toolkitSkill2.5ktodayMITA99Claude Code
prompt-library-for-startupsaws/agent-toolkit-for-awsSkill3.4kyesterdayApache-2.0A228Claude Code