360 Secure SkillHub
360 安全技能中心

Minimax Usage

该 Skill 通过一个 Shell 脚本调用 MiniMax 接口获取编码套餐的剩余请求数与重置时间,输出格式化文本告警;支持 --threshold 参数,仅在剩余百分比低于阈值时输出,便于配合定时任务使用。需要 MINIMAX_API_KEY 环境变量,并依赖 curl 与 jq。

khaney64
khaney64
热度 64.83
最近更新 2026-05-11 17:26:00
分类:自动化依赖:代码执行 / 第三方 API应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add minimax-usage-2
Metadata
name
minimax-usage
description
Check MiniMax coding plan usage/credits remaining. Requires MINIMAX_API_KEY environment variable.
metadata
{"openclaw":{"emoji":"💳","requires":{"bins":["curl","jq"],"env":["MINIMAX_API_KEY"]}}}

MiniMax Usage

Check your MiniMax coding plan credits remaining.

Usage

# Check remaining credits
bash /home/claw/.openclaw/workspace/skills/minimax-usage/scripts/minimax-usage.sh

# Only alert when remaining drops below 20%
bash /home/claw/.openclaw/workspace/skills/minimax-usage/scripts/minimax-usage.sh --threshold 20

Options

Flag Description
--threshold <percent> Only output when remaining % is below this value. If omitted, always outputs.

Output

Returns a Discord-formatted message:

  • Title with model name (warning icon when below threshold)
  • Remaining requests out of total with percentage
  • Reset time in Eastern Time
  • Time left in H:MM:SS

Example: Below threshold alert

When remaining usage falls below the configured threshold:

⚠️ MiniMax Usage Alert — MiniMax-M1
Remaining: 42 of 500 requests (8.4%)
Resets: Feb 17, 2026 12:00 AM ET
Time left: 7:23:15

When above the threshold, the command produces no output and exits with code 0.

Cron Job

The --threshold flag makes this ideal for a cron job that runs periodically and only sends an alert when available credits drop below a percentage:

# Check every 30 minutes, alert if below 20%
# Requires MINIMAX_API_KEY to be set in the cron environment
*/30 * * * * bash /home/claw/.openclaw/workspace/skills/minimax-usage/scripts/minimax-usage.sh --threshold 20 | discord-webhook

No output is produced when usage is above the threshold, so downstream commands (e.g. a webhook) are only triggered when credits are running low.