huawei-cloud-maas-tokens-usage

Installation
SKILL.md

Huawei Cloud MaaS Tokens Usage Monitoring Skill

Overview

Query Huawei Cloud MaaS (Model as a Service) usage statistics via the ShowStatistics API, including total tokens, prompt tokens, completion tokens, total requests, and total errors. Supports querying last 7 days, 14 days, 30 days, or custom time ranges. Default query type is MaaS preset service. AK/SK never leaves Python process memory.

Tool separation principle:

  • Python SDK signing — AK/SK signing via huaweicloudsdkcore.signer.Signer (credentials never leave Python process memory, never appear in ps -ef)
  • Python requests — HTTP POST to MaaS ShowStatistics endpoint (signed request sent from Python process only)
  • No hcloud CLI — MaaS ShowStatistics is not covered by KooCLI; pure Python REST + SDK signing

Security architecture:

  • AK/SK is read from environment variables (HW_ACCESS_KEY / HW_SECRET_KEY) or a credentials file by the Python script (never typed by user in conversation, never passed via CLI args, never exported to shell)
  • Temporary credentials add HW_SECURITY_TOKEN (passed as X-Security-Token header by the SDK signer)
  • Signing is performed by huaweicloudsdkcore.Signer inside the Python process; the signed Authorization header is sent to the MaaS endpoint only
  • AK/SK is never printed, never logged, never appears in ps -ef, never appears in conversation
  • No KMS dependency, no hcloud CLI dependency, no third-party skill dependency

⛔ Prohibited Operations (Security Constraints)

Installs
175
GitHub Stars
50
First Seen
Jun 4, 2026
huawei-cloud-maas-tokens-usage — huaweicloud/huaweicloud-skills