← 返回 Skills 市场
cheenu1092-oss

tokenmeter

作者 cheenu1092-oss · GitHub ↗ · v0.1.1
cross-platform ⚠ suspicious
1546
总下载
0
收藏
3
当前安装
2
版本数
在 OpenClaw 中安装
/install tokenmeter
功能描述
Track AI token usage and costs across providers. Import sessions, view dashboard, costs breakdown, and compare Max plan savings.
安全使用建议
What to consider before installing/running this skill: - Review the repository before auto-install: SKILL.md instructs the bot to git clone a remote repo and pip install it into a venv. That will execute code downloaded from the network. Verify the repo URL and contents (note the SKILL.md clone URL differs from pyproject.toml metadata). - Prefer manual installation: instead of letting the agent run the clone/install automatically, run the steps yourself in a controlled environment (or an isolated VM/container) so you can inspect code and dependencies first. - Expect local files to be read/written: tokenmeter reads session JSONL files (e.g., ~/.clawdbot/agents/*/sessions/*.jsonl and ~/.claude/projects/*/sessions/), writes DB at ~/.tokenmeter/usage.db, and creates a venv at ~/clawd/tokenmeter/. This is normal for the stated purpose but be comfortable with those paths being accessed. - Environment keys will be probed if you run fetch: the tool scans for common provider API keys and may call provider APIs. If your runtime has provider API keys in environment variables, the skill may use them to query usage. If you don't want that, remove keys from the environment or avoid the fetch command. - Watch for proxy/webhook features: README mentions proxy and webhook integration — these could forward data externally if configured. If you plan to use proxy features, verify where data is sent and ensure you trust the endpoint. - If uncertain, inspect the following files first: fetcher.py (env scanning and HTTP calls), importer.py (parsing local session files), and any files that implement proxy/webhook behavior. Check for hard-coded external endpoints or telemetry logic. If you review the code and trust the source, the skill is coherent for its purpose. If you cannot verify the repo, treat the automatic install/execute behavior as a risk and avoid auto-running the install steps.
功能分析
Type: OpenClaw Skill Name: tokenmeter Version: 0.1.1 The skill is classified as suspicious due to high-risk capabilities, even though they align with the stated purpose. The `SKILL.md` instructs the AI agent to `git clone` a remote repository (`https://github.com/jugaad-lab/tokenmeter.git`) for installation, which is a remote code execution vector. Additionally, the `tokenmeter/fetcher.py` module reads sensitive API keys from environment variables (e.g., `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`) and uses them to make network calls to external LLM provider APIs to fetch usage data. While these actions are necessary for the skill's functionality, they represent significant access and execution privileges.
能力评估
Purpose & Capability
The name/description (track tokens and costs locally) align with the code: a CLI that reads session JSONL files, writes a local SQLite DB, computes costs, and can optionally call provider APIs. Minor inconsistency: SKILL.md clones https://github.com/jugaad-lab/tokenmeter.git while pyproject.toml points to https://github.com/yajatns/tokenmeter — this mismatch of source/homepage is unexplained and worth verifying.
Instruction Scope
SKILL.md instructs the agent to clone the repo, create/activate a venv, pip install the package, read session JSONL files (e.g., ~/.clawdbot/agents/*/sessions/*.jsonl, ~/.claude/projects/*/sessions/), and run tokenmeter commands. Those steps are within the stated goal (import local sessions and compute costs). The skill will also scan env vars for provider API keys and may call provider usage endpoints — this is within scope for the fetch feature but means it will access environment secrets if present.
Install Mechanism
There is no registry install spec; SKILL.md instructs cloning a GitHub repo and running pip install -e inside a newly created venv. That causes remote code to be downloaded and executed locally. While GitHub is a common source, the clone URL in SKILL.md (jugaad-lab) doesn't match the repository URLs in pyproject (yajatns). Automatic cloning + pip install from an external repository increases risk and should be reviewed manually before running.
Credentials
The code optionally scans environment variables for API keys (ANTHROPIC_API_KEY, OPENAI_API_KEY/OPENAI_KEY, GOOGLE_API_KEY/GEMINI_API_KEY, AZURE_OPENAI_API_KEY) which is proportional to the fetch capability (pulling usage from provider APIs). The skill does not declare required env vars because these are optional. No unrelated credentials or extra secrets are requested in the manifest. Make sure you understand which keys are present in the agent's runtime environment before permitting fetch operations.
Persistence & Privilege
The skill writes to ~/.tokenmeter/usage.db, creates a venv under ~/clawd/tokenmeter, and stores import checkpoint metadata under ~/.tokenmeter/import-state.json — these are expected for persistent local tracking. always:false (not force-installed) and normal autonomous invocation are in effect. The combination of autonomous invocation plus the ability to auto-clone/install remote code and scan env vars raises the blast radius if you permit the agent to run the install automatically.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install tokenmeter
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /tokenmeter 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
Tagged electron-essential, updated README with ClawHub install
v0.1.0
v0.1.0: AI token usage tracking — import from OpenClaw/Claude Code, incremental imports, dashboard
元数据
Slug tokenmeter
版本 0.1.1
许可证
累计安装 3
当前安装数 3
历史版本数 2
常见问题

tokenmeter 是什么?

Track AI token usage and costs across providers. Import sessions, view dashboard, costs breakdown, and compare Max plan savings. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1546 次。

如何安装 tokenmeter?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install tokenmeter」即可一键安装,无需额外配置。

tokenmeter 是免费的吗?

是的,tokenmeter 完全免费(开源免费),可自由下载、安装和使用。

tokenmeter 支持哪些平台?

tokenmeter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 tokenmeter?

由 cheenu1092-oss(@cheenu1092-oss)开发并维护,当前版本 v0.1.1。

💬 留言讨论