Model Usage Monitor

# model-usage-monitor Skill

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Model Usage Monitor" with this command: npx skills add halfmoon82/model-usage-monitor

model-usage-monitor Skill

OpenClaw 模型使用监控与告警技能

⚠️ Security & Permissions Declaration

This skill monitors log files and sends alerts. All operations are read-only except notifications:

OperationPurposeScope
Read semantic router log (semantic_check.log)Parse model usage statisticsRead-only, local file
Read OpenClaw logsDetect usage anomaliesRead-only, local files
Send alert notifications via OpenClaw messagingNotify user of cost spikesLocal OpenClaw API only

What this skill does NOT do:

  • Does NOT modify any configuration or log files
  • Does NOT access external servers or APIs
  • Does NOT access model credentials directly
  • Does NOT require elevated privileges
  • Read-only monitoring — zero side effects on system state

功能

  • 解析语义路由日志,统计模型使用分布
  • 估算各模型调用次数和成本
  • 计算缓存命中率
  • 每小时自动告警检查
  • 支持实时监控模式

安装

# 技能已包含监控脚本和自动配置
# 安装后自动创建每小时检查的 Cron Job

使用

查看监控报告

# 完整报告
python3 ~/.openclaw/workspace/.lib/model_usage_monitor_v2.py

# JSON 格式
python3 ~/.openclaw/workspace/.lib/model_usage_monitor_v2.py --format json

# 仅检查告警
python3 ~/.openclaw/workspace/.lib/model_usage_monitor_v2.py --alert-check

实时监控

python3 ~/.openclaw/workspace/.lib/model_usage_monitor_v2.py --live

告警阈值

类型阈值说明
Opus 调用频繁>5 次/小时防止意外大量使用昂贵模型
Opus 成本过高>$0.50/小时成本控制
总成本过高>$2.00/小时总体预算控制

文件结构

.skills/model-usage-monitor/
├── SKILL.md              # 本文件
├── monitor.py            # 核心监控脚本
├── setup.py              # 自动安装/配置
└── config.json           # 默认配置

技术细节

  • 全部使用本地 Ollama 模型,零 API 调用
  • 只读日志文件,零侵入
  • 基于 semantic_check.log 和 gateway.log 分析

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

OpenClaw Token Monitor

OpenClaw Token 实时监控面板。支持:(1) SQLite 持久化存储历史数据 (2) 实时监控当前 Token 消耗(增量曲线) (3) 历史视图查看任意一天的消耗 (4) 按日/时会话汇总 (5) 人民币费用估算(MiniMax 官方定价) (6) 滚轮缩放 X 轴 (7) 图表采样防卡顿。触发场...

Registry SourceRecently Updated
1270Profile unavailable
General

Token消耗监控优化

AI Token消耗监控优化工具。读取会话日志,统计Token消耗,检测异常模式(短时激增、重复失败等),提供优化建议,生成消耗趋势报告。 中文优先,面向QClaw/OpenClaw用户。 当用户说"Token消耗"、"费用多少"、"Token统计"、"超支"、"优化建议"时触发。 Keywords: Token...

Registry SourceRecently Updated
1380Profile unavailable
General

Token Usage Tracker

Token 使用追踪系统。记录每个对话的输入/输出 token 消耗,累计统计,预算控制。 当用户说"token统计"、"用量追踪"、"消耗了多少"、"花了我多少token"时触发。

Registry SourceRecently Updated
1510Profile unavailable
General

Minimax Usage Cn

Monitor Minimax Coding Plan usage to stay within API limits. Fetches current usage stats and provides status alerts. Use when checking API quota, monitoring...

Registry SourceRecently Updated
3371Profile unavailable