cache-hygiene

Generate periodic keep-alive turns to maintain the Claude Code prompt cache.

37|7|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/archibate/dotfiles-claude --skill cache-hygiene
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cache-hygiene
Source: https://github.com/archibate/dotfiles-claude/tree/main/skills/cache-hygiene
Command: npx skills add https://github.com/archibate/dotfiles-claude --skill cache-hygiene

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps the Claude Code prompt cache warm by preventing cache misses during idle periods, reducing latency for subsequent interactions.

Core Features & Use Cases

  • Auto-triggers a cache-keep-alive loop after Bash or Agent background tasks finish.
  • Responds to the user command to start or extend the keep-alive cycle.
  • Integrates with ScheduleWakeup to schedule wakeups and balance prompt cache costs.

Quick Start

Start a cache-keep-alive loop after idle periods to maintain the 5-minute prompt cache.

Frequently Asked Questions about cache-hygiene

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

FAQPage Schema
Why does the Claude Code prompt cache expire during idle periods?▼

The prompt cache expires during idle periods because it operates on a 5-minute TTL, causing cache misses and increased latency for subsequent interactions if not kept warm.

How do I keep the prompt cache warm after a background task finishes?▼

To keep the prompt cache warm, the system auto-triggers a keep-alive loop after Bash or Agent background tasks finish, generating periodic turns to prevent cache misses.

What is ScheduleWakeup used for in prompt cache management?▼

ScheduleWakeup is used to schedule periodic wakeups with delaySeconds=270, generating keep-alive turns that maintain the prompt cache within its 5-minute TTL limit.

Can I manually start a prompt cache keep-alive cycle?▼

Yes, you can manually start or extend the cache keep-alive cycle by issuing the specific cache keep-alive command to the system.

Does the cache keep-alive loop run indefinitely once started?▼

No, the cache keep-alive loop does not run indefinitely; it monitors task state and limits ticks to 10 to preserve the 5-minute TTL and balance prompt cache costs.

When should I avoid using a prompt cache keep-alive mechanism?▼

You should avoid using a prompt cache keep-alive mechanism if the overhead of generating periodic keep-alive turns outweighs the latency reduction benefits for your specific workflow.