← Back to Skills Marketplace
234
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install session-token-ledger
Description
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...
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install session-token-ledger - After installation, invoke the skill by name or use
/session-token-ledger - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 234 downloads so far.
How do I install Session Token Ledger?
Run "/install session-token-ledger" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Session Token Ledger free?
Yes, Session Token Ledger is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Session Token Ledger support?
Session Token Ledger is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Session Token Ledger?
It is built and maintained by zgjq (@zgjq); the current version is v1.0.0.
More Skills