huawei-cloud-eip-list
БесплатноЗапускает вложенные скриптыНе проверен1. List Huawei Cloud Elastic IP (EIP) instances in a tenant region through KooCLI (hcloud EIP ListPublicips — read-only GET /v3/{project_id}/eip/publicips)…
от wlc-dev469 установок в других каталогахОб этом скилле
Huawei Cloud Elastic IP (EIP) Instance List
Overview
Query the Elastic IP (EIP) instance list of a tenant through KooCLI
hcloud EIP ListPublicips (official read-only GET
/v3/{project_id}/eip/publicips, verified in the huaweicloudsdkeip v3
client _list_publicips_http_info metadata). The skill is aimed at EIP
inventory inspection, daily operations patrol, and as a pre-query step for
other skills that need an EIP id or a bound resource.
Architecture:
agent → python3 scripts/list_eip.py → hcloud EIP ListPublicips --cli-region=<region>
→ Huawei Cloud EIP OpenAPI (vpc.<region>.myhuaweicloud.com) → parsed JSON
→ table / --json / --names-only / Markdown .md export
(hcloud binary missing) → fallback: huaweicloudsdkeip v3 EipClient.list_publicips
Key properties:
- Read-only by design — the only API ever invoked is
ListPublicips(GET). A write-intent guard scans 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. - CLI first, SDK fallback — KooCLI is the primary execution path; when the
KooCLI binary is absent, the script falls back to the official
huaweicloudsdkeipv3 SDK (list_publicips). 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 ListPublicips, with the nested
bandwidth/vnicobjects expanded into flat columns. - Archivable Markdown export —
--markdown/-o <path>renders the same query into a self-contained.mdreport (title + region/time/count + fixed header table), written atomically to the requested path. The default behavior without an export flag is unchanged. - Offline-testable — every code path (marker paging, filters, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.
Out of scope: every mutating EIP action (create / update / delete an EIP, associate / disassociate an EIP, bind / unbind a bandwidth, change bandwidth). Those require a dedicated write-capable skill and explicit user confirmation.
Prerequisites
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkeipto enable the SDK fallback path. - 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.
- project_id (SDK fallback only) — the EIP REST path is
/v3/{project_id}/eip/publicips; when falling back to the SDK, supply the project id via--project-idor theHUAWEICLOUD_SDK_PROJECT_ID/HUAWEI_PROJECT_IDenvironment variables. The KooCLI path resolves it from the profile automatically. - IAM permission — read-only
vpc:publicIps:list; least-privilege policy in references/iam-policies.md. - Python 3.8+ (standard library only — argparse / json / subprocess).
- Outbound HTTPS access to
vpc.cn-north-4.myhuaweicloud.com.
Workflow
- Confirm the target region (default
cn-north-4). - Confirm KooCLI readiness (optional, read-only) by listing the active credential profile.
- Run the list script with the desired output mode and filters.
- Read the result — table for humans,
--jsonfor downstream tooling,--names-onlyfor a compact inventory,--markdown/-o <path.md>for an archivable report file. - 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). Empty queries still produce a Markdown file marked 「无数据」 with exit 0.
Core Commands
# Full-field table (default)
python3 scripts/list_eip.py --region cn-north-4
# Raw JSON of every returned field
python3 scripts/list_eip.py --json
# Compact EIP alias / public-IP list only
python3 scripts/list_eip.py --names-only
# Filter by EIP status (server-side query parameter)
python3 scripts/list_eip.py --status ACTIVE
# Filter by exact EIP id / public IP
python3 scripts/list_eip.py --id eip-0001
python3 scripts/list_eip.py --public-ip 1.2.3.4
# Combine filters
python3 scripts/list_eip.py --region cn-north-4 --status ACTIVE --names-only
# Export an archivable Markdown report (default filename eip_list_<region>_<timestamp>.md)
python3 scripts/list_eip.py --region cn-north-4 --markdown
# Export to an explicit path (implies Markdown mode; parent dirs are created)
python3 scripts/list_eip.py --region cn-north-4 -o /data/reports/eip_lis
Установить huawei-cloud-eip-list в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-eip-list?
1. List Huawei Cloud Elastic IP (EIP) instances in a tenant region through KooCLI (hcloud EIP ListPublicips — read-only GET /v3/{project_id}/eip/publicips), with an automatic fallback to the official huaweicloudsdkeip v3 SDK when hcloud is not installed. 2. Four output modes: full-field table (default, every returned field including 名称/别名/ID/公网IP/带宽/状态/绑定资源), --json (raw response array), --names-only (compact EIP alias/public-IP list), and Markdown export (--markdown or -o/--output <path.md>). 3. Markdown export writes an archivable `.md` report in one query: title 「华为云 EIP 列表」, query region / generated time / record count, and a full fixed-header table (公网IP、EIP ID、别名、状态、类型、绑定实例类型/ID、 带宽名称/大小、计费方式、企业项目 ID、创建时间); missing fields render as `-`. Empty results still produce a `.md` marked 「无数据」 and exit 0. 4. Supports --id / --status / --public-ip filtering (all real server-side ListPublicips query parameters), region override, and automatic marker paging. 5. Explicit error hints for empty EIP lists (「当前区域无弹性公网IP(EIP)」), 403 / insufficient IAM permission (「无权限访问弹性公网IP(EIP)」), 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 / associate / disassociate / attach / detach / release / change) or any operation other than ListPublicips is rejected before execution — this skill is strictly read-only. 7. Triggers include: "list EIPs", "eip list", "弹性公网IP列表", "查询 EIP", "查询弹性公网IP", "EIP 实例列表", "elastic ip inventory", "list public ips", "华为云 EIP", "公网IP列表", "导出 EIP Markdown", "EIP 列表导出 md". 8. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, marker paging, error scenarios, SDK fallback, Markdown export, and the write-intent guard.
Как установить скилл huawei-cloud-eip-list?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-eip-list запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic