Claude Prompt Cache Keepalive — Development skill for Claude Code
Agent skill for Claude Code: keep the 1-hour prompt cache warm while you are away, with a ladder of background timers that wake the idle session.
How to install Claude Prompt Cache Keepalive
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open santiquiroz/claude-prompt-cache-keepalive and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Prompt Cache Keepalive does
Agent skill for Claude Code: keep the 1-hour prompt cache warm while you are away, with a ladder of background timers that wake the idle session.
Alternatives in Development
- Investigate Performance — Investigate a Nimbalyst performance problem (freeze, lag, idle CPU, slow op, memory growth) with measured evid 1.6k ★
- Galatea Garden Wake Bridge — 独立的 Galatea Garden 智能体唤醒桥:订阅 Garden SSE 事件,并通过可替换的 Runtime Adapter 将消息注入 Codex、Claude Code 等 Agent Runtime 225 ★
- Position Ladder — Position Ladder — Staged Entry & Cost-Basis Management 192 ★
README
keeping-prompt-cache-warm
An agent skill for [Claude Code](https://claude.com/claude-code) that keeps a session's prompt cache alive while you are away, so a large conversation does not have to be re-read from scratch when you come back.
The problem
Claude Code caches the conversation prefix for **exactly 60 minutes** after the last model request. If you leave a long session idle for longer than that (overnight, a meeting, a long background job), the next message re-reads the whole context uncached: slow, and it burns usage quota.
What does and does not work
Verified in the Claude Code VS Code extension on Windows, by reading the session transcript usage (`cache_read_input_tokens` vs `cache_creation_input_tokens`):
| Mechanism | Wakes an idle session? |
|---|---|
Background Bash/PowerShell job (run_in_background: true) when it exits |
Yes |
CronCreate recurring job |
No: fired 0 times in 8.5 hours |
ScheduleWakeup |
Only inside /loop |
Monitor |
Expires in 30-60 minutes |
| Subagents / workflows running in the background | Do not refresh the main thread cache; only their final notification wakes it |
A gap of 60 min 20 s was already enough to lose the cache, so there is no slack beyond the hour.
How it works
The skill arms a **ladder of independent background timers** in one shot (not a chain, so one missed wake does not stop the rest). Each timer:
- sleeps until its scheduled minute, polling a
stopfile every minute; - holds an OS sleep lock while waiting (Windows
SetThreadExecutionState, macOScaffeinate, Linuxsystemd-inhibit); - exits printing
KEEPALIVE_TICK, whose completion notification wakes the model for a one-line, tool-free reply that refreshes the cache.
Install
git clone https://github.com/santiquiroz/claude-prompt-cache-keepalive ~/.claude/skills/keeping-prompt-cache-warm
Then just tell Claude something like "I'm going to sleep, keep the cache warm for 8 hours".
The wake
Related Skills
Cc Cache Keepalive
Keep the most recently used Claude Code prompt cache warm without polluting the original session.
Herdr Auto Warm Cache
A herdr plugin that keeps an idle agent's prompt cache warm before the one-hour TTL expires — 20x cheaper than
Cache Tax
Keep Claude Code’s prompt cache warm during breaks and show the estimated cost before a cold send.
Claude Code Coffee
Keep your Claude Code prompt cache warm during breaks. Saves up to 92% on cache rebuild costs.
Wirescope
A transparent analytical proxy for the Claude Code & Codex CLIs — see the real per-turn cost, prompt-cache war
Stoke
stoke is a local proxy that sits between Claude Code (or any Anthropic API client) and api.anthropic.com. Whil
Related Agents
Worker Apply Opus
Resumable implementation worker for non-SDD work units. Applies multi-file changes from a handoff, absorbs fol
Stamity Performance
Reviews the cost of a change on data-access, background-work, and cache surfaces against the budgets the repos
Group Em Assistant
Standing Sonnet assistant to a Group EM: kept warm across a session, woken by its own watch or by SendMessage.