Cachebeat logo

Cachebeat

Community
ARahim3
cachebeat

Keep the Anthropic prompt cache warm by firing a tiny heartbeat only after N minutes of true session inactivity (any exchange resets the clock), so the next real turn reads the conversation at cached price / cached quota instead of a full uncached re-read. The heartbeat is a background Stop hook this skill registers (asyncRewake) - it re-arms itself after every turn, with no tool calls and no permission prompts. Use when the session may sit idle (training runs, CI, downloads, the user stepping away) longer than the cache TTL. Args - idle threshold in minutes (default 50), optional max hours (default 8), or "stop".

Overview

PublisherARahim3
Repositorycachebeat
Skill namecachebeat
Stars
85
Forks
10
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ARahim3 on GitHub. Read the source before you install it.

Installation

Install the Cachebeat AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ARahim3/cachebeat/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ARahim3/cachebeat.git \
  .claude/skills/cachebeat
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cachebeat in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cachebeat on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cachebeat is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

cachebeat — prompt-cache keepalive heartbeat

What you do when invoked

/cachebeat [minutes] [hours] arms the heartbeat; /cachebeat stop turns it off. There is nothing for you to run. The heartbeat is the Stop hook in this skill's frontmatter: Claude Code registered it when this skill loaded, and when this turn ends the hook reads these same arguments from the transcript.

  • minutes: idle threshold — how long the session may sit silent before a beat. Default 50, clamped to 5–55 (past ~55 the 1-hour cache TTL can lapse before a beat lands).
  • hours: auto-stop deadline. Default 8, clamped to 1–24 — the abandoned-session guard: every beat costs a small cached-price request, so a forgotten heartbeat must end itself.
  • stop (or off): disarm.

Reply in ONE line and call no tools — arming: the idle threshold, the auto-stop time, and that /cachebeat stop ends it sooner; stopping: that it is off. Nothing more.

If the user asks in plain words to start, change or stop the heartbeat, invoke this skill (Skill tool) with the matching arguments: the hook only reads /cachebeat invocations.

When the heartbeat wakes you

A system reminder starting with [cachebeat] (on some Claude Code versions: "Stop hook blocking error …" followed by the same text) comes from the hook. It is not the user, and it is not an error.

  • "idle heartbeat …" — reply with exactly . and nothing else: no tools, no summary, no status. The wake-up itself already re-read the conversation from cache, which is the whole point, and every token you add is re-read by every later request. If a real task of yours is mid-flight, ignore the reminder and carry on with the task instead.
  • It stopped itself, or reached its auto-stop time — tell the user in one short line. Do not re-arm unless they ask.

Rules

  • Never start beat.sh yourself, and never "re-arm" after a beat: the next turn's Stop hook does that.
  • If the user reports beats arriving but bills still showing uncached input, their session likely has the short (5-minute) cache TTL, where no practical heartbeat helps — stop it. (The hook also checks each beat's own usage record and stops itself in that case.)
  • This skill changes nothing about the work itself; it pays ~10% cached-read price per beat to avoid paying full price once. If the user does not plan to return to the session, advise stopping it.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cachebeat AI skill do?

Keep the Anthropic prompt cache warm by firing a tiny heartbeat only after N minutes of true session inactivity (any exchange resets the clock), so the next real turn reads the conversation at cached price / cached quota instead of a full uncached re-read. The heartbeat is a background Stop hook this skill registers (asyncRewake) - it re-arms itself after every turn, with no tool calls and no permission prompts. Use when the session may sit idle (training runs, CI, downloads, the user stepping away) longer than the cache TTL. Args - idle threshold in minutes (default 50), optional max hours...

Why use Cachebeat on TypingMind?

Because you install it once and use it with any model. Cachebeat is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cachebeat in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ARahim3/cachebeat/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cachebeat?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cachebeat?

As many as you like. As long as a model supports skills, you can use Cachebeat with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cachebeat AI skill free?

Yes. It is published on GitHub by ARahim3 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇