token-counterTrack and analyze OpenClaw token usage across main, cron, and sub-agent sessions with category, client, model, and tool attribution. Use when the user asks where tokens are being spent, wants daily/weekly token reports, needs per-session drilldowns, or is planning token-cost optimizations and needs evidence from transcript data.
Install via ClawdBot CLI:
clawdbot install mkhaytman87/token-counterUse this skill to produce token usage reports from local OpenClaw data. It parses session transcripts (.jsonl), session metadata, and cron definitions, then reports usage by category, client, tool, model, and top token consumers.
Run:
$OPENCLAW_SKILLS_DIR/token-counter/scripts/token-counter --period 7d
1) Basic report:
$OPENCLAW_SKILLS_DIR/token-counter/scripts/token-counter --period 7d
2) Focus on selected breakdowns:
$OPENCLAW_SKILLS_DIR/token-counter/scripts/token-counter \
--period 1d \
--breakdown tools,category,client
3) Analyze one session:
$OPENCLAW_SKILLS_DIR/token-counter/scripts/token-counter \
--session agent:main:cron:d3d76f7a-7090-41c3-bb19-e2324093f9b1
4) Export JSON:
$OPENCLAW_SKILLS_DIR/token-counter/scripts/token-counter \
--period 30d \
--format json \
--output $OPENCLAW_WORKSPACE/token-usage/token-usage-30d.json
5) Persist daily snapshot:
$OPENCLAW_SKILLS_DIR/token-counter/scripts/token-counter \
--period 1d \
--save
This writes JSON to:
$OPENCLAW_WORKSPACE/token-usage/daily/YYYY-MM-DD.json
$OPENCLAW_DATA_DIR/agents/main/sessions/sessions.json$OPENCLAW_DATA_DIR/agents/main/sessions/*.jsonl$OPENCLAW_DATA_DIR/cron/jobs.jsonThe parser reads assistant usage fields for token counts and uses tool-call records for attribution.
totalTokens may come from either session index metadata or transcript usage sums (max is used).personal, bonsai, mixed, unknown) using path/domain/email markers.Run:
python3 $OPENCLAW_SKILLS_DIR/skill-creator/scripts/quick_validate.py \
$OPENCLAW_SKILLS_DIR/token-counter
See:
references/classification-rules.md for category/client detection logic and keyword mapping.AI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Transform AI agents from task-followers into proactive partners that anticipate needs and continuously improve. Now with WAL Protocol, Working Buffer, Autonomous Crons, and battle-tested patterns. Part of the Hal Stack π¦
Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawdhub CLI.
Clawdbot documentation expert with decision tree navigation, search scripts, doc fetching, version tracking, and config snippets for all Clawdbot features
Interact with Moltbook social network for AI agents. Post, reply, browse, and analyze engagement. Use when the user wants to engage with Moltbook, check their feed, reply to posts, or track their activity on the agent social network.
OpenClaw CLI wrapper β gateway, channels, models, agents, nodes, browser, memory, security, automation.
MoltGuard β runtime security plugin for OpenClaw agents by OpenGuardrails. Helps users install, register, activate, and check the status of MoltGuard. Use wh...