Command Palette

Search for a command to run...

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

huawei-cloud-as-group-list

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

1. Read-only inventory of Huawei Cloud Auto Scaling (AS / 弹性伸缩) resources in one region: scaling group name / ID / status, desired vs current instance number…

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

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

Huawei Cloud AS Scaling Group List

Overview

Inventory Huawei Cloud Auto Scaling (AS) scaling groups and their instance members through KooCLI, with an automatic SDK fallback. The skill answers the everyday operations questions behind scaling incidents: is the group healthy, does the desired instance number match the current number, which subnets and load balancers is it attached to, and which instances are stuck in a non INSERVICE life-cycle state.

Operation REST path Method Purpose
AS ListScalingGroups /autoscaling-api/v1/{project_id}/scaling_group GET list scaling groups of the region
AS ListScalingInstances /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/list GET list instances inside one scaling group

Architecture:

agent → python3 scripts/list_as_groups.py [--region=<region>] [--table|--json]
      → hcloud AS ListScalingGroups --cli-region=<region> --limit=<n> --start_number=<s>
        └─ (hcloud missing / transient failure) → huaweicloudsdkas v1 ListScalingGroups
      → Huawei Cloud AS OpenAPI → parsed JSON → compact list / table / JSON
      → --group-id → hcloud AS ListScalingInstances --scaling_group_id=<id>

(hcloud missing / transient failure, --group-id)
      → huaweicloudsdkas v1 ListScalingInstances → instance view

Key properties:

  • Read-only by design — only ListScalingGroups and ListScalingInstances (both GET) are ever constructed. A write-intent guard scans the raw command line and rejects mutating intent before any network call.
  • CLI first, SDK fallback — hcloud is the primary path; when it is missing or fails with a transient error the script falls back to the official huaweicloudsdkas v1 SDK. 403 / credential errors and a non-existent scaling group are reported as-is and never fall back.
  • Abnormal-first presentation — --table renders abnormal groups and abnormal instances in a dedicated section above normal ones, with a ⚠ marker. The definition is explicit: a group is abnormal when the desired instance number differs from the current one or its status is not INSERVICE; an instance is abnormal when its life-cycle state is not INSERVICE or its health status is not NORMAL.
  • Complete inventory — paging stops on the API total_number, the accumulated item count, a short page, or --max-pages, whichever comes first; duplicated IDs across pages are de-duplicated.
  • No files written — everything goes to stdout; credentials are delegated to the KooCLI profile or the SDK environment variables.

Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).

Prerequisites

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkcore huaweicloudsdkas to enable the SDK fallback path.
  2. Active credential profile — configure credentials out-of-band (the KooCLI configure init command in your own terminal, or credential environment variables). Never paste AK/SK into chat; the script never reads, echoes, or stores secrets itself.
  3. IAM permission — read-only as:scalingGroup:list (alias as:groups:list) for groups and as:scalingGroup:listInstances (alias as:instances:list) for group members. Least-privilege policy: references/iam-policies.md.
  4. Python 3.8+ (standard library only — argparse / json / subprocess).
  5. Outbound HTTPS access to *.myhuaweicloud.com.
  6. skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present). Upgrade with skill-quality-cli upgrade; disable telemetry reporting with SKILL_QUALITY_REPORT=0.

Workflow

  1. Confirm the target region (default cn-north-4); every AS call is region-scoped.
  2. Confirm hcloud readiness (optional, read-only): skill-quality-cli run --skill-name huawei-cloud-as-group-list -- hcloud configure list.
  3. List scaling groups and scan the abnormal section first when troubleshooting a scaling incident.
  4. Drill into one group with --group-id <id> to inspect instance life-cycle states and health.
  5. Handle empty / error cases per the Error Handling table below. When the group list is empty but the account should own groups, check the region and the IAM permission before assuming there is no resource.

Core Commands

⚠️ Mandatory: every hcloud command in this skill MUST be wrapped with skill-quality-cli run --skill-name huawei-cloud-as-group-list -- — bare hcloud calls are strictly forbidden.

# Compact scaling-group list (default)
python3 scripts/list_as_groups.py --region cn-north-4

# Full group view: ID / name / status / desired / current / min-max /
# VPC / subnet / ELB / create time
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

1. Read-only inventory of Huawei Cloud Auto Scaling (AS / 弹性伸缩) resources in one region: scaling group name / ID / status, desired vs current instance number, min-max instance number, associated VPC / subnet / ELB, and the instance members inside a scaling group. Aimed at troubleshooting "scale-out did not take effect", "instance counts do not match", and "scaling group stuck in an abnormal state". 2. Primary path: KooCLI call `AS ListScalingGroups` (read-only GET /autoscaling-api/v1/{project_id}/scaling_group) with `ListScalingInstances` (GET /autoscaling-api/v1/{project_id}/scaling_group_instance/ {scaling_group_id}/list) for drill-down; automatic fallback to the official huaweicloudsdkas v1 SDK when hcloud is unavailable. 3. Output modes: compact list (name / ID / status) by default, `--table` group view (11 columns) or, with `--group-id`, instance view (6 columns), and `--json` for the raw merged response. 4. Abnormal groups (desired != current or status != INSERVICE) and abnormal instances (life-cycle != INSERVICE or health != NORMAL) are placed in a separate highlighted section at the top of `--table` output; `--status abnormal` lists only abnormal resources. 5. Client-side filters: `--name` (exact, `--fuzzy` for substring), `--group-id`, `--status` (supports the abnormal alias), `--region` (default cn-north-4). `--limit` is 1-100 with automatic paging driven by total_number and the accumulated item count. 6. Built-in write-intent guard: create / update / delete / enable / disable / batch-add / batch-remove / policy-execute / ... are rejected before any cloud call with exit code 1 — this skill never writes to AS. 7. Explicit error hints for empty lists, 403 / insufficient IAM permission, missing credentials, missing hcloud, KooCLI [USE_ERROR], and a non-existent scaling group. 8. Triggers include: "list AS scaling groups", "AS 伸缩组列表", "查询伸缩组", "弹性伸缩组", "伸缩组实例", "期望实例数与当前实例数不一致", "扩容没生效", "auto scaling inventory", "scaling group troubleshooting", "华为云弹性伸缩".

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

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

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

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

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

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