← 返回 Skills 市场
halfmoon82

Model Usage Monitor

作者 halfmoon82 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
388
总下载
1
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install model-usage-monitor
功能描述
监控并统计模型调用次数和成本,计算缓存命中率,支持实时监控与每小时自动告警。
安全使用建议
This skill largely does local, read-only log analysis as advertised, but two things to watch: (1) monitor.py reads session JSONL files under ~/.openclaw/agents/main/sessions — those files can contain conversation text and metadata; the SKILL.md did not disclose this access. If you have sensitive conversations stored, review the code and consider restricting or removing session access. (2) setup.py invokes the 'openclaw' CLI to create a cron job; confirm you trust that CLI and understand whether it contacts any external service. Before installing: inspect monitor.py (you have full source), run the script manually in a safe environment to see what it reads, and if you prefer, disable automatic cron creation (do not run setup.py) and instead run the script manually or create a cron job yourself after review. If you need higher assurance, run the install in an isolated test environment first.
功能分析
Type: OpenClaw Skill Name: model-usage-monitor Version: 1.0.1 The skill is a local model usage and cost monitoring tool that parses OpenClaw log files (`gateway.log`, `semantic_check.log`) and session metadata to estimate token costs and cache hit rates. The installation process via `install.sh` and `setup.py` is transparent, using the `openclaw` CLI to schedule a local cron job for hourly alerts. The core logic in `monitor.py` contains no network calls, no obfuscation, and no evidence of data exfiltration, performing all analysis locally on the user's machine.
能力评估
Purpose & Capability
The stated purpose (monitor model usage, estimate cost, compute cache hit rate, hourly alerts) matches the code's functionality: parsing semantic and gateway logs and estimating costs. However, the code also parses agent session files (~/.openclaw/agents/main/sessions/*.jsonl) to extract per-session message/model details — this session-level access is not described in the SKILL.md security table and expands scope beyond the explicit declarations.
Instruction Scope
SKILL.md claims only read-only access to semantic_check.log and OpenClaw gateway logs and that nothing sensitive is accessed. The shipped monitor.py does read those logs, but also reads session JSONL files and extracts 'message' contents (assistant messages) and metadata.model. Session files can contain conversation contents and personally sensitive data; that access is not documented in the permission table. Additionally, installation/setup uses the 'openclaw' CLI to create a cron job — the SKILL.md asserts no external APIs but the openclaw CLI could interact with local or remote services depending on implementation; this is not documented.
Install Mechanism
There is no remote download; install.sh and setup.py perform local file copies and directory creation only. install.sh is transparent and copies monitor.py into the user's ~/.openclaw workspace; setup.py similarly writes the script and attempts to create a cron job via the openclaw CLI. No external URL downloads or archive extraction are present in the provided files.
Credentials
The skill does not request environment variables or external credentials, which is appropriate. One omission: setup.py and the SKILL.md rely on the presence of the 'openclaw' CLI (used to list/create cron jobs) but that binary is not declared in the required-binaries list. If present, that CLI will be invoked and its privileges/behavior should be reviewed.
Persistence & Privilege
The skill sets up a persistent scheduled check (Cron job) via the openclaw CLI. Persistent scheduled execution is expected for monitoring, but because the cron runs the monitor script regularly and the script reads session files (sensitive data), this increases the long-term exposure surface. The skill is not force-included (always:false), but it does attempt to create persistent execution during install.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install model-usage-monitor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /model-usage-monitor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Version 1.0.1 of model-usage-monitor - Added detailed security & permissions declaration to documentation, clarifying all operations are read-only except notifications. - Introduced new files, including setup and library modules, for improved installation and modular monitoring logic. - Updated documentation structure, including new README files in both English and Chinese. - Refined file organization with dedicated config and script directories. - No changes to monitoring logic or user-facing features.
v1.0.0
初版:支持模型调用分布统计、成本估算、缓存命中率分析、每小时自动告警
元数据
Slug model-usage-monitor
版本 1.0.1
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 2
常见问题

Model Usage Monitor 是什么?

监控并统计模型调用次数和成本,计算缓存命中率,支持实时监控与每小时自动告警。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 388 次。

如何安装 Model Usage Monitor?

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

Model Usage Monitor 是免费的吗?

是的,Model Usage Monitor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Model Usage Monitor 支持哪些平台?

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

谁开发了 Model Usage Monitor?

由 halfmoon82(@halfmoon82)开发并维护,当前版本 v1.0.1。

💬 留言讨论