Command Palette

Search for a command to run...

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

huawei-cloud-cbr-list

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

1. List Huawei Cloud CBR (Cloud Backup and Recovery) backups in a tenant region through KooCLI (`hcloud CBR ListBackups --cli-region=<region>` — read-only)…

wlc-devот wlc-dev190 установок в других каталогах

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

Huawei Cloud CBR Backup List

Overview

Query the CBR (Cloud Backup and Recovery) backup list of a tenant region through KooCLI hcloud CBR ListBackups --cli-region=<region> (read-only), with a fallback to the official huaweicloudsdkcbr v1 SDK (CbrClient.list_backups, GET /v3/{project_id}/backups). The skill is aimed at backup-resource inventory, daily operations patrol, capacity accounting, and as a pre-query step for other backup skills that need a backup ID.

Architecture:

agent → python3 scripts/list_cbr_backups.py → hcloud CBR ListBackups --cli-region=<region>
      → Huawei Cloud CBR OpenAPI (regional endpoint) → parsed JSON → table / --json / --names-only

(hcloud binary missing) → fallback: huaweicloudsdkcbr v1 CbrClient.list_backups

Key properties:

  • Read-only by design — the only API ever invoked is ListBackups (GET). A write-intent guard scans the user arguments and validates the operation name; mutating intents (create / delete / restore / copy / import / replicate / update / migrate / associate / bind ...) are rejected with an explicit message before any command runs.
  • CLI first, SDK fallback — KooCLI is the primary execution path; when the KooCLI binary is absent, the script falls back to the official huaweicloudsdkcbr v1 SDK (list_backups). Credentials are always read by the CLI profile / SDK environment — never handled by the script.
  • Full-field table output — the default table renders the union of all fields returned by ListBackups, with the owning resource (name / id / type), vault_id, created_at and expired_at surfaced explicitly.
  • Native + client-side filtering — CBR ListBackups accepts name, status, resource_id, resource_name, resource_type, vault_id, image_type, limit / offset and more; the script passes them through and re-filters the rendered rows locally so the output always honours the requested filters.
  • Offline-testable — every code path (paging, filtering, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.

Scope: this skill lists backups. It does not list backup vaults (ListVaults), does not report vault quota/usage, and does not run any restore/copy/delete operation — those require a separate skill/Issue.

Out of scope: every mutating CBR action (create / delete / restore / copy / import / replicate / update vault / bind policy). Those require a dedicated write-capable skill and explicit user confirmation.

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkcore huaweicloudsdkcbr to enable the SDK fallback path.
  2. Active credential profile — configure credentials out-of-band (hcloud 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 permission for listing backups (cbr:backup:list); least-privilege policy in references/iam-policies.md.
  4. Python 3.8+ (standard library only — argparse / json / subprocess / re).
  5. Outbound HTTPS access to cbr.<region>.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4); every CBR call is region-scoped.
  2. Confirm hcloud readiness (optional, read-only): the credential profile is configured (see references/cli-installation-guide.md).
  3. Run the list script with the desired output mode and filters.
  4. Read the result — table for humans, --json for downstream tooling, --names-only for a compact inventory.
  5. Handle the empty / error cases per the Error Handling table below.

Core Commands

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

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

# Compact backup name + ID inventory
python3 scripts/list_cbr_backups.py --names-only

# Filter by name / status (server-side + client-side)
python3 scripts/list_cbr_backups.py --name backup-prod
python3 scripts/list_cbr_backups.py --status available

# Filter by owning resource / vault
python3 scripts/list_cbr_backups.py --resource_type OS::Nova::Server --names-only
python3 scripts/list_cbr_backups.py --resource_name ecs-prod
python3 scripts/list_cbr_backups.py --vault_id 8a9b0c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d --json

# Combine filters + custom page size
python3 scripts/list_cbr_backups.py --region cn-south-1 --status available --names-only --page-size 100

Equivalent direct KooCLI call (the script wraps exactly this operation, with paging) — illustrative, requires KooCLI installed:

hcloud CBR L
Полный SKILL.md на ClawHub

Установить huawei-cloud-cbr-list в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл huawei-cloud-cbr-list?

1. List Huawei Cloud CBR (Cloud Backup and Recovery) backups in a tenant region through KooCLI (`hcloud CBR ListBackups --cli-region=<region>` — read-only), with an automatic fallback to the official huaweicloudsdkcbr v1 SDK (CbrClient.list_backups) when hcloud is not installed. 2. Output modes: full-field aligned table (default, every returned field including 名称/ID/状态/所属资源/资源类型/vault_id/创建时间), --json (raw response array) and --names-only (compact backup name + ID inventory). 3. Supports --region (default cn-north-4), --page-size with automatic limit/offset paging, and the native ListBackups filters --name / --status / --resource_id / --resource_name / --resource_type / --vault_id / --image_type (with a client-side re-filter for the rendered rows). 4. Explicit error hints for empty backup lists (「当前区域无 CBR 备份」), 403 / insufficient IAM permission (「无权限访问 CBR,请检查 IAM 权限」), missing or invalid AK/SK credentials, hcloud not installed, and KooCLI usage errors. 5. Built-in write-intent guard: any mutating intent (create / delete / restore / copy / import / replicate / update / migrate / associate / bind / ...) or any operation other than the read-only ListBackups is rejected before execution — this skill is strictly read-only. 6. Triggers include: "list CBR backups", "CBR backup list", "CBR 备份列表", "查询CBR备份", "查询备份列表", "云备份列表", "备份清单查询", "备份资源巡检", "备份容量盘点", "CBR inventory", "list backups", "华为云备份查询", "华为云CBR列表". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, paging, error scenarios, SDK fallback and the write-intent guard.

Как установить скилл huawei-cloud-cbr-list?

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

Скилл huawei-cloud-cbr-list запускает скрипты?

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

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

Сравнить huawei-cloud-cbr-list с