Command Palette

Search for a command to run...

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

huawei-cloud-vpc-list

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

1. List Huawei Cloud Virtual Private Cloud (VPC) resources in a tenant region through KooCLI: virtual private clouds (hcloud VPC ListVpcs — read-only GET…

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

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

Huawei Cloud Virtual Private Cloud (VPC) List

Overview

Query the Virtual Private Cloud (VPC) resources of a tenant through two read-only KooCLI operations:

  • VPC list — hcloud VPC ListVpcs (official read-only GET /v1/{project_id}/vpcs, verified in the huaweicloudsdkvpc v2 client _list_vpcs_http_info metadata).
  • VPC peering list — hcloud VPC ListVpcPeerings (official read-only GET /v2.0/{project_id}/vpc/peerings, verified in the huaweicloudsdkvpc v2 client _list_vpc_peerings_http_info metadata).

The skill is aimed at VPC inventory inspection, daily operations patrol, network topology checks, and as a pre-query step for other skills that need a VPC id, its CIDR/status, or the peering links between VPCs.

Architecture:

agent → python3 scripts/list_vpc.py --resource vpc|peering
      → hcloud VPC ListVpcs | ListVpcPeerings --cli-region=<region>
      → Huawei Cloud VPC OpenAPI (vpc.<region>.myhuaweicloud.com) → parsed JSON
      → table / --json / --names-only / --format md (.md file on local disk)

(hcloud binary missing) → fallback: huaweicloudsdkvpc v2
      VpcClient.list_vpcs | VpcClient.list_vpc_peerings

Key properties:

  • Read-only by design — the only APIs ever invoked are ListVpcs and ListVpcPeerings (both GET). A write-intent guard scans user arguments and validates the operation name; mutating intents (create / delete / update / associate / disassociate / attach / detach / release / change, including peering create/accept/reject/delete) 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 huaweicloudsdkvpc v2 SDK (list_vpcs / list_vpc_peerings). Credentials are always read by the CLI profile / SDK environment — never handled by the script.
  • Two resource views — --resource vpc (default) keeps the full-field table; --resource peering renders exactly name / local VPC / peer VPC / status.
  • Full-field VPC table output — the default VPC table renders the union of all fields returned by ListVpcs, with the nested routes array compacted into a single JSON column.
  • Name-first Markdown report — --format md (VPC only) writes a fixed 8-column Markdown table (VPC 名称 first), with a - fallback for missing fields and a header-only table for an empty list. The report is generated on the local filesystem only, via a temp file + atomic rename; nothing is written back to the cloud.
  • Offline-testable — every code path (marker paging, filters, output modes, Markdown rendering/export, error classification, guard, SDK fallback, peering mapping) is covered by unit tests that mock the hcloud subprocess.

Out of scope: every mutating VPC action (create / update / delete a VPC, subnet, security group, route table, port or flow log; associate / disassociate a resource; VPC peering create/accept/reject/delete). Those require a dedicated write-capable skill and explicit user confirmation.

Division of labour with the dedicated VPC Markdown export skill: this skill is the general VPC list / query entry point, and now also offers a convenience --format md export. The dedicated VPC Markdown export skill remains the Markdown-export specialist (same 8-column contract, rendering logic kept independently, each skill installs on its own; see references/verification-method.md for the cross-reference note). For "导出 VPC 名称清单为 Markdown / VPC Markdown 报表" intents either skill works; prefer the export skill when the task is purely Markdown deliverable, and this skill when the task also needs table/json/name-list querying.

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 huaweicloudsdkvpc 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 REST paths are /v1/{project_id}/vpcs and /v2.0/{project_id}/vpc/peerings; 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 vpc:vpcs:list (VPC list) and vpc:peerings:list (peering list); least-privilege policy in references/iam-policies.md.
  5. Python 3.8+ (
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

1. List Huawei Cloud Virtual Private Cloud (VPC) resources in a tenant region through KooCLI: virtual private clouds (hcloud VPC ListVpcs — read-only GET /v1/{project_id}/vpcs) and VPC peering connections (hcloud VPC ListVpcPeerings — read-only GET /v2.0/{project_id}/vpc/peerings), with an automatic fallback to the official huaweicloudsdkvpc v2 SDK when hcloud is not installed. 2. `--resource {vpc,peering}` selects the query object (default `vpc`); the peering table has exactly four columns — name / local VPC / peer VPC / status — mapped from request_vpc_info.vpc_id / accept_vpc_info.vpc_id. 3. Output modes: full-field table (default, every returned field including id/name/cidr/status and the remaining VPC attributes; peering uses the fixed four columns), --json (raw response array), --names-only (compact name list), and --format md (local Markdown report whose first column is VPC 名称; `--resource vpc` only). 4. `--format md` writes a fixed 8-column Markdown table (VPC 名称 / VPC ID / 区域 / 网段 / 状态 / 企业项目 ID / 描述 / 创建时间; missing field `-`; empty list = header-only table) to `--output`/`-o` (default `vpc_list_<region>_<timestamp>.md`), creates the parent directory, and writes via a temp file + atomic rename. Optional `--summary` appends the VPC count. Contract matches the dedicated VPC Markdown export skill (same fixed 8-column table; rendering kept independently). 5. Supports --id / --enterprise-project-id filtering (both real server-side ListVpcs query parameters; the CLI path emits the v3 array form `--id.1=<vpc-id>`, which KooCLI requires), region override, and automatic marker paging for both VPC and peering queries. 6. Explicit error hints for empty VPC / peering lists, 403 / insufficient IAM permission, missing or invalid AK/SK credentials, missing project_id on the SDK fallback, and hcloud not installed. 7. Built-in write-intent guard: any mutating intent (create / delete / update / associate / disassociate / attach / detach / release / change, including CreateVp

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

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

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

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

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

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