---
name: prompt-caching
description: |
  Prompt caching strategies for Claude Code efficiency.
  Use when optimizing API costs, reducing latency for repeated prompts,
  or building workflows with common context.

allowed-tools:
  - Read
---

# Prompt Caching Skill

## How It Works

Static prompt prefixes are cached, saving 90% on cached tokens.

```
Request 1: [System + Context + Message] → Cache created
Request 2: [Cached Prefix] + [New Message] → 90% savings
```

## Pricing Impact

| Component | Standard | Cached |
|-----------|----------|--------|
| Input tokens | 100% | 10% |
| Cache write | +25% first | - |
| Cache read | - | 10% |

## What Gets Cached

1. System prompts
2. CLAUDE.md content
3. Loaded skills
4. MCP tool definitions

## Cache-Aware Design

Put stable content first:
```
[System Prompt]     ← Cached
[Project Context]   ← Cached
[Skill Content]     ← Cached
[Recent Messages]   ← Not cached
[Current Request]   ← Not cached
```

## Best Practices

1. Front-load stable context
2. Avoid dynamic content in prefix
3. Batch similar requests
4. Keep sessions alive for cache
5. Monitor cache hit rates
