Command Palette

Search for a command to run...

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

huawei-cloud-vpc-export-markdown

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

1. Query the Huawei Cloud Virtual Private Cloud (VPC) list of a tenant region through KooCLI (`hcloud VPC ListVpcs`, the official read-only GET…

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

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

Huawei Cloud VPC List → Markdown Export

Overview

Query the Virtual Private Cloud (VPC) list of a tenant region through KooCLI hcloud VPC ListVpcs (official read-only GET /v1/{project_id}/vpcs, verified in the huaweicloudsdkvpc v2 client _list_vpcs_http_info metadata), with a fallback to the official huaweicloudsdkvpc v2 SDK, and export the result into a local Markdown report. The skill is aimed at VPC inventory inspection, daily operations patrol, and Markdown-report style deliverables.

Architecture:

agent → python3 scripts/export_vpc_markdown.py → skill-quality-cli run ─▶ hcloud VPC ListVpcs --cli-region=<region> --limit=N --marker=M
      → Huawei Cloud VPC OpenAPI (vpc.<region>.myhuaweicloud.com) → parsed JSON vpcs → render_markdown → .md / table / json

(hcloud binary missing) → fallback: huaweicloudsdkvpc v2 VpcClient.list_vpcs
(missing SDK)           → run scripts/ensure_env.py  (auto pip install)

Key properties:

  • Read-only by design — the only API ever invoked is ListVpcs (GET). A write-intent guard scans the user arguments and validates the operation name; mutating intents (create / delete / update / associate / disassociate / attach / detach / release / change ...) are rejected with an explicit message before any command runs. The Markdown file is generated on the local filesystem only — no VPC write happens.
  • CLI first, SDK fallback — KooCLI is the primary execution path (wrapped with skill-quality-cli for telemetry); when the hcloud binary is absent, the script falls back to the official huaweicloudsdkvpc v2 SDK (list_vpcs). Credentials are read from the hcloud profile or the SDK environment — never handled by the script.
  • Well-formed, name-first Markdown — a fixed header row whose first column is VPC 名称 (VPC ID / 区域 / 网段 / 状态 / 企业项目 ID / 描述 / 创建时间), one data row per VPC, a - fallback for missing fields, and an optional summary line (--summary). The report is saved via a temporary file + atomic rename, so an interrupted write never leaves a corrupt/partial .md.
  • Empty region is not an error — an empty VPC list still produces a valid header-only (empty) Markdown table and exits 0.
  • Offline-testable — every code path (marker paging, filters, output modes, Markdown format, empty result, error classification, guard, SDK fallback, quality wrapper) is covered by unit tests that mock the hcloud subprocess.

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

Capability boundary: this skill lists VPCs only. It does not manage VPC lifecycle (create/delete/update), subnets, route tables, security groups or peering, and it does not write the report back to any cloud service. Those require a separate skill and explicit user confirmation.

Prerequisites

  1. Python 3.8+ with the Huawei Cloud SDK — run python3 scripts/ensure_env.py to install huaweicloudsdkcore and huaweicloudsdkvpc automatically. The Markdown export itself needs no third-party package. See references/cli-installation-guide.md.
  2. KooCLI (hcloud) installed — the optional primary execution path; see references/cli-installation-guide.md. When absent, the SDK fallback is used.
  3. Credentials configured out-of-band — the CLI reads the active hcloud profile; the SDK fallback reads AK/SK from the whitelisted environment variables (HUAWEI_ACCESS_KEY / HUAWEI_SECRET_KEY, HUAWEICLOUD_SDK_AK / HUAWEICLOUD_SDK_SK, HW_*, ...). Never paste AK/SK into chat; the script never reads, echoes or stores secrets itself.
  4. project_id (SDK fallback only) — the VPC REST path is /v1/{project_id}/vpcs; 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.
  5. IAM permission — read-only vpc:vpcs:list; least-privilege policy in references/iam-policies.md.
  6. Outbound HTTPS access to vpc.cn-north-4.myhuaweicloud.com.
  • skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present)
    • Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
    • Disable telemetry report: set SKILL_QUALITY_REPORT=0

Workflow

  1. (Optional) prepare the environment — python3 scripts/ensure_env.py installs any missing SDK dependency.
  2. Confirm the target region (default cn-north-4).
  3. (Optional) confirm KooCLI readiness (read-only) — see the Core Commands block for the wrapped credential check.
  4. Run the script with the desired output mode (--format md for the report, table / json otherwise).
  5. Read the result — for md, the printed path is the generated report; han
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

1. Query the Huawei Cloud Virtual Private Cloud (VPC) list of a tenant region through KooCLI (`hcloud VPC ListVpcs`, the official read-only GET /v1/{project_id}/vpcs), with an automatic fallback to the official huaweicloudsdkvpc v2 SDK (VpcClient.list_vpcs) when hcloud is not installed. 2. Export the VPC list into a well-formed local Markdown table whose first column is the required **VPC 名称** (VPC name), followed by VPC ID / 区域 / 网段 / 状态 / 企业项目 ID / 描述 / 创建时间 — strictly local file generation, nothing is ever written back to the cloud. `--output`/`-o` sets the path (default `vpc_list_<region>_<timestamp>.md`); the parent directory is created automatically and the file is written via a temp file + atomic rename. 3. Three output modes: `--format md` (default) / `table` / `json`. Region aware: `--region` (default cn-north-4). Optional `--id` / `--enterprise-project-id` server-side filters and `--page-size` (default 100); paging follows the reported `page_info.next_marker`. 4. Explicit error classification: missing AK/SK credentials (「缺少 AK/SK 凭证」), hcloud not installed (falls back to the SDK, else a clear hint), invalid/insufficient credentials (403 / 401 → IAM hint), KooCLI usage errors, and generic API/network failures. An empty VPC list still outputs an empty (header-only) Markdown table and exits 0 — never a corrupt file. 5. Built-in write-intent guard: any mutating intent (create / delete / update / associate / disassociate / attach / detach / release / change ...) or any operation other than the read-only ListVpcs is rejected before execution — this skill is strictly read-only. 6. Triggers include: "导出 VPC 名称清单为 Markdown", "VPC 列表导出 Markdown", "vpc markdown", "VPC 导出 Markdown", "虚拟私有云 Markdown 报表", "VPC 名称留档", "vpc 报表", "export VPC to markdown" — Markdown/export specialised only (plain VPC list / query intents are owned by the separate VPC list skill, not by this Markdown export skill). 7. Offline unit tests (mocked hcloud subprocess) cover output modes, marker p

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

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

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

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

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

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