Command Palette

Search for a command to run...

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

huawei-cloud-elb-list

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

1. List Huawei Cloud Elastic Load Balance (ELB) load balancers in a tenant region through KooCLI (hcloud ELB ListLoadbalancers — read-only GET…

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

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

Huawei Cloud Elastic Load Balance (ELB) Load Balancer List

Overview

Query the Elastic Load Balance (ELB) load balancer list of a tenant through KooCLI hcloud ELB ListLoadbalancers (official read-only GET /v3/{project_id}/elb/loadbalancers, verified in the huaweicloudsdkelb v3 client _list_load_balancers_http_info metadata). The skill is aimed at ELB inventory inspection, daily operations patrol, and as a pre-query step for other skills that need an ELB id / vip_address or a bound EIP.

Architecture:

agent → python3 scripts/list_elb.py → hcloud ELB ListLoadbalancers --cli-region=<region>
      → Huawei Cloud ELB OpenAPI (elb.<region>.myhuaweicloud.com) → parsed JSON
      → standardized id+name table / --json / --names-only
      → Markdown document (standardized id + 名称, default elb-list.md)

(hcloud binary missing) → fallback: huaweicloudsdkelb v3 ElbClient.list_load_balancers

Key properties:

  • Read-only by design — the only API ever invoked is ListLoadbalancers (GET). A write-intent guard scans user arguments and validates the operation name; mutating intents (create / delete / update / modify / clone / restore / enable / disable / associate / detach / change) 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 huaweicloudsdkelb v3 SDK (list_load_balancers). Credentials are always read by the CLI profile / SDK environment — never handled by the script.
  • Standardized table output — the default table renders exactly two columns, id and name (名称); every other field returned by ListLoadbalancers is dropped for a stable, easy-to-consume inventory. The raw full-field response is still available through --json.
  • Markdown document — each list query also writes a Markdown document whose content is the standardized id + 名称 list (Markdown table | ID | 名称 |), to elb-list.md by default (--md-out <path> / --no-md to control).
  • Offline-testable — every code path (marker paging, filters, error classification, guard, SDK fallback, standardization, Markdown generation) is covered by unit tests that mock the hcloud subprocess.

Out of scope: every mutating ELB action (create / update / delete a load balancer, create / update / delete a listener, pool, member, health monitor, L7 policy or certificate, clone, restore, change charge mode). Those require a dedicated write-capable skill and explicit user confirmation.

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: python3 scripts/ensure_env.py (or pip install huaweicloudsdkcore huaweicloudsdkelb) to enable the SDK fallback path.
  2. Active credential profile — configure credentials out-of-band (run the KooCLI configure command in your terminal, or set 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. project_id (SDK fallback only) — the ELB REST path is /v3/{project_id}/elb/loadbalancers; when falling back to the SDK, supply the project id via --project-id or the HUAWEICLOUD_SDK_PROJECT_ID / HUAWEI_PROJECT_ID environment variables. The KooCLI path resolves it from the profile automatically.
  4. IAM permission — read-only elb:loadbalancers:list; least-privilege policy in references/iam-policies.md.
  5. Python 3.8+ (standard library only — argparse / json / subprocess).
  6. Outbound HTTPS access to elb.cn-north-4.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4).
  2. Confirm KooCLI readiness (optional, read-only) by listing the active credential profile.
  3. Run the list script with the desired output mode and filters.
  4. Read the result — standardized id + name table for humans, --json for downstream tooling, --names-only for a compact inventory.
  5. Collect the Markdown document — the list query writes the standardized id + 名称 list to elb-list.md (or --md-out <path>); pass --no-md to skip.
  6. Handle the empty / error cases per the Edge Cases table below (the script prints an explicit hint for empty region, 403, and missing AK/SK).

Core Commands

# Self-heal the SDK fallback dependencies (idempotent)
python3 scripts/ensure_env.py

# Standardized id + 名称 table (default) + Markdown document (elb-list.md)
python3 scripts/list_elb.py --region cn-north-4

# Markdown document to a custom path (still prints the standardized table)
python3 scripts/list_elb.py --region cn-north-4 --md-out inventory/elb-list.md

# Standardized table only, no Markdown document
python3 scripts/list_elb.py --
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

1. List Huawei Cloud Elastic Load Balance (ELB) load balancers in a tenant region through KooCLI (hcloud ELB ListLoadbalancers — read-only GET /v3/{project_id}/elb/loadbalancers), with an automatic fallback to the official huaweicloudsdkelb v3 SDK when hcloud is not installed. 2. Output modes: standardized table (default, exactly two columns — ID and 名称, no other fields), --json (raw response array with every returned field), and --names-only (compact load balancer name list). 3. Every list query (default table or --names-only) also generates a Markdown document whose content is the standardized ID + 名称 list (Markdown table `| ID | 名称 |`). It is written to `elb-list.md` by default; use `--md-out <path>` to change the path (missing parent directories are created automatically) or `--no-md` to disable. `--json` never writes the document. 4. Supports --id / --name / --vpc-id / --provisioning-status / --operating-status / --enterprise-project-id / --vip-address filtering (all real server-side ListLoadbalancers query parameters), region override, --project-id, and automatic marker paging. 5. Explicit error hints for empty ELB lists (「当前区域无负载均衡器(ELB)」), 403 / insufficient IAM permission (「无权限访问弹性负载均衡(ELB)」), missing or invalid AK/SK credentials, missing project_id on the SDK fallback, and hcloud not installed. 6. Built-in write-intent guard: any mutating intent (create / delete / update / modify / clone / restore / enable / disable / associate / detach / change) or any operation other than ListLoadbalancers is rejected before execution — this skill is strictly read-only. 7. Triggers include: "list ELB", "elb list", "负载均衡器列表", "查询 ELB", "查询负载均衡器", "ELB 实例列表", "elastic load balancer inventory", "list loadbalancers", "华为云 ELB", "负载均衡器名称列表". 8. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, marker paging, error scenarios, SDK fallback, the standardized output, the Markdown generation, and the write-intent guard.

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

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

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

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

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

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