BlogSubmit

Search mods by name, tag, or keyword.

    Claude Plugins

    Cache Tax for Claude Code

    Estimate cold-cache rewrite costs and manage a timed keep-warm window inside Claude Code.

    costcontext

    About Cache Tax

    Cache Tax uses function hooks to show cache-state estimates, flag a potentially costly cold send and optionally keep a session cache warm for a chosen period. Warming sends model requests and consumes tokens; it is not a promise of lower costs. It requires a one-hour main cache lifetime.

    • Shows an estimated rewrite cost before a cold send.
    • Starts and stops a bounded keep-warm period.
    • Reports cache status and recent warming activity.

    What does a 200,000-token cache rewrite cost?

    Compare reading the same 200,000-token prefix with writing it again. These amounts cover the prefix only; new input and output add cost, and a real request can mix reads and writes.

    API costs for a 200,000-token prefix
    ModelWarm read5-minute write1-hour write
    Claude Sonnet 5.5$0.02$0.50$0.80
    Claude Sonnet 4.6$0.06$0.75$1.20
    Claude Opus 5.5$0.04$1.00$1.60
    Claude Fable 5.1$0.05$2.50$4.00

    Formula: tokens × price per million ÷ 1,000,000. USD prices checked 2026-10-13. Official price table

    One recorded session: a $6.28 write

    The maintainer recorded a roughly 330k-token session with a $6.61 warning, followed by a 314k-token write worth $6.28 at API-equivalent rates. The warning is an upper-bound estimate, not a standard per-message charge or a subscription bill.

    Calculate your own cache cost

    Cache Tax vs Claude Code’s built-in prompt cache

    Built-in prompt cache

    Reuses matching prompt prefixes and manages cache reads and writes. Expiry or a changed prefix can cause a later write.

    What Cache Tax adds

    Adds a cold-write estimate, a send guard and optional warming during a bounded window. It does not change cache rules or pricing.

    If you often return to a large context after a break, check the rewrite estimate before sending. During continuous work, with a small context, or before clearing a session, warming may add little value.

    Set a keepwarm window around your return

    Run these commands inside Claude Code after installing Cache Tax. Its normal 50-minute interval needs a one-hour main cache and Claude Code left running.

    Before a 90-minute break

    /keepwarm 90m

    Check the next ping and receipt

    /keepwarm status

    Stop warming

    /keepwarm off

    /keepwarm without a duration arms six hours. For a return before expiry, start without warming. For a longer break, compare the added ping cost with a rewrite. Closing the computer, changing models or compacting context can defeat the assumed warm return.

    References: Cache Tax README · Claude Code prompt caching

    How to install

    Open the source documentation to check prerequisites and installation scope. Copy the commands below and run them one line at a time. Replace any example paths with the directory you intend to use.

    Terminal

    claude plugin marketplace add karanb192/claude-code-mods
    claude plugin install cache-tax@claude-code-mods

    Requires Claude Code 2.1.287 or later. After installation, run /reload-plugins in the active session and check /plugin to confirm the mod loaded.

    Complete any authentication or settings steps documented by the maintainer, then reload the session and confirm the capability is available. Entries in the same repository may share a parent plugin installation.

    Getting started

    Check the maintainer’s cache-lifetime requirements first. Run /cache-tax to inspect status, /keepwarm 90m for a limited window, and /keepwarm off to stop. Keep Claude Code running and account for ping token usage.

    Before you use it

    Review the project instructions and requested tool access, then try a small task. This directory checks sources and setup notes; inclusion is not a code security audit.

    Continue exploring

    Browse all Claude plugins on the homepage

    Related mods

    Claude Plugins
    Token Weather — anthropics/claude-code-playground

    See context usage and recent growth as a weather strip above the Claude Code prompt.

    Claude Code ModAnthropic repository261 repo starsRepo updated Oct 14, 2026

    Atlas — jamubc/toolbox

    Browse project files, inspect Git changes and open an editor in a Claude Code side pane.

    Claude Code ModCommunity project2 repo starsRepo updated Oct 13, 2026

    Blast Radius — anthropics/claude-code-playground

    Preview the impact of a risky shell command in Claude Code before choosing Proceed or Cancel.

    Claude Code ModAnthropic repository261 repo starsRepo updated Oct 14, 2026