Saving Private Token banner
NomaDamas NomaDamas

Saving Private Token

Development community

Description

Are you mad at 5 minute TTL of Claude Code? Me, too. So, let's save our private token. The KV Cache Reset is Sin.

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

Saving Private Token

SavingPrivateToken

Keep Claude Code's prompt cache warm while you think.

Anthropic's prompt cache has a 5-minute TTL. If you step away from an interactive Claude Code session for more than 5 minutes — to grab coffee, read a spec, or just think — the cache expires and the next turn re-processes the entire prefix. `SavingPrivateToken` (`spt`) injects a tiny keepalive ping every 4:50 of idle via `tmux send-keys`, refreshing the TTL with a 1-token `pong` round-trip.

Prerequisites

**All of these must be installed and on `PATH` _before_ you run the `spt` installer.** The installer shells out to `claude` to register its plugin and to `tmux` at runtime to inject pings — neither is optional.

Requirement Why Install
Claude Code (claude on PATH) spt registers a plugin via claude plugin marketplace add + claude plugin install. Without claude at install time, hooks never fire. docs.claude.com/en/docs/claude-code
tmux ≥ 3.0 The ping is injected via tmux send-keys into the claude pane. brew install tmux (macOS) · apt install tmux (Debian/Ubuntu)
Node.js ≥ 18 spt and its install script are Node ESM. nodejs.org or brew install node
Bash (POSIX shell) Plugin hooks are bash scripts. macOS and Linux are supported. Windows/PowerShell is not. WSL works. system default

If `claude` or `tmux` is missing when you install, `spt` will warn and continue — but the keepalive won't work until both are present. You can re-register anytime with `spt install-plugin`.

Install

Not on npm yet. Install from git until the first release:

npm install -g git+https://github.com/NomaDamas/Saving-Private-Token.git

The postinstall step runs `claude plu