huawei-cloud-voucher-send
БесплатноЗапускает вложенные скриптыНе проверен1. Issue (发放) new Huawei Cloud BSS (费用中心) vouchers / coupons to sub-customers / partners through KooCLI (hcloud BSS CreatePartnerCoupons — mutating POST…
от wlc-dev396 установок в других каталогахОб этом скилле
Huawei Cloud BSS Voucher Send (发放代金券给子客户/合作伙伴)
Overview
Issue new Huawei Cloud BSS vouchers / coupons to one or more sub-customer /
partner accounts through the KooCLI issue-coupon operation
(CreatePartnerCoupons, hcloud service BSS) on the official
issue-coupon API, POST /v2/promotions/benefits/partner-coupons, verified in
the huaweicloudsdkbss v2 client _create_partner_coupons_http_info
metadata). When hcloud is not installed the skill falls back to the official
huaweicloudsdkbss v2 SDK (BssClient.create_partner_coupons).
Architecture:
agent → python3 scripts/send_voucher.py --quota-id <q> --customer-id <c> --face-value <v> --confirm
→ hcloud BSS CreatePartnerCoupons --cli-region=<region> ... (mutating POST)
→ Huawei Cloud BSS OpenAPI (global endpoint) → coupon_infos / error_details
→ idempotency ledger (per customer) + human summary / --json
(hcloud binary missing) → fallback: huaweicloudsdkbss v2 BssClient.create_partner_coupons
Key properties:
- Write by design, safe by default — issuing a coupon moves money / benefit
to the target account and is normally irreversible. A live send requires the
explicit
--confirmflag; without it the run stops and prints a warning.--dry-runpreviews the exact request (including the ledger skips) without issuing anything. - Issuance source & the coupon code — a new coupon has no 券码 before it is
issued: the BSS issue API selects the coupon source by coupon quota
(
quota_id, an 额度ID obtained fromListQuotaCoupons), and returns the generatedcoupon_id/ 券码 for each target.coupon_codeis therefore a response-only field; this skill correctly parameterises the request withquota_id+face_valueinstead of a pre-existing code. (The Spec placeholder operationSendSubCustomerCouponsdoes not exist in the official API and is accepted only as a naming alias ofCreatePartnerCoupons.) - Batch — many sub-customers are issued in a single API call; the response
reports per-customer successes (
coupon_infos) and per-customer failures (error_details). - Idempotent / no double-issue — a per-customer natural key (quota + customer
- face value + expiry + memo + limits) is stored in a local ledger. On retry, customers already issued inside the idempotency window are skipped, so re-running a partially failed batch only retries the failures.
- CLI first, SDK fallback — KooCLI is the primary path; when the KooCLI
binary is absent the script falls back to
huaweicloudsdkbssv2. BSS is a global service, so the SDK path usesGlobalCredentials+with_endpoints(https://bss.myhuaweicloud.com). Credentials are resolved byconfig.py(hcloud profile for the CLI path; standard environment variables for the SDK path) — never handled by the skill. - Offline-testable — validation, batch construction, idempotency, error grading, SDK fallback and all output modes are covered by unit tests that mock the hcloud subprocess.
Out of scope: coupon queries (use the read-only sibling skill), coupon reclaim / return / freeze / cancel, and the account-to-account transfer semantic (a different BSS operation).
Prerequisites
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkcore huaweicloudsdkbssto enable the SDK fallback path. - Credential profile — configure credentials out-of-band (hcloud configure
in your terminal, or the standard credential environment variables). Never
paste AK/SK into chat;
config.pyreads the hcloud profile / environment and never echoes or stores secrets. - IAM write permission — the issue-coupon action (least-privilege policy in references/iam-policies.md). The calling identity must be a distributor / partner of the target sub-customers.
- A coupon quota (
quota_id) — the source of the coupon to issue; query it withhcloud BSS ListQuotaCoupons --cli-region=cn-north-1. - Python 3.8+ (standard library only for the command path — argparse / json / subprocess / decimal).
- Outbound HTTPS access to
bss.myhuaweicloud.com. - Region — BSS is a global service; use
cn-north-1(the default here).
Workflow
- Confirm the danger — issuing vouchers is a money-moving, irreversible
change. Obtain explicit user confirmation (the caller sets
--confirm); the skill refuses to send without it. - Resolve the source quota — query the coupon quota
(
hcloud BSS ListQuotaCoupons --cli-region=cn-north-1) to get thequota_idto issue from. - Prepare the batch — one or more target sub-customer account IDs
(
--customer-id,--customer-ids, or--customers-file) and the coupon--face-value(+ optional validity window / limits / memo). - Preview — run with
--dry-runto inspect the exact re
Установить huawei-cloud-voucher-send в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-voucher-send?
1. Issue (发放) new Huawei Cloud BSS (费用中心) vouchers / coupons to sub-customers / partners through KooCLI (hcloud BSS CreatePartnerCoupons — mutating POST /v2/promotions/benefits/partner-coupons), with an automatic fallback to the official huaweicloudsdkbss v2 SDK when hcloud is not installed. 2. Zero-config operation: the invocation path is chosen automatically (CLI first, SDK fallback); credentials are loaded only from the hcloud profile or the standard Huawei Cloud environment variables. 3. Batch-aware: one call issues coupons to many sub-customer accounts (repeatable --customer-id / comma --customer-ids / --customers-file). 4. Idempotent: a per-customer natural key is remembered in a local ledger, so retrying a partially failed batch never double-issues an already-issued customer; --force overrides, --no-idempotency disables. 5. Safe by default for a money-moving, irreversible operation: a live send requires the explicit --confirm flag; --dry-run previews the exact request without issuing anything. 6. Graded errors: ConfigError (missing/invalid parameters or credentials) / AuthError (401/403 / insufficient IAM permission) / ApiError (unexpected API or network failure), each with an actionable hint. 7. Offline unit tests (mocked hcloud subprocess) cover validation, batch construction, idempotency, error grading, SDK fallback and all CLI modes. 8. Triggers include: "发放代金券", "给子客户发券", "发放优惠券给子客户", "合作伙伴发券", "send voucher", "issue coupon", "create partner coupons", "华为云代金券发放", "BSS coupon issue". 9. Write-intent guard: only the issue-coupon operation ever executes; reclaim / transfer / freeze / individually-issued-coupon mutation operations are rejected — this skill issues new coupons only.
Как установить скилл huawei-cloud-voucher-send?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-voucher-send запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic