code-review: review the fakes' contract assumptions, diff external call sites against proven patterns, treat declared verification gaps as review scope

From the ai-cowork #154 rollout: a dockerode attach without hijack:true shipped
through three review rounds — the fake's stream accepted writes, the tests were
green, and the MR honestly declared the helper spawn as manually-smoke-only.
All three nets had the same hole: the boundary the tests fake.
This commit is contained in:
Markus Graf
2026-12-01 09:54:42 +01:00
parent a4dec89d08
commit c6a7ae3da0
3 changed files with 20 additions and 1 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.