minimax-token-plan-monitor

MiniMax Token Plan 用量监控 — 专为云部署龙虾(OpenClaw)设计,自动查询本周/5小时窗口用量、套餐余量、剩余调用次数及重置时间。支持 QQ/Discord/Telegram 多通道通知,可配置告警阈值。触发词:minimax额度查询、token plan用量、本周用量、剩余次数、订阅状态、minimax coding plan、minimax配额。

3,891 stars

Best use case

minimax-token-plan-monitor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

MiniMax Token Plan 用量监控 — 专为云部署龙虾(OpenClaw)设计,自动查询本周/5小时窗口用量、套餐余量、剩余调用次数及重置时间。支持 QQ/Discord/Telegram 多通道通知,可配置告警阈值。触发词:minimax额度查询、token plan用量、本周用量、剩余次数、订阅状态、minimax coding plan、minimax配额。

Teams using minimax-token-plan-monitor should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/minimax-token-plan-monitor/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/bbzhi177/minimax-token-plan-monitor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/minimax-token-plan-monitor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How minimax-token-plan-monitor Compares

Feature / Agentminimax-token-plan-monitorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

MiniMax Token Plan 用量监控 — 专为云部署龙虾(OpenClaw)设计,自动查询本周/5小时窗口用量、套餐余量、剩余调用次数及重置时间。支持 QQ/Discord/Telegram 多通道通知,可配置告警阈值。触发词:minimax额度查询、token plan用量、本周用量、剩余次数、订阅状态、minimax coding plan、minimax配额。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# MiniMax Token Plan 用量监控 📊

监控 MiniMax Token Plan 订阅套餐的实时用量,支持多通道通知和告警阈值配置。

## 功能特性

- 🔄 **自动查询**:5小时窗口 + 本周用量同时监控
- 🔔 **多通道通知**:支持 QQ / Discord / Telegram 推送
- ⚙️ **告警阈值**:可配置用量百分比告警
- ⏰ **定时巡检**:通过 cronjob 实现每日定时检查
- 🇨🇳 **国内适配**:针对国内版 MiniMax 平台优化

---

## 环境配置

在 `~/.env` 中配置以下变量:

```bash
# MiniMax 账号(账号 + 密码)
MINIMAX_PHONE=your_account_here
MINIMAX_PASSWORD=your_password_here

# 通知配置(可选,留空则只输出日志)
QQBOT_PORT=37701
# QQ/Discord/Telegram 通知通过 OpenClaw 消息通道发送
```

---

## 快速使用

### 手动查询

```bash
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 原始输出

```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 点

```bash
# 在 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` 中修改:

```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 官方文档。

Related Skills

FP&A Command Center — Financial Planning & Analysis Engine

3891
from openclaw/skills

You are a senior FP&A professional. You build financial models, run variance analysis, produce board-ready reports, and turn raw numbers into strategic decisions. You work with whatever data the user provides — spreadsheets, CSV, pasted numbers, or verbal estimates.

Finance & Analytics

Exit Strategy & Business Valuation Planner

3891
from openclaw/skills

You are an M&A and exit planning advisor. Help founders and business owners build a structured exit strategy — whether they're planning an acquisition, IPO, management buyout, or orderly wind-down.

Business Strategy & Growth

Event Planner Pro

3891
from openclaw/skills

Plan, execute, and measure business events — conferences, webinars, workshops, product launches, networking events, trade shows, and corporate gatherings. Complete event lifecycle from concept to post-event ROI analysis.

Workflow & Productivity

IT Disaster Recovery Plan Generator

3891
from openclaw/skills

Build production-ready disaster recovery plans that actually get followed when things break.

DevOps & Infrastructure

Data Migration Planner

3891
from openclaw/skills

Plan, execute, and validate data migrations between systems. Covers schema mapping, ETL pipeline design, rollback strategies, and post-migration validation.

Workflow & Productivity

Competitor Monitor

3891
from openclaw/skills

Tracks and analyzes competitor moves — pricing changes, feature launches, hiring, and positioning shifts

Data & Research

Compensation & Salary Benchmarking Planner

3891
from openclaw/skills

Build data-driven compensation structures that attract talent without overpaying. Covers base salary bands, equity/bonus frameworks, geographic differentials, and total rewards packaging.

HR & Compensation Management

Change Management Planner

3891
from openclaw/skills

Plan, communicate, and execute organizational change with structured frameworks. Covers technology rollouts, process changes, restructuring, and cultural shifts.

Workflow & Productivity

Capacity Planner

3891
from openclaw/skills

Plan team and infrastructure capacity before it becomes a crisis.

Workflow & Productivity

Business Continuity Planner

3891
from openclaw/skills

Build a complete Business Continuity Plan (BCP) and Disaster Recovery (DR) strategy for any organization.

Business Continuity & DR

Budget Planner

3891
from openclaw/skills

Plan and track budgets using your AI agent. Works for personal finance, project budgets, or department spending.

Workflow & Productivity

Agent Observability & Monitoring

3891
from openclaw/skills

Score, monitor, and troubleshoot AI agent fleets in production. Built for ops teams running 1-100+ agents.