Token Tracker

v1.3.0

Track and report token usage and cost for conversations. Use when: (1) User asks about token consumption (e.g. "token用了多少", "花了多少钱", "how much did this cost"...

0· 334·7 current·7 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for zty-f/token-tracker.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Token Tracker" (zty-f/token-tracker) from ClawHub.
Skill page: https://clawhub.ai/zty-f/token-tracker
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install token-tracker

ClawHub CLI

Package manager switcher

npx clawhub@latest install token-tracker
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name and description match the SKILL.md instructions: it only aims to read session metrics and produce a formatted summary. It does not request unrelated credentials, binaries, or config paths.
Instruction Scope
The instructions tell the agent to call session_status and format results. This stays within scope, but the skill implicitly depends on the platform providing a session_status method that exposes token/cost/cache/context metrics. If the platform exposes additional sensitive data via that API, the skill could surface it — the SKILL.md does not attempt to read files, env vars, or external endpoints.
Install Mechanism
No install spec and no code files — instruction-only skills do not write to disk or fetch remote code, which is lowest-risk for installation.
Credentials
No environment variables, credentials, or config paths are required. The declared requirements are proportionate to the stated purpose.
Persistence & Privilege
Flags are default (always: false, agent can invoke autonomously). The skill does not request permanent presence or modify other skills; no elevated persistence or privileges are requested.
Assessment
This skill is instruction-only and appears coherent: it formats and reports metrics returned by an agent-provided session_status call. Before enabling, confirm your agent platform actually exposes session_status and that the data it returns is what you expect (tokens, cost, cache, context). The skill does not request credentials or install code, but pricing numbers in the SKILL.md are reference-only and may be outdated — verify pricing from your provider if accuracy matters. If you are concerned about privacy, test the skill on non-sensitive conversations to see exactly which fields it surfaces.

Like a lobster shell, security has layers — review code before you run it.

latestvk97a93m9r00x67rqew5q3znna9837t1j
334downloads
0stars
4versions
Updated 1mo ago
v1.3.0
MIT-0

Token Tracker

Author: zruler
Blog: https://www.zruler.fun/
Email: zruler@163.com
Feedback: 有问题请及时反馈!Issues and suggestions welcome.

Report token usage and estimated cost for the current conversation.

When to Trigger

  1. User asks — "token用了多少"、"花了多少钱"、"cost"、"usage" 等
  2. Long conversation ends — 复杂任务完成后主动报告
  3. User requests summary — 明确要求看用量统计

Quick Usage

Call session_status to get current session metrics, then format a user-friendly summary.

Response Format

After getting session_status, report in this format:

📊 本次对话用量

🧮 Tokens: {input} 入 / {output} 出
💵 费用: ${cost}
🗄️ 缓存: {cache_percent}% 命中 ({cached} 缓存 / {new} 新)
📚 上下文: {used}/{max} ({percent}%)

Model Pricing Reference (USD per 1M tokens)

ModelInputOutputCached Input
claude-sonnet-4-20250514$3$15$0.30
claude-opus-4-20250514$15$75$1.50
gpt-4o$2.50$10$1.25
gpt-4o-mini$0.15$0.60$0.075
o1$15$60$7.50
o3-mini$1.10$4.40$0.55
gemini-2.0-flash$0.10$0.40$0.025
gemini-2.5-pro$1.25-$2.50$10-$15-
deepseek-chat$0.27$1.10$0.07
deepseek-reasoner$0.55$2.19$0.14

Note: Actual cost from session_status is authoritative. This table is for reference only.

Usage Tips

  • For long conversations, suggest compaction if context > 80%
  • Note cache hit rate — high cache = lower actual cost
  • If user asks for historical usage, explain this tracks current session only

Comments

Loading comments...