SKILLEMALL.ai

BC agent-token-usage

Summarize per-agent LLM token consumption for OpenClaw multi-agent setups by parsing `~/.openclaw/agents/*/sessions/<id>.jsonl` session logs (type=message, role=assistant). Ships both a CLI (Python) and an optional 📊 button injected into the Control UI header next to Search. Use when the user asks "今天哪个 agent 用了多少 token / 消耗了多少 token / token 排行 / token 统计 / how much did agent X spend today / which agent burns the most tokens / token usage breakdown / billable token estimate", or asks to install/remove the 📊 token-usage button in Control UI. Returns a ranked table with input / output / cacheRead / cacheWrite / total (and equivalent-billable token estimate). NOT for: dollar cost (use codexbar/model-usage skill), per-message inspection (use sessions_history), or non-OpenClaw runtimes.

Not recommendedcritical or high security findings
ClawHub Agent Skills author: SymbolStar v0.3.0 MIT-0 7 files · 3 scripts body ≈ 1 257 tokens Open the sourceclawhub.ai analyzed 3 d ago

As a process C 58/100 · Has gaps — weak spots: result and completion, inputs and preconditions, failures and branches

IntegrationAI and agentstype and topics are labelled automatically from the skill text
JSON
Technical rating
B
76/100
safety, quality, tests
Safety 60%
72
Quality 40%
81
Run on models
none yet
Process rating
C
58/100
Has gaps
Result and completion w 14
0
Inputs and preconditions w 11
0
Failures and branches w 10
0
the three weakest of ten parameters · all ten

What is at stake

The skill contains fragments that, in the wrong hands, cost money or data. Below: what the installer risks and what the author should do.

Dangerous commands
If you install

The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.

For the author

Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.

How to improve

  1. Address the high-severity findings: each costs 18 safety points. If one is a false positive, add the rule id to guard.allow in spec.yaml.
For the model run — optional
  • Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
  • A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.

Guard findings · 3

  • high Dangerous commands cmd-persistence apply-ui.sh:114
    Persistence mechanism (cron / launchd / scheduled task / autorun registry)
    launchctl load "$PLIST" && green "✓ launchd job installed (refreshes every 5min): $LABEL"
Medium and low: 2
  • medium Dangerous commands cmd-persistence apply-ui.sh:96
    Persistence mechanism (cron / launchd / scheduled task / autorun registry) (string literal in code, not executed)
    PLIST="$HOME/Library/LaunchAgents/$LABEL.plist"
    code literal
  • medium Dangerous commands cmd-persistence remove-ui.sh:5
    Persistence mechanism (cron / launchd / scheduled task / autorun registry) (string literal in code, not executed)
    PLIST="$HOME/Library/LaunchAgents/$LABEL.plist"
    code literal

Files scanned: 7. Evidence is masked. Grey chips explain why severity was lowered.

Against the Agent Skills spec

  • warning frontmatter-yaml SKILL.md: the frontmatter is not valid YAML (YAML parse error: Nested mappings are not allowed in compact mappings at line 2, column 14: description: Summarize per-agent LLM token consumption for OpenClaw multi-agent… ^ ); fields were read line by line. The usual cause is a colon inside an unquoted value

Process rating: all ten parameters 58/100

  • 0Result and completion. Does not say what the result is
  • 0Inputs and preconditions. Does not say what the process needs to start
  • 0Failures and branches. Linear process with no failure handling
  • 60Tools and files. Uses tools (bash, web) that frontmatter does not declare
  • 100Steps. 11 steps
  • 100When it triggers. States when to use and when not to
  • 100Consistency. Name and required fields are in place
  • 100Execution cost. Instruction body is 1257 tokens
  • 100Running it twice. Mutating operations check current state
  • 100Progress reporting. Reports progress

Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.

Quality signals

  • +5Description has no quoted example phrases that should trigger the skill
  • +3Output format is not stated: the model decides each time
  • +1No license
  • +2Single-language instructions
  • +4Description says when NOT to use the skill
  • +3Description length 794: enough signal without eating the budget
  • +4Structure: 10 headings
  • +3Step-by-step instructions: 11 items
  • +4Has examples (5 code blocks)
  • +3All 3 scripts are documented

Quality base 70; lint remarks subtract, signals add up to 100. Result: 81.

External checks

ClawHub: clean
This skill locally reports OpenClaw agent token usage, with an optional UI patch that is disclosed but should be used only if you accept a macOS background refresh job.
LLM: benign (high) · VirusTotal: · 23 Jun 2026