Install
openclaw skills install kimi-quota-monitorKimi (Kimi Chat) membership quota monitoring and daily reporting. Use when the user needs to (1) check current Kimi usage percentage, (2) set up or configure...
openclaw skills install kimi-quota-monitor抓取 Kimi 会员额度百分比,计算周期抵扣逻辑,推送到微信。
本 skill 需要你填入自己的认证信息才能运行。打开 scripts/fetch_quota.py,修改用户配置区(文件顶部):
将 Kimi 登录 cookies 导出为 JSON 文件,放在脚本同级目录(或指定绝对路径)。
格式(Playwright cookies 数组):
[
{"name": "a1", "value": "xxx", "domain": ".kimi.com", "path": "/"},
{"name": "web_session", "value": "xxx", "domain": ".kimi.com", "path": "/"}
]
导出方式:在已登录 Kimi 的浏览器中,打开开发者工具 → Application → Cookies → 复制 .kimi.com 域下的所有 cookies,粘贴为 JSON 数组保存到 kimi_cookies.json。
获取你的 openclaw-weixin 用户 ID:
openclaw message list-accounts --channel openclaw-weixin
将 TARGET_ID 替换为你的 ID,格式为 xxx@im.wechat。
在已登录 Kimi 的浏览器中,打开开发者工具 → Application → Local Storage → https://www.kimi.com,复制以下键值:
access_tokenrefresh_tokenmsh_user_idmsh_user_subscription_data填入 LS_DATA 字典中。
⚠️ 这些是敏感认证信息,请勿泄露给他人。
配置完成后,在 skill 目录执行:
python3 scripts/fetch_quota.py
脚本会自动:
kimi.com/membership/subscription添加到 crontab:
8 7 * * * /usr/bin/python3 /path/to/kimi-quota-monitor/scripts/fetch_quota.py >> /path/to/logs/kimi_quota.log 2>&1
playwright Python package (pip install playwright)google-chrome or chromium)openclaw CLI with openclaw-weixin channel configuredkimi_cookies.json — Kimi login cookies (用户自行配置)100% / month_daysSee references/quota_rules.md for full calculation details, CSS selectors, and message template.
fetch_quota.py — Main script: fetch quota, calculate, push to WeChat
quota_rules.md — Calculation rules, page URLs, selectors, message format| File | Purpose |
|---|---|
scripts/fetch_quota.py | Core automation script (requires user config) |
references/quota_rules.md | Calculation rules and reference |
kimi_cookies.json | Kimi login cookies (user-provided, not included) |