minimax-token-plan-monitor
MiniMax Token Plan 用量监控 — 自动查询本周/5小时窗口用量、套餐余量、剩余调用次数及重置时间。支持 QQ/Discord/Telegram 多通道通知,可配置告警阈值。触发词:minimax额度查询、token plan用量、本周用量、剩余次数、订阅状态、minimax coding plan、minimax配额。
bbzhi177
@bbzhi177
Install
$ openclaw skills install @bbzhi177/minimax-token-plan-monitorMiniMax Token Plan 用量监控 📊
监控 MiniMax Token Plan 订阅套餐的实时用量,支持多通道通知和告警阈值配置。
功能特性
- 🔄 自动查询:5小时窗口 + 本周用量同时监控
- 🔔 多通道通知:支持 QQ / Discord / Telegram 推送
- ⚙️ 告警阈值:可配置用量百分比告警
- ⏰ 定时巡检:通过 cronjob 实现每日定时检查
- 🇨🇳 国内适配:针对国内版 MiniMax 平台优化
环境配置
在 ~/.env 中配置以下变量:
# MiniMax 账号(手机号 + 密码)
MINIMAX_PHONE=15605428773
MINIMAX_PASSWORD=your_password_here
# 通知配置(可选,留空则只输出日志)
QQBOT_PORT=37701
# QQ/Discord/Telegram 通知通过 OpenClaw 消息通道发送
快速使用
手动查询
cd ~/.openclaw/workspace/skills/minimax-token-plan/scripts
node get_token_plan_usage.js
依赖
~/.env中的账号信息运行
输出示例
📊 MiniMax Token Plan 用量报告
⏰ 2026/4/4 22:00:21
🏷️ 套餐: Starter
📌 5小时窗口: 4 / 600 (1%)
📌 本周: 1398 / 6000 (23%)
🔄 25 小时 59 分钟后重置
JSON 原始输出
{
"success": true,
"data": {
"url": "https://platform.minimaxi.com/user-center/payment/token-plan",
"plan": "Starter",
"fiveHour": { "used": 4, "limit": 600, "usedPercent": 1 },
"week": { "used": 1398, "limit": 6000, "usedPercent": 23 },
"resetTime": "25 小时 59 分钟后重置"
}
}
定时任务配置(cron)
推荐监控时间点:每天 10/12/14/16/18/20/22 点
# 在 OpenClaw 配置中设置 cron
0 10,12,14,16,18,20,22 * * * /usr/bin/node /root/.openclaw/workspace/skills/minimax-token-plan/scripts/get_token_plan_usage.js >> /root/.openclaw/workspace/skills/minimax-token-plan/cron.log 2>&1
告警阈值配置
在 scripts/config.json 中修改:
{
"alertThreshold": {
"fiveHourPercent": 80,
"weekPercent": 80
}
}
当用量超过阈值时,会在通知中突出显示 ⚠️ 警告。
限速说明
| 窗口 | 套餐 | 说明 |
|---|---|---|
| 5小时 | 600次 | Starter 套餐限制 |
| 本周 | 6000次 | 自然周统计,重置时间见输出 |
1次 API 调用 ≈ 1次模型请求
依赖
- Node.js + Playwright
- Chromium 浏览器(自动安装)
.env配置文件(账号凭证)
故障排查
| 问题 | 解决方案 |
|---|---|
| 登录失败 | 检查手机号 + 密码是否正确 |
| 页面解析失败 | MiniMax 可能更新了页面结构,需更新正则 |
| 滑动验证码 | 当前版本暂不支持,可尝试增加运行间隔 |
| 通知发送失败 | 检查 QQBot 端口配置(默认 37701) |
💡 需要在 OpenClaw 中配置 MiniMax 账号的 cookie/token 才能实现免登录,具体咨询 MiniMax 官方文档。
Top skills in this category
Humanizer
@biostartechnologyRemove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
Slack
@steipeteUse when you need to control Slack from Clawdbot via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
PollyReach
@pollyreachPollyReach gives every AI agent a phone number and the ability to get things done over the phone — finding contacts, making calls, and completing tasks. Just...
imap-smtp-email
@gzlicanyiRead and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip
Answer Overflow
@rhyssullivanSearch indexed Discord community discussions via Answer Overflow. Find solutions to coding problems, library issues, and community Q&A that only exist in Discord conversations.