integrations: rename pi-zai-usage to zai-usage

This commit is contained in:
Markus Graf
2026-12-01 09:54:59 +01:00
parent a4dec89d08
commit 5254a480a2
2 changed files with 0 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
---
name: zai-usage
description: Query current Z.ai GLM Coding Plan quota and usage (5-hour/weekly credits, model tokens, MCP calls). Use when the user asks about their Z.ai usage, remaining credits, quota, or rate-limit status.
---
Run the script once and report the result:
```bash
bash ~/.pi/agent/skills/zai-usage/scripts/zai-usage.sh # last 24h window
bash ~/.pi/agent/skills/zai-usage/scripts/zai-usage.sh 168 # last 7 days
```
- Credentials come from `~/.pi/agent/auth.json` (`zai.key`) — never print the key.
- Endpoints: `api.z.ai/api/monitor/usage/{model-usage,tool-usage,quota/limit}` (same as Z.ai's Claude Code plugin).
- Present 5-hour and weekly credits (used/remaining/reset) plus model token totals in a small table.
- If the key is missing, tell the user to run `/login zai` in pi first.