tokflow_skill

This skill monitors token usage and costs across models and channels, analyzes prompting practices, and generates actionable optimization suggestions.
  • Python

2.5k

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill tokflow

  • _meta.json269 B
  • README.md1.4 KB
  • SKILL.md3.2 KB

Overview

This skill monitors and analyzes token consumption and cost for LLM usage, providing real-time channel balances, model-level statistics, and actionable optimization suggestions. It also analyzes user prompt patterns and estimates savings from prompt and invocation changes. Use it to track expenses and reduce token spend across paid model channels.

How this skill works

It queries a local TokFlow API (http://localhost:8001/api) to fetch dashboard, model, provider, balance, and prompt-statistics data. The skill interprets JSON outputs into human-friendly insights: totals, trends, top cost drivers, and suggested optimizations. It can regenerate suggestions and run deeper analysis on demand to produce up-to-date recommendations.

When to use it

  • Check daily or monthly token and cost overviews
  • Identify which models or calls drive the highest cost
  • Monitor real-time balances of paid channels
  • Get concrete optimization suggestions for models and prompts
  • Analyze prompt patterns to estimate token savings

Best practices

  • Run dashboard and balance checks before planning heavy usage
  • Use model-detail and analysis for root-cause of cost spikes
  • Generate fresh suggestions after configuration changes or traffic shifts
  • Prioritize prompt-stats findings when conversational costs are high
  • Keep TokFlow service running locally on port 8001 for accurate data

Example use cases

  • Ask "How much did I spend this month?" to get month_cost and breakdown by model
  • Request "Which model costs the most?" to receive a ranked list by total_cost
  • Query "What are my channel balances?" to retrieve real-time provider balances
  • Run "Any optimizations available?" to get model replacements, caching, and prompt suggestions with estimated savings
  • Analyze conversational cost by asking for prompt-stats to see average lengths, buckets, and potential token reductions

FAQ

No. TokFlow reads local session data and calls local APIs. Provider balance checks may call external provider APIs if configured, but core analysis runs locally.

What port must the service use?

TokFlow must be running on localhost port 8001 for the skill to query its API endpoints.

How reliable are the cost estimates?

Costs are taken from OpenClaw’s original calculations and are precise to six decimal places. Suggested savings are estimates based on current usage patterns and heuristics.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational