# Send glm-plan-usage to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "openclaw-glm-plan-usage",
    "name": "glm-plan-usage",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/OrientLuna/openclaw-glm-plan-usage",
    "canonicalUrl": "https://clawhub.ai/OrientLuna/openclaw-glm-plan-usage",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/openclaw-glm-plan-usage",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-glm-plan-usage",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "docs/INSTALLATION.md",
      "SKILL.md",
      "scripts/query-usage.sh",
      "references/api-endpoints.md",
      "README.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "openclaw-glm-plan-usage",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-12T02:53:19.359Z",
      "expiresAt": "2026-05-19T02:53:19.359Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-glm-plan-usage",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-glm-plan-usage",
        "contentDisposition": "attachment; filename=\"openclaw-glm-plan-usage-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "openclaw-glm-plan-usage"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/openclaw-glm-plan-usage"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/openclaw-glm-plan-usage",
    "downloadUrl": "https://openagent3.xyz/downloads/openclaw-glm-plan-usage",
    "agentUrl": "https://openagent3.xyz/skills/openclaw-glm-plan-usage/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-glm-plan-usage/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-glm-plan-usage/agent.md"
  }
}
```
## Documentation

### GLM Plan Usage Skill

查询 GLM 编码套餐使用统计的 OpenClaw 技能。
OpenClaw skill for querying GLM coding plan usage statistics.

### 功能特性 / Features

配额监控: 查看 Token 使用量（5小时）和 MCP 使用量（1个月）
Quota Monitoring: View token usage (5-hour) and MCP usage (1-month)
模型使用: 显示 24 小时内的 Token 数和调用次数
Model Usage: Display token count and call count within 24 hours
工具使用: 跟踪 24 小时内的 MCP 工具使用情况
Tool Usage: Track MCP tool usage within 24 hours
自动检测: 自动从 OpenClaw 配置中检测 GLM 编码套餐提供商
Auto Detection: Automatically detect GLM coding plan provider from OpenClaw configuration
双语支持: 支持中文和英文输出
Bilingual Support: Support Chinese and English output

### 依赖要求 / Requirements

curl - HTTP 客户端（通常预装） | HTTP client (usually pre-installed)
jq - JSON 处理器 | JSON processor

如需安装 jq：
To install jq:

sudo apt-get install jq  # Linux
brew install jq           # macOS

### 安装 / Installation

将此仓库克隆到本地：
Clone this repository to local:

git clone https://github.com/OrientLuna/openclaw-glm-plan-usage.git
cd openclaw-glm-plan-usage

复制技能文件到 OpenClaw 技能目录：
Copy skill files to OpenClaw skills directory:

cp -r . ~/.openclaw/skills/glm-plan-usage/
chmod +x ~/.openclaw/skills/glm-plan-usage/scripts/query-usage.sh

确保已配置 GLM 编码套餐提供商（见下方配置说明）
Ensure GLM coding plan provider is configured (see Configuration below)

### 直接运行脚本 / Run Script Directly

bash ~/.openclaw/skills/glm-plan-usage/scripts/query-usage.sh

### 通过 OpenClaw 技能调用 / Via OpenClaw Skill

openclaw /glm-plan-usage:usage-query

### 语言切换 / Language Switching

脚本会自动检测语言环境。您也可以通过环境变量强制指定语言：
The script automatically detects language environment. You can also force language via environment variable:

# 中文输出 / Chinese output
OPENCLAW_LANGUAGE=zh bash ~/.openclaw/skills/glm-plan-usage/scripts/query-usage.sh

# 英文输出 / English output
OPENCLAW_LANGUAGE=en bash ~/.openclaw/skills/glm-plan-usage/scripts/query-usage.sh

### 示例输出 / Sample Output

📊 GLM 编码套餐使用统计 / GLM Coding Plan Usage Statistics

提供商 / Provider: zhipu
统计时间 / Statistics Time: 2026-02-13 20:30:15

配额限制 / Quota Limits
---
  Token 使用 (5小时) / Token Usage (5-hour): 45.2%
  MCP 使用 (1个月) / MCP Usage (1-month):   12.3%  (15000/120000 秒 / sec) [LEVEL_4]

模型使用 (24小时) / Model Usage (24 hours)
---
  总 Token 数 / Total Tokens:  12,500,000
  总调用次数 / Total Calls:  1,234

工具使用 (24小时) / Tool Usage (24 hours)
---
  bash: 156 次 / times
  file-read: 89 次 / times
  web-search: 34 次 / times

### 配置说明 / Configuration

技能会自动读取 ~/.openclaw/openclaw.json 中的提供商配置。
The skill automatically reads provider configuration from ~/.openclaw/openclaw.json.

### 示例配置 / Sample Configuration

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "zhipu/glm-4-flash"
      }
    }
  },
  "models": {
    "providers": {
      "zhipu": {
        "baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
        "apiKey": "your-api-key-here"
      }
    }
  }
}

重要: baseUrl 必须包含 api/coding/paas/v4 或 open.bigmodel.cn，技能才能识别其为 GLM 编码套餐提供商。
Important: baseUrl must contain api/coding/paas/v4 or open.bigmodel.cn for the skill to recognize it as a GLM coding plan provider.

### 提供商检测逻辑 / Provider Detection Logic

技能会检查以下条件来识别 GLM 编码套餐提供商：
The skill checks the following conditions to identify GLM coding plan providers:

baseUrl 包含 api/coding/paas/v4 或 open.bigmodel.cn
baseUrl contains api/coding/paas/v4 or open.bigmodel.cn
提供商名称包含 coding、glm-coding、zhipu 或 bigmodel
Provider name contains coding, glm-coding, zhipu, or bigmodel

### API 端点 / API Endpoints

技能查询三个监控端点：
The skill queries three monitoring endpoints:

端点Endpoint用途Purpose/api/monitor/usage/quota/limit配额百分比（5小时 Token，1个月 MCP）Quota percentage (5-hour token, 1-month MCP)/api/monitor/usage/model-usage24小时模型使用统计24-hour model usage statistics/api/monitor/usage/tool-usage24小时 MCP 工具使用24-hour MCP tool usage

详见 API 文档。
See API Documentation for details.

### 错误处理 / Error Handling

脚本为常见问题提供友好的错误提示：
The script provides friendly error messages for common issues:

缺少依赖工具（curl、jq） | Missing dependencies (curl, jq)
缺少或无效的 OpenClaw 配置 | Missing or invalid OpenClaw configuration
提供商未配置为 GLM 编码套餐 | Provider not configured as GLM coding plan
API 认证失败 | API authentication failed
网络超时 | Network timeout

### "缺少依赖工具，请安装: jq" / "Missing dependency, please install: jq"

使用包管理器安装 jq：
Install jq using package manager:

sudo apt-get install jq  # Linux
brew install jq           # macOS

### "未找到配置 GLM 编码套餐的提供商" / "No GLM coding plan provider configured"

确保提供商的 baseUrl 包含 api/coding/paas/v4。更新配置：
Ensure the provider's baseUrl contains api/coding/paas/v4. Update configuration:

{
  "models": {
    "providers": {
      "your-provider": {
        "baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
        "apiKey": "your-key"
      }
    }
  }
}

### "认证失败，请检查 API 密钥配置" / "Authentication failed, please check API key"

验证 API 密钥是否正确：
Verify API key is correct:

jq -r '.models.providers.zhipu.apiKey' ~/.openclaw/openclaw.json

### 贡献指南 / Contributing

欢迎贡献！请遵循以下步骤：
Contributions welcome! Please follow these steps:

Fork 本仓库 | Fork this repository
创建特性分支 (git checkout -b feature/amazing-feature) | Create feature branch
提交更改 (git commit -m 'Add some amazing feature') | Commit changes
推送到分支 (git push origin feature/amazing-feature) | Push to branch
开启 Pull Request | Open Pull Request

### 许可证 / License

MIT License - 详见 LICENSE 文件。
MIT License - See LICENSE file for details.

### 致谢 / Acknowledgments

原始实现: zai-coding-plugins | Original implementation
参考实现: opencode-glm-quota | Reference implementation
OpenClaw 集成: 本技能 | OpenClaw integration: This skill

### 相关资源 / Resources

OpenClaw 文档 | OpenClaw Documentation
GLM 编码套餐 | GLM Coding Plan
API 文档 | API Documentation
安装指南 | Installation Guide
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: OrientLuna
- Version: 1.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-12T02:53:19.359Z
- Expires at: 2026-05-19T02:53:19.359Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/openclaw-glm-plan-usage)
- [Send to Agent page](https://openagent3.xyz/skills/openclaw-glm-plan-usage/agent)
- [JSON manifest](https://openagent3.xyz/skills/openclaw-glm-plan-usage/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/openclaw-glm-plan-usage/agent.md)
- [Download page](https://openagent3.xyz/downloads/openclaw-glm-plan-usage)