Skip to content

v0.1.13 — Prompt-cache stats + cache-friendly prompt design

Choose a tag to compare

@ashryaagr ashryaagr released this 02 May 05:32
· 5 commits to main since this release

What's new

Prompt caching is now visible. The `[result]` log line in the activity panel reports cache_read / cache_create token counts whenever Anthropic's prefix cache kicks in. Within the API's 5-minute TTL, refines on the same paper should show cache_read dominating over fresh input — you're paying ~10% of full pricing for the cached prefix.

Cache-friendly prompt design. The system prompt (~16KB of SKILL + Excalidraw cheat sheet + suffix) is built once into a stable constant so its byte sequence is identical across calls — a prerequisite for the API's prefix cache to hit. The user message ordering (paper text first, focus + instruction last) keeps variable per-call content strictly at the tail so it doesn't invalidate the paper-body prefix.

No SDK contract changes — this leans on Anthropic's automatic prefix caching rather than explicit `cache_control` breakpoints. Explicit cache_control on user-message content blocks is a follow-up if hit rates prove insufficient on long papers.

Install

```bash
curl -fsSL https://raw.githubusercontent.com/ashryaagr/clawdslate/main/install.sh | bash
```

If you're already running clawdSlate, run `clawdslate update`.