usage-query-skill

Run the bundled Node.js script to fetch GLM Coding Plan usage data.

119|17|Updated Dec 19, 2025
One-click install
npx skills add https://github.com/zai-org/zai-coding-plugins --skill usage-query-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: usage-query-skill
Source: https://github.com/zai-org/zai-coding-plugins/tree/main/plugins/glm-plan-usage/skills/usage-query-skill
Command: npx skills add https://github.com/zai-org/zai-coding-plugins --skill usage-query-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill runs the usage query script to retrieve account usage information for GLM Coding Plan. It is designed to be used when invoked by the usage-query-agent to fetch current usage metrics.

Core Features & Use Cases

  • Accurate usage retrieval: Executes the bundled script to fetch model usage, tool usage, and quota limits.
  • Platform-aware reporting: Automatically adapts to ZAI or ZHIPU endpoints based on ANTHROPIC_BASE_URL.
  • Error visibility: Returns success payload or detailed error information to aid troubleshooting.

Quick Start

Run the usage query script from the plugin root or provide an absolute path:

  • node scripts/query-usage.mjs
  • node /absolute/path/to/glm-plan-usage/skills/usage-query-skill/scripts/query-usage.mjs

Frequently Asked Questions about usage-query-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my GLM Coding Plan usage and quota limits?

Query your GLM Coding Plan usage by running the bundled Node.js script, which fetches current model usage, tool usage, and quota limits from your account. Execute `node scripts/query-usage.mjs` from the plugin root or provide an absolute path to the script.

Can I retrieve usage stats for different endpoints or platforms?

Yes. The usage query script automatically adapts to your ZAI or ZHIPU endpoints based on the ANTHROPIC_BASE_URL environment variable, so you get platform-aware reporting without manual configuration.

What does the usage query script return on success or failure?

On success, the script outputs a JSON payload containing your account usage metrics. On failure, it returns detailed error information to help you troubleshoot the issue.

How do I run the usage query script on Windows?

Run the usage query script using `node scripts/query-usage.mjs` from the plugin root, or provide the absolute path: `node /absolute/path/to/glm-plan-usage/skills/usage-query-skill/scripts/query-usage.mjs`. The script handles Windows path requirements automatically.

When would I use the usage query script instead of manual API calls?

Use this Skill when you need a single, deterministic execution that enforces one-time runs and guarantees a JSON payload or error report—ideal for automated workflows where consistent output format is required.

Does the usage query script work with the GLM Coding Plan specifically?

Yes. The script is designed to query account usage information exclusively for the GLM Coding Plan, retrieving model usage, tool usage, and quota metrics specific to that plan.