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
- 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 ★
- Brb — Use when the user signals they're stepping away (brb, afk, heading out) — keep working autonomously, skip anyt 52 ★
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
Cache Keepalive
Keeps an idle Claude Code session's prompt cache warm, so the session you come back to does not start cold
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
Ctx Handoff Mod
Claude Code mod: auto handoff to a fresh conversation when context hits a threshold, keeps the prompt cache wa
Claude Statusline Plus
Claude Code status line segments: whether your prompt cache is still warm and what a cold start costs, and whe
Cache Tax
Keep Claude Code’s prompt cache warm during breaks and show the estimated cost before a cold send.
Related Agents
Worker Apply Opus
Resumable implementation worker for non-SDD work units. Applies multi-file changes from a handoff, absorbs fol
Follow Up Agent
Use to keep warm conversations from going cold: stalled threads after an accept or a maybe, people who asked t
Stamity Performance
Reviews the cost of a change on data-access, background-work, and cache surfaces against the budgets the repos