Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Computes recent prompt-cache hit rates per LingTai agent from token ledgers over rolling 1h, 5h, 1d, and 3d windows.
Use this skill ↓48% 87%+39 ptsof test cases passed
Passed 20 of 23 test cases with the skill, and 11 of 23 without it.
3 of 3 safety checks passed
Not used yet
Nested lingtai-dev-guide reference. Read this after the top-level router sends
you here when you need to know how well prompt caching has been working
recently for one or more LingTai agents, grounded in the token ledger rather
than guessed.
This pairs with reference/runtime-self-check/SKILL.md §6: when a cache/affinity
fix "should be live," the token ledger is the observable that proves it. This
reference is the measurement; runtime-self-check is the
did-the-object-rebuild diagnosis.
A read-only metric. It only reads append-only logs/token_ledger.jsonl
files; it never writes, rotates, or mutates runtime state. Report rates without
pasting private absolute paths into human-facing deliverables — the ledger holds
no secrets, but its parent paths can be private, so generalize to
~/.lingtai-tui/... or <project>/.lingtai/<agent>/.
Single source of truth: logs/token_ledger.jsonl, one JSON object per LLM call,
written after every call by lingtai/kernel/token_ledger.py
(append_token_entry). Required fields:
| Field | Meaning |
|---|---|
ts | Call time, UTC, %Y-%m-%dT%H:%M:%SZ (always Z/UTC). |
input | Total prompt/input tokens for the call. Already includes the cached portion. For the Anthropic/Claude adapters this is raw_input + cache_read + cache_write. |
output | Output tokens. |
thinking | Reasoning/thinking tokens. |
cached | Cache-read input tokens served from the provider prompt cache. A subset of input. |
model, endpoint | Attribution (which model / base_url produced the tokens). |
Optional tags on some entries: source (main, soul, tc_wake, daemon),
and for daemon-attributed rows em_id / run_id / api_call_id / codex_*.
The kernel normalizes every provider's usage into these same fields before
writing, so the metric is provider-agnostic (verified across gpt-5.5,
Next to this one in the catalogue, plus more from the same author.