Skip to content
Back to skills

Prompt Cache Discipline

ASecurity

Use when repeated model calls share large instructions, tools, context, or prefixes and cache efficiency materially affects cost or latency.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
ai-agentsgo

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add ShugokiFable/Ultimate-AI-Starter-Bundle --skill prompt-cache-discipline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prompt Cache Discipline?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prompt Cache Discipline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shugokifable-prompt-cache-discipline/badge)](https://www.skillsdirectory.com/skills/shugokifable-prompt-cache-discipline)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prompt-cache-discipline
description: Use when repeated model calls share large instructions, tools, context, or prefixes and cache efficiency materially affects cost or latency.
---

# Prompt Cache Discipline

Keep the **stable prefix** stable. Prompt caching pays when large reusable instructions and references remain byte/order-stable across requests.

## Contract

1. Put durable instructions, schemas, and reusable reference context before volatile turn data.
2. Do not rewrite, reorder, timestamp, or reserialize a warm prefix without a correctness reason.
3. Keep session-scoped state small and append volatile facts after the reusable prefix.
4. Batch related reads/reasoning so repeated calls do not resend slightly different giant contexts.
5. Measure `cached_tokens`, uncached input, output, latency, and total cost when telemetry exists.
6. If compaction is required, preserve durable constraints and avoid repeated micro-compactions that churn the cache.

Cache hits never outrank correctness. Invalidate a stale prefix deliberately when facts or governing instructions change.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…