cache-keepalive

Schedule wakeups to keep the prompt cache alive in idle Claude Code sessions.

2|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/bllshttng/footnote --skill cache-keepalive
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cache-keepalive
Source: https://github.com/bllshttng/footnote/tree/main/skills/cache-keepalive
Command: npx skills add https://github.com/bllshttng/footnote --skill cache-keepalive

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps prevent a cost spike when the prompt cache expires during idle sessions, ensuring continuous service without unnecessary expenses.

Core Features & Use Cases

  • Idle Cache Management: Automatically reschedules pings to maintain the prompt cache warm, even during idle times.
  • Prevention of Cost Spikes: Keeps the cache active to avoid expensive re-loading costs.
  • Project Opt-in: Allows project-specific enablement, providing flexibility and cost control.

Quick Start

Enable cache-keepalive for a project by running /cache-keepalive config claude and setting 'cacheKeepalive' to true in .claude/settings.local.json.

Frequently Asked Questions about cache-keepalive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does prompt caching expire during Claude Code idle sessions?

Prompt caching expires during Claude Code idle sessions when the session remains inactive beyond the cache's time-to-live limit, leading to a cost spike when the full context must be re-loaded on the next interaction.

How do I keep my Claude Code prompt cache warm automatically?

You can keep your Claude Code prompt cache warm automatically by enabling the cache-keepalive setting, which schedules background wakeups to ping the session and maintain cached tokens without manual user interaction.

Can I enable prompt cache management for specific Claude Code projects only?

Yes, you can enable cache management for specific Claude Code projects by running the configuration command and setting the cacheKeepalive option to true in that project's local settings JSON file.

How do I prevent prompt cache cost spikes in Claude Code?

You prevent prompt cache cost spikes in Claude Code by keeping the cache active during idle periods, which avoids the expensive re-loading costs associated with re-processing the full prompt context.

Does cache-keepalive require user interaction to maintain cached tokens?

No, cache-keepalive does not require user interaction to maintain cached tokens, as it automatically schedules wakeups to manage project-specific cache maintenance in the background.

What configuration do I need to set up idle cache management?

To set up idle cache management, you need to run the configuration command for Claude and update the settings file to enable the cacheKeepalive boolean flag within your project directory.