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…
от 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 noproject_idrequest 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--namefilter. This is a read-only enhancement built on the existinghuawei-cloud-voucher-listquery logic. - Filter by status / name / coupon-id / coupon-type —
--status(BSS codes 1-5 or aliasesavailable/used/expired/reclaimed),--name(client-side substring),--coupon-id(server-side),--coupon-type(server-side).--statusand--project-idcompose. - Near-expiry / expired views —
--expiring N(expiring within N days) and--expired(already expired), based onvalid_time/expire_time, combinable with--project-id. - Per-project usage-rate analysis —
--usage-analysisaggregatesface_valuevsbalanceper 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
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkcore huaweicloudsdkbssfor the SDK fallback path. - 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.
- IAM permission — read-only
bss:coupon:list; addbss:order:viewwhen using--project-id/--usage-analysis(order linkage). Least-privilege policy in references/iam-policies.md. - Python 3.8+ (standard library only — argparse / json / subprocess).
- Outbound HTTPS access to
bss.myhuaweicloud.com. - Region — BSS is a global service;
cn-north-1is 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) keepproject_id = "-"and are excluded when--project-idis given; use--usage-analysis(without a project filter) to see every project bucket including unattributed ("-").
Workflow
- Confirm the target region (default
cn-north-1; BSS is global). - Optionally confirm KooCLI readiness (read-only): check the active credential profile is configured for BSS.
- 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. - Read the result — table for humans,
--jsonfor downstream tooling,--names-onlyfor a compact inventory, usage table for per-project stats. - 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
Установить 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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic