Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

huawei-cloud-bss-voucher-query

БесплатноЗапускает вложенные скриптыНе проверен

Query Huawei Cloud BSS (费用中心) vouchers / coupons with enterprise-project (企业项目) filtering. Reads the account's coupon list via KooCLI `hcloud BSS…

huaweicloudskillот huaweicloudskill204 установки в других каталогах

Об этом скилле

Huawei Cloud BSS Voucher Query (Enterprise-Project Aware)

Overview

Query the voucher / coupon list of a Huawei Cloud account through KooCLI hcloud BSS ListSubCustomerCoupons (official read-only GET /v2/promotions/benefits/coupons, verified in the huaweicloudsdkbss v2 client _list_sub_customer_coupons_http_info metadata; the SDK fallback uses GlobalCredentials + global BSS endpoint). The skill adds an enterprise project (企业项目) dimension to voucher queries so multi-project users can filter vouchers by project, track near-expiry/expired vouchers per project, and see a per-project usage-rate summary for financial apportionment (财务分摊/对账) and reconciliation.

Capability Scope

  • List vouchers (full-field table / --json / --names-only) with automatic offset paging (BSS page limit 100) and a strict write-intent guard (read-only).
  • Filter by enterprise project — --project-id <id>. New capability of this skill: the BSS coupon-list API carries no project_id request parameter and no project field in its coupon records (it is a global / domain API). The script therefore attributes each coupon to an enterprise project through the customer order linkage (coupon.order_id / lock_order_id → hcloud BSS ListCustomerOrders → order.enterprise_projects[]), then filters locally — the same client-side strategy as the --name filter. This is a read-only enhancement built on the existing huawei-cloud-voucher-list query logic.
  • Filter by status / name / coupon-id / coupon-type — --status (BSS codes 1-5 or aliases available/used/expired/reclaimed), --name (client-side substring), --coupon-id (server-side), --coupon-type (server-side). --status and --project-id compose.
  • Near-expiry / expired views — --expiring N (expiring within N days) and --expired (already expired), based on valid_time / expire_time, combinable with --project-id.
  • Per-project usage-rate analysis — --usage-analysis aggregates face_value vs balance per enterprise project (count / total face / total balance / total used / usage rate) for finance apportionment and reconciliation.

Out of Scope

Every mutating BSS operation (create / reclaim / transfer / adjust coupon quotas, claim / send / freeze / cancel coupons). The write-intent guard rejects those before any command is executed.

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkcore huaweicloudsdkbss for the SDK fallback path.
  2. Active credential profile — configure credentials out-of-band (KooCLI configure in your terminal, or credential environment variables). Never paste AK/SK into chat; the script never reads, echoes, or stores secrets itself — authentication is delegated entirely to the hcloud profile / SDK environment.
  3. IAM permission — read-only bss:coupon:list; add bss:order:view when using --project-id / --usage-analysis (order linkage). Least-privilege policy in references/iam-policies.md.
  4. Python 3.8+ (standard library only — argparse / json / subprocess).
  5. Outbound HTTPS access to bss.myhuaweicloud.com.
  6. Region — BSS is a global service; cn-north-1 is the default.

Data-availability note: the coupon-list API (ListSubCustomerCoupons) response carries no per-coupon enterprise project. Project attribution is derived client-side from the coupon's order linkage. Coupons with no attributable order (e.g. never-used vouchers) keep project_id = "-" and are excluded when --project-id is given; use --usage-analysis (without a project filter) to see every project bucket including unattributed ("-").

Workflow

  1. Confirm the target region (default cn-north-1; BSS is global).
  2. Optionally confirm KooCLI readiness (read-only): check the active credential profile is configured for BSS.
  3. Run the list script with the desired output mode, filters, and — when a project dimension is needed — --project-id, --expiring, --expired, and/or --usage-analysis.
  4. Read the result — table for humans, --json for downstream tooling, --names-only for a compact inventory, usage table for per-project stats.
  5. Handle empty / error cases per the Error Handling table below (explicit hints for empty region, 403, missing AK/SK, write-intent guard).

Core Commands

# Full-field table (default)
python3 scripts/list_coupons.py --region cn-north-1

# Raw JSON of every returned field
python3 scripts/list_coupons.py --json

# Compact voucher (plan-name) list only
python3 scripts/list_coupons.py --names-only

# Filter by enterprise project (client-side, via order linkage)
python3 scripts/list_coupons.py --project-id {project_id}

# Filter by enterprise project + voucher status (compo
Полный SKILL.md на ClawHub

Установить huawei-cloud-bss-voucher-query в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл huawei-cloud-bss-voucher-query?

Query Huawei Cloud BSS (费用中心) vouchers / coupons with enterprise-project (企业项目) filtering. Reads the account's coupon list via KooCLI `hcloud BSS ListSubCustomerCoupons` (read-only GET /v2/promotions/benefits/coupons, with SDK fallback). Supports listing by project ID (`--project-id`, attributed through the customer order => enterprise-project linkage because the coupon API carries no project_id), status (`--status available/used/expired`), name, coupon-id, coupon-type, near-expiry/expired views (`--expiring` / `--expired`) and a per-project usage-rate analysis (`--usage-analysis`). Strictly read-only. Triggers include: "代金券盘点", "按项目查询代金券", "企业项目代金券", "查询代金券", "优惠券列表", "按项目ID筛选代金券", "代金券到期", "代金券使用率", "代金券余额", "费用管理", "list BSS coupons", "query vouchers by project", "coupon inventory", "voucher list by enterprise project", "enterprise project voucher query", "billing voucher query", "华为云代金券".

Как установить скилл huawei-cloud-bss-voucher-query?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл huawei-cloud-bss-voucher-query запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить huawei-cloud-bss-voucher-query с