HeadlinesBriefing favicon HeadlinesBriefing.com

Prompt-caching Claude Code Cuts Token Costs by 90% with Auto-Insert

Hacker News •
×

A new open-source plugin for Anthropic's Claude Code slashes token costs by 90% by automatically inserting cache breakpoints. The Prompt-caching tool, built with Claude, detects stable content like system prompts and tool definitions, marking them for reuse. This means developers pay just 10% of the normal cost for repeated turns involving these cached elements.

Installation is simple: run '/plugin marketplace add' followed by the GitHub URL inside Claude Code, with no npm, no config file, no restart required. Savings start immediately on the next turn. The plugin also offers observability features like `get_cache_stats` to track hit rates and cumulative savings, though Claude Code's API already handles its own prompt caching automatically.