Cachebeat is a one-file Claude Code skill that arms an inactivity heartbeat so a long session does not drop Anthropic's prompt cache. The repo ARahim3/cachebeat was created 2026-09-14. On 2026-09-16 GitHub listed 5 stars and 0 forks. The README claims MIT; the GitHub API listed no SPDX license file that day, so treat the license as README-stated, not API-confirmed. It showed up on r/ClaudeAI as people hit 5-hour and weekly limits after stepping away.
Anthropic bills cache reads at 0.1x the input rate (the README's published ratio). A cold return re-sends the whole history at full input price. On Pro/Max that same accounting also drains the 5-hour window and weekly quota. 5 stars is a heat signal, not traffic.
Compare Claude Code if you wanted the host, ccusage if you wanted a usage dashboard, or Agent Skills if you wanted a broader engineering pack.
Key Features
- Inactivity timer, not a metronome:
/cachebeatstarts one background monitor. Any real turn resets the clock. It fires only after N minutes of true silence, Claude answers in a few words, and the cache TTL restarts. - Defaults: 50 minutes idle, auto-stop after 8 hours.
/cachebeat 40sets the idle threshold (clamped 5-55)./cachebeat 40 4also sets a 4-hour deadline./cachebeat stopkills it. - Install: copy
SKILL.mdto~/.claude/skills/cachebeat/(user) or<project>/.claude/skills/cachebeat/(project). No extra binary. - Verify: Claude Code's token line looks like
tok:312.0k/0.0k(total / from cache). A warm return should show a large second number. The README also grepscache_read_input_tokensvscache_creation_input_tokensin the session jsonl. - Self-check:
CACHEBEAT_WARNmeans the beat itself came back uncached, so the session TTL is too short to bridge.CACHEBEAT_EXPIREDends the monitor.
Limitation: it only helps sessions with the long (1-hour) cache TTL. A 5-minute TTL cannot be bridged. Each beat still costs a small cached-read plus a few output tokens, and those lines stay in later context. Native Windows (non-WSL) is untested. The skill reads ~/.claude/projects/<slug>/<session-id>.jsonl via $CLAUDE_CODE_SESSION_ID, an internal layout, not a documented API.
Use Cases
- Long Claude Code sessions that babysit training, CI, or downloads while a human sleeps.
- Pro/Max users who saw one "how's it going?" eat a visible chunk of the 5-hour window after idle.
- People who should not use it: you are not coming back. The 8-hour deadline exists so an abandoned session does not drip-bill.
Pricing
| Piece | Price | Notes from first-party pages 2026-09-16 |
|---|---|---|
| Skill | $0 | Copy SKILL.md. README says MIT. About 5 stars. |
| Host | Your Claude Code plan | Pro/Max usage windows still apply. Cache reads are cheaper, not free. |
| API users | Provider input rates | README cites cache reads at 0.1x input. Confirm current Anthropic pricing. |
Getting Started
mkdir -p ~/.claude/skills/cachebeatand copySKILL.mdthere.- In a Claude Code session with long TTL, type
/cachebeat. - Step away. When you return, check that the cache-read side of the token line is not
0.0k. /cachebeat stopif you will not come back.
First-party resource: the README and SKILL.md.
Frequently Asked Questions
Does this replace Claude Code?
No. It is a skill inside Claude Code. The agent still bills your plan.
Why 50 minutes, not every 5?
The idle threshold must stay under the TTL. 50 minutes leaves about 10 minutes of margin on a 1-hour cache. Firing too often wastes tokens; firing too late lands uncached.
Will it help a 5-minute TTL session?
The README says no practical heartbeat can bridge that. Stop it if bills stay uncached.
Alternatives
- Claude Code: the host. Without it this skill does nothing.
- ccusage: usage charts, not a cache keepalive.
- OpenCode Skills: SKILL.md packs for OpenCode, not Claude Code cache.
Tips
- Arm it only on sessions you will reopen. The 8-hour stop is the safety net, not a reason to leave it forever.
- If you see
CACHEBEAT_WARN, stop. The TTL is too short. - Keep replies to a few words. Extra heartbeat tokens are re-read on every later turn.
Conclusion
Cachebeat is a small, honest fix for the idle tax on long Claude Code sessions. Copy one file, type /cachebeat, and come back to a warm cache. Skip it if your sessions are short, your TTL is 5 minutes, or you were not going to return.
Comments
No comments yet. Be the first to comment!
Related Tools
Related Insights

Anthropic Subagent: The Multi-Agent Architecture Revolution
Deep dive into Anthropic multi-agent architecture design. Learn how Subagents break through context window limitations, achieve 90% performance improvements, and real-world applications in Claude Code.
Skills + Hooks + Plugins: How Anthropic Redefined AI Coding Tool Extensibility
An in-depth analysis of Claude Code's trinity architecture of Skills, Hooks, and Plugins. Explore why this design is more advanced than GitHub Copilot and Cursor, and how it redefines AI coding tool extensibility through open standards.
Seven AI Coding CLIs, Six Months: No Matter How Strong the Model, Work Needs Supervision
Claude Code, Codex, opencode, pi, omp and DeepSeek Harness all have personalities. After six months of deep use I run a division of labor: pi for the fastest cheapest reviews, omp for complex PRs, DeepSeek Harness on V4 Flash for high-frequency low-cost review, and Claude Code, Qoder and Cursor for writing. No matter how strong the model, work needs supervision — ideally from an independent third party.