Caveman Stats

JuliusBrussee/caveman/skills/caveman-stats

作者 JuliusBrussee2e08b9177c07bb7249a8a2d1a6758e5db281d002無授權條款110K 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫今天更新

Show recorded output and cache-read token usage and mode attribution for the current Claude Code session, or locate the host's native usage report. Trigger: /caveman-stats.

僅含說明Data & Analytics
AI 產生的概覽

回報目前 Claude Code 工作階段中已記錄的輸出與快取讀取 token 用量及模式歸屬。

功能
此技能會顯示目前 Claude Code 工作階段中已記錄的輸出與快取讀取 token 用量、回應次數,以及可取得的模式歸屬,或指引使用者查看宿主原生的用量報告。在 Claude Code 中由鉤子提供報告,並在圍欄程式碼區塊中逐字列印;在 Gemini CLI 中則引導使用者改用 /stats model 或 /stats session。它也支援 --all 與 --since 7d 等彙總參數以及 --share 模式,並依實測位元組大小回報原始/目前記憶檔案配對。它明確指出節省量未知,不會推論節省的 token、百分比、金額或淨結果。
適用情境
當你需要查看目前 Claude Code 工作階段中已記錄的 token 用量與模式歸屬,或需要找到宿主原生用量報告時使用。它也適用於跨工作階段彙總已記錄的輸出次數,或檢視記憶檔案大小差異。它不用於估算節省量,因為沒有實測比較。
執行需求
在 Claude Code 中執行,依賴鉤子檔案 src/hooks/caveman-mode-tracker.js 與 src/hooks/caveman-stats.js;在 Gemini CLI 中僅引導使用者使用內建 /stats 指令。此技能不附帶指令碼,僅為說明性指示。Claude 讀取器及其生命週期歷史僅適用於 Claude Code。

In Claude Code, src/hooks/caveman-mode-tracker.js resolves src/hooks/caveman-stats.js next to itself and runs it on /caveman-stats. The hook does not block the prompt: it supplies the report through hookSpecificOutput.additionalContext with an instruction to print it verbatim inside a fenced code block. Do exactly that, and do not calculate, recompute or re-round the numbers yourself.

In Gemini CLI, direct the user to /stats model for current session token usage or /stats session for session statistics. Gemini custom commands are prompts; they cannot invoke the built-in command or read its live session metrics. Never read Claude Code transcripts as Gemini usage. In other hosts, use a native usage report if one is available; otherwise say that current session usage is unavailable. The Claude reader and its lifetime history apply only to Claude Code. Savings remain unknown in every host without a measured comparison.

The report shows recorded output and cache-read tokens, response counts, and mode attribution where available. Savings are unknown: the transcript has no measured comparison without Caveman. Do not infer saved tokens, percentages, dollars, rule overhead, or a net result from output counts or the current mode.

--all and --since 7d aggregate the latest recorded output count per session. --share reports observed usage with savings unknown. Historical est_saved_* fields are ignored; their original history rows remain on disk. The statusline shows the active mode without the retired savings badge.

Original/current memory-file pairs are reported by their measured byte sizes. Those file-size differences do not establish provider token or billing savings. See docs/HONEST-NUMBERS.md.

來源與署名

來源:JuliusBrussee/caveman位於skills/caveman-stats提交2e08b91

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架