Install any skill in seconds. Free to start, no credit card required.
Get Started Free →automateyournetwork/token-tracker
Track and display token consumption and cost for every NetClaw interaction.
Passed 18 of 21 test cases with the skill, and 4 of 21 without it.
and 17 more in the full report
15 fixed4 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 14 test cases the skill fixed. Same model, same prompt, with and without the skill.
Which environment variable can an engineer set to force a $2.00 session budget ceiling without modifying openclaw.json?
| Checked | Without skill | With skill |
|---|---|---|
| Identifies NETCLAW_SESSION_BUDGET_USD variable | Missed | Passed |
The instructions your model reads when the skill loads.
Track and display token consumption and cost for every NetClaw interaction. Enforce per-session spending caps and tool-call depth limits to prevent runaway API costs. Serialize MCP server responses in GCF format to reduce token usage by 40-60% on tabular network data.
Without this skill, a single casual phone question can trigger unbounded agentic tool chains that silently burn $10+ in API costs. This skill ensures:
This skill uses the netclaw_tokens shared library (src/netclaw_tokens/):
| Module | Function | Purpose |
|---|---|---|
| counter.py | count_tokens() | Count tokens via Anthropic API (fallback: len/4 estimate) |
| counter.py | count_message_tokens() | Count tokens for full message arrays |
| cost_calculator.py | calculate_cost() | Calculate USD cost with model-aware pricing |
| cost_calculator.py | get_pricing() | Look up model pricing (with env var override) |
| budget_policy.py | BudgetPolicy | Per-session budget configuration |
| budget_policy.py | resolve_session_config() | Load policy from config + interface detection |
| session_ledger.py | SessionLedger | Cumulative tracking + enforcement |
| footer.py | format_footer() | Format mandatory token/cost footer |
| gcf_serializer.py | serialize_response() | Serialize data to GCF with JSON fallback |
| gcf_wrapper.py | wrap_json_response() | Convert JSON responses to GCF |
test cases passed, vs 4 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.