Claude Code Coffee banner
cnighswonger cnighswonger

Claude Code Coffee

Development community

Description

Keep your Claude Code prompt cache warm during breaks. Saves up to 92% on cache rebuild costs.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

claude-code-coffee

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](https://opensource.org/licenses/MIT) [![Claude Code Skill](https://img.shields.io/badge/Claude%20Code-Skill-blue)](https://github.com/anthropics/claude-code)

A [Claude Code](https://github.com/anthropics/claude-code) skill that keeps your prompt cache warm while you're away. Prevents expensive cold cache rebuilds when you return from a break.

The problem

When you step away from a Claude Code session, the prompt cache expires after its TTL (5 minutes under overage pricing, 1 hour normally). Returning to a large context forces a full cache rebuild at $10/MTok (1h write) instead of a cache read at $0.50/MTok. A 460k token context costs ~$3.86 to rebuild from scratch.

The solution

`/coffee 30` schedules lightweight periodic pings that keep the cache in the "read" state while you're away. Each ping costs ~17x less than a cold rebuild.

Installation

**One-liner:**

mkdir -p ~/.claude/skills/coffee && curl -fsSL https://raw.githubusercontent.com/cnighswonger/claude-code-coffee/main/SKILL.md -o ~/.claude/skills/coffee/SKILL.md

**Or clone and install:**

git clone https://github.com/cnighswonger/claude-code-coffee.git
cd claude-code-coffee
bash install.sh

Restart Claude Code after installing to pick up the new skill.

Usage

/coffee [duration]
Command Duration Description
/coffee 30 min Default coffee break
/coffee 15 15 min Quick break
/coffee 1h 1 hour Meeting
/coffee 2h 2 hours Long lunch
/coffee overnight Until 8 AM Overnight warmer
/coffee overnight 7 Until 7 AM Custom wake time

When invoked, the skill:

  1. Detects your current cache TTL tier (5min or 1h)
  2. Estimates your context size
  3. Shows a cost breakdown (ping cost vs cold start cost vs savings)
  4. Schedules recurring keepalive pings at the right interval
  5. Schedules an