ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

zai-usage

Monitor Z.AI GLM Coding Plan usage and quota limits. Track token consumption, view reset times, and check subscription status.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/1vecera/zai-usage
Or

What This Skill Does

The zai-usage skill provides OpenClaw agents with the capability to interface directly with Z.AI GLM account metrics. By monitoring real-time token consumption, this skill prevents unexpected service interruptions by tracking rolling 5-hour windows and monthly quota limits. It acts as a bridge between the agent's workspace and the Z.AI subscription dashboard, parsing complex API responses into actionable insights regarding web tool availability, plan tiers, and remaining credit thresholds. This ensures that long-running coding tasks or high-complexity model requests are managed within the constraints of your current subscription.

Installation

To integrate this skill into your environment, use the OpenClaw package manager by executing: clawhub install openclaw/skills/skills/1vecera/zai-usage. After installation, ensure you have the mandatory system dependencies installed: curl, jq, and optionally bc for refined mathematical output. Navigate to https://z.ai/manage-apikey/subscription to retrieve your authentication credentials. Extract your production JWT token from your browser's Local Storage (found under the key 'z-ai-open-platform-token-production') and save it securely in ~/.openclaw/secrets/zai.env using the format ZAI_JWT_TOKEN=your_token_here. Once configured, the agent will automatically utilize the script paths defined in the local repository to query usage data.

Use Cases

This skill is indispensable for power users who rely on Z.AI for automated coding, refactoring, or large-scale document analysis. It is best utilized in scenarios where the agent needs to estimate if the current quota allows for a resource-heavy task, such as scaffolding a new repository or performing deep semantic analysis. By proactive checking, the agent can pause operations if it identifies that the usage has hit the 80% threshold (🔴) before a critical error occurs, or suggest switching to a more token-efficient model.

Example Prompts

  1. "How's our Z.AI usage looking today?"
  2. "Check our credit usage and let me know if we are at risk of hitting our monthly limit."
  3. "Are we running low on credits for the coding plan right now?"

Tips & Limitations

Always ensure your JWT token remains confidential and is restricted to the specified configuration file. The skill relies on external API connectivity; therefore, intermittent network issues might result in stale data. Users should also note that the status icons (✅, ⚠️, 🔴) provide a quick visual heuristic, but they should not be considered a substitute for the exact numerical values provided in the raw output if precise planning is required. Frequent polling is discouraged to avoid hitting platform-level rate limits on the Z.AI authentication endpoint.

Metadata

Author@1vecera
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-1vecera-zai-usage": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#zai#usage#monitoring#token-management#developer-tools
Safety Score: 4/5

Flags: network-access, file-read