← 返回 Skills 市场
zgjq

Session Token Ledger

作者 zgjq · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
234
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install session-token-ledger
功能描述
Analyze local OpenClaw session token usage from a generated SQLite ledger and markdown summaries. Use when the user asks for a token audit, token体检报告, contex...
安全使用建议
This skill appears internally consistent and does what it says: it scans local OpenClaw session transcript files and creates a local SQLite ledger and markdown reports. Before installing or enabling the optional hook: (1) review the included scripts (rebuild_sqlite.py and report.py) yourself — they will read all transcript files under agents/.../sessions and write files into the skill's assets directory; session transcripts can contain sensitive messages or secrets; (2) run the scripts manually first (python3 scripts/rebuild_sqlite.py and python3 scripts/report.py) to inspect outputs before enabling automatic hooks; (3) only enable the hook if you want automatic rebuilds on /new, /reset, /stop, or gateway startup; (4) consider filesystem permissions and where the skill writes outputs (assets/ and .generated/ report folder); and (5) if you run in a multi-user environment, be cautious about sharing the generated artifacts. No network exfiltration or credential requests were found, so the primary risk is accidental local exposure of transcript content — protect the generated files accordingly.
功能分析
Type: OpenClaw Skill Name: session-token-ledger Version: 1.0.0 The session-token-ledger skill is a local utility designed to audit and analyze LLM token usage from OpenClaw session transcripts. It parses local JSONL log files, populates a SQLite database (session_tokens.db), and generates markdown reports via Python scripts (rebuild_sqlite.py and report.py). The code operates entirely on local files within the OpenClaw directory structure, contains no network exfiltration logic, and uses standard platform features for automation hooks without any evidence of malicious intent or prompt-injection attacks.
能力评估
Purpose & Capability
The name/description (token audit / SQLite ledger / markdown summaries) matches what the included scripts do: scanning local session transcripts, aggregating token usage, and producing DB and markdown artifacts. There are no unrelated external services, binaries, or credentials requested.
Instruction Scope
SKILL.md and the scripts confine actions to local files: scanning sessions under the workspace's agents/.../sessions directory, reading sessions.json, writing assets (DB, markdown, index, anomalies). The optional hook runs the rebuild script on OpenClaw events; no network calls, no exfiltration endpoints, and the README explicitly warns not to modify the DB unless requested.
Install Mechanism
There is no install spec or remote download. This is an instruction-and-scripts package delivered in the skill bundle; it runs local Python scripts and uses SQLite only.
Credentials
The skill does not require credentials or secrets. The only environment variable referenced is an optional SESSION_TOKEN_LEDGER_SKILL_DIR (to override skill dir). The hook uses HOME to compute paths; nothing requests unrelated tokens/keys.
Persistence & Privilege
always=false and the skill is user-invocable. The optional hook is explicit and opt-in; enabling it gives the skill the ability to run the rebuild on events, which is appropriate for an automation hook but should be enabled deliberately by the user.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install session-token-ledger
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /session-token-ledger 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Analyze local OpenClaw session token usage from a generated SQLite ledger and markdown summaries. Use this skill when you want a token audit, context-bloat diagnosis, session efficiency review, daily token trends, largest-session analysis, input/output ratio inspection, cache-read-heavy session detection, or a markdown report for one specific session. Includes a rebuild script for generating the ledger from local OpenClaw session transcripts, a report script for human-readable summaries, canned SQLite queries for common investigations, and optional hook setup instructions for automatic rebuilds after /new, /reset, /stop, or gateway startup.
元数据
Slug session-token-ledger
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Session Token Ledger 是什么?

Analyze local OpenClaw session token usage from a generated SQLite ledger and markdown summaries. Use when the user asks for a token audit, token体检报告, contex... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 234 次。

如何安装 Session Token Ledger?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install session-token-ledger」即可一键安装,无需额外配置。

Session Token Ledger 是免费的吗?

是的,Session Token Ledger 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Session Token Ledger 支持哪些平台?

Session Token Ledger 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Session Token Ledger?

由 zgjq(@zgjq)开发并维护,当前版本 v1.0.0。

💬 留言讨论