NomaDamas

Saving Private Token — Development skill for Claude Code

Development community

Are you mad at 5 minute TTL of Claude Code.

How to install Saving Private Token

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

What Saving Private Token does

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.

Alternatives in Development

  • 02 Revision History — Give Inkwell a revision history: snapshot a post's prior state on every meaningful save, let the 143 ★
  • Caveman Skill — save tokens? claude 71 ★
  • Type Crusade — Unleash parallel TypeScript Purist agents to purge every any, as cast, and type sin across the codebase 51 ★

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