首页龙虾技能列表 › Minimax Usage Cn — Minimax工具

Minimax Usage Cn — Minimax工具

v1.1.0

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

1· 280·1 当前·1 累计
by @lanhaixuan·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/29
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's requirements, instructions, and included script are consistent with its stated purpose of checking Minimax Coding Plan usage and do not request unrelated credentials or perform unexpected network calls.
评估建议
This skill appears coherent and limited to querying the Minimax usage endpoint. Before installing: (1) Only provide the MINIMAX_API_KEY (do not reuse broader credentials). (2) If you add the cron example, review any notification webhook or email code you add — the example leaves webhook notification as a placeholder. (3) Confirm the endpoint (https://www.minimaxi.com) is the intended provider for your account. (4) Optionally inspect the included script to ensure logging or error handling meets y...
详细分析 ▾
用途与能力
Name/description match the actual behavior: the skill only needs curl and MINIMAX_API_KEY to call the documented Minimax endpoint and report usage. Nothing requested (no extra credentials, no unrelated binaries) appears out of scope.
指令范围
SKILL.md and the included script instruct the agent to call the Minimax API endpoint, parse the JSON response, and optionally emit JSON or human-readable output. The instructions do not read unrelated system files or environment variables, nor do they send data to third-party endpoints beyond the Minimax API (example cron shows where a user could add a webhook, but no external webhook is hard-coded).
安装机制
No install spec is provided (instruction-only with a bundled script), so nothing is downloaded or installed automatically. The included shell script runs locally and uses only curl and standard shell tools.
凭证需求
Only MINIMAX_API_KEY is required and is declared as the primary credential. That key is appropriate and necessary for the described API calls; no unrelated secrets or config paths are requested.
持久化与权限
The skill is user-invocable and not forced-always. It does not modify other skills or agent-wide settings. The README suggests a cron example (user-controlled) but the skill itself does not install persistence.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.1.02026/3/14

minimax-usage-cn v1.1.0 introduces JSON output mode and cron usage guidance. - Added support for JSON output via --json or -j flag for easier scripting and integration. - Provided detailed instructions for cron job setup, including automated alert examples. - Enhanced documentation: removed trigger/example metadata, clarified usage scenarios, and simplified structure. - Updated requirements metadata: changed "tools" to "bins" for dependency listing. - Minor doc cleanups for clarity and actionable guidance.

● 无害

安装命令 点击复制

官方npx clawhub@latest install minimax-usage-cn
镜像加速npx clawhub@latest install minimax-usage-cn --registry https://cn.clawhub-mirror.com

技能文档

Monitor Minimax Coding Plan usage to stay within API limits.


目录结构

~/.openclaw/workspace/skills/minimax-usage-cn/
├── SKILL.md
└── scripts/
    └── minimax-usage.sh   # Main script

功能

  • Check current usage quota
  • Monitor 5-hour sliding window
  • 获取 usage alerts 之前 hitting limits

当...时 到 使用 Skill

Use this skill whenever:

  • 用户 asks 到 check Minimax usage
  • 之前 running large AI tasks
  • 当...时 approaching limit warnings

API Specification

Endpoint: 获取 https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains

Headers:

Authorization: Bearer 
Content-Type: application/json

注意: 此接口仅适用于国内版 www.minimaxi.com


响应 Fields

字段含义示例
remains_time订阅周期剩余时间 (秒),和5小时窗口无关8277752
current_interval_total_count周期总配额 (固定1500)1500
current_interval_usage_count当前窗口剩余可用次数1263
model_name模型名称MiniMax-M2.5
start_time / end_time当前5小时滑动窗口起止时间 (毫秒时间戳)1773558000000

计算公式(重要!)

# ❌ 错误理解
已用 = current_interval_usage_count  # 误以为这是"已用量"

# ✅ 正确理解 剩余 = current_interval_usage_count # 这是"剩余可用次数" 已用 = current_interval_total_count - current_interval_usage_count 使用率 = (current_interval_total_count - current_interval_usage_count) / current_interval_total_count 100%

示例:API 返回 current_interval_total_count=1500, current_interval_usage_count=1263

  • 剩余 = 1263 次
  • 已用 = 1500 - 1263 = 237 次
  • 使用率 = 237 / 1500 = 15.8%

状态阈值

剩余量使用率状态
>600<60%💚 GREEN
375-60060-75%⚠️ CAUTION
150-37575-90%⚠️ WARNING
<150>90%🚨 CRITICAL

输出 格式

🔍 Checking Minimax Coding Plan usage...
✅ Usage retrieved successfully:

📊 Coding Plan Status (MiniMax-M2.5): Used: 102 / 1500 prompts (6%) Remaining: 1398 prompts Window: 20:00 - 00:00 (UTC+8) Resets in: 约 1h 13m

💚 GREEN: 6% used. Plenty of buffer.

JSON 输出 Mode

For programmatic use, add --json or -j flag:

./minimax-usage.sh --json

Output:

{
  "status": "GREEN",
  "used": 102,
  "total": 1500,
  "remaining": 1398,
  "percent": 6,
  "model": "MiniMax-M2.5",
  "window_start": "20:00",
  "window_end": "00:00",
  "resets_in_seconds": 4380
}

Cron 定时检查

添加到 crontab 每小时检查一次:

# 编辑 crontab
crontab -e

# 添加以下行(每小时检查并记录) 0 cd /home/rocfly/.openclaw/workspace/skills/minimax-usage-cn/scripts && ./minimax-usage.sh >> /home/rocfly/.openclaw/workspace/logs/minimax-usage.log 2>&1

# 或者带通知(需要配置邮件或 webhook) 0 * cd /home/rocfly/.openclaw/workspace/skills/minimax-usage-cn/scripts && ./minimax-usage.sh --json | python3 -c " import sys, json data = json.load(sys.stdin) if data['percent'] > 75: print(f'⚠️ ALERT: {data[\"percent\"]}% used!') # 在此添加 webhook 通知 "

常见使用场景

场景命令
手动检查用量./minimax-usage.sh
静默检查(无输出)./minimax-usage.sh -q
JSON 格式输出./minimax-usage.sh --json
配合 cron 记录./minimax-usage.sh >> usage.log

Status Thresholds

使用率状态提示
0-60%💚 GREENPlenty of buffer
60-75%⚠️ CAUTIONTarget is 60%
75-90%⚠️ WARNINGApproaching limit
>90%🚨 CRITICALStop all AI work

Notes

  • 需要使用 Coding Plan API 键, 专用于 Coding Plan 套餐
  • Coding Plan 用量每5小时重置
  • 一个 prompt 约等于 15 次模型调用
  • current_interval_usage_count` 是剩余用量,不是已用量!
  • 窗口时间为 UTC+8 时区

错误 Handling

错误码含义解决方法
2013参数错误请检查请求参数
1004未授权/Token 不匹配请检查 API Key
2049无效的 API Key请检查 API Key
1002请求频率超限请稍后再试
2056超出 Coding Plan 资源限制请等待下一个时间段资源释放后,再次尝试
1000/1024/1033系统错误/内部错误请稍后再试
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务