huawei-cloud-obs-list
БесплатноЗапускает вложенные скриптыНе проверен1. List the OBS (Object Storage Service) buckets of a Huawei Cloud account through the KooCLI obsutil-backed OBS module (`hcloud OBS ls`, the read-only…
от wlc-dev451 установка в других каталогахОб этом скилле
Huawei Cloud OBS Bucket List
Overview
Query the OBS bucket list of a Huawei Cloud account through KooCLI's
obsutil-backed OBS module (hcloud OBS ls — the read-only ListBuckets
operation), with a fallback to the official huaweicloudsdkobs v1 SDK. The
skill is aimed at resource inventory, daily operations patrol, and as a
pre-query step for automation that needs a bucket name.
Architecture:
agent → python3 scripts/list_obs_buckets.py → hcloud OBS ls [-limit=N] [-e=obs.<region>.myhuaweicloud.com]
→ Huawei Cloud OBS OpenAPI (ListBuckets) → parsed buckets → table / json / names
(hcloud binary missing) → fallback: huaweicloudsdkobs v1 ObsClient.list_buckets
Key properties:
- Read-only by design — the only API ever invoked is ListBuckets (GET). A write-intent guard scans user arguments and validates the operation name; mutating intents (create / delete / upload / download / copy / remove / restore / sync ...) are rejected with an explicit message before any command runs.
- CLI first, SDK fallback — KooCLI is the primary execution path; when the
hcloud binary is absent, the script falls back to the official
huaweicloudsdkobsSDK (list_buckets). Credentials are read from the hcloud/obsutil profile or the SDK environment — never handled by the script. - Account-level query — OBS bucket listing is account-scoped;
--regionselects the OBS endpoint used for the call. - Offline-testable — every code path (parsing, output modes, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.
Capability boundary: this skill lists buckets only. It does not list objects inside a bucket, and it does not report bucket quota/usage. Those require a separate skill/Issue.
Out of scope: every mutating OBS action (bucket create/delete, object upload/download/copy/delete, ACL/policy/encryption/lifecycle changes). Those require a dedicated write-capable skill and explicit user confirmation.
Prerequisites
- KooCLI (
hcloud) installed with the obsutil component — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkcore huaweicloudsdkobsto enable the SDK fallback path. - obsutil credentials configured out-of-band — the
hcloud OBSmodule reads AK/SK/endpoint from the obsutil config file (~/.obsutilconfig), separate from the KooCLI account profile. Never paste AK/SK into chat; the script never reads, echoes, or stores secrets itself. - IAM permission — read-only
obs:bucket:list(or theOBS ReadOnlyAccesssystem policy); least-privilege policy in references/iam-policies.md. - Python 3.8+ (standard library only — argparse / json / subprocess / re).
- Outbound HTTPS access to
obs.<region>.myhuaweicloud.com.
Workflow
- Confirm the target region (default
cn-north-4); it selects the OBS endpoint. - Confirm hcloud/obsutil readiness (optional, read-only):
hcloud OBS ls -limit=1(orhcloud version). - Run the list script with the desired output mode.
- Read the result — table for humans,
--jsonfor downstream tooling,--names-onlyfor a compact inventory. - Handle the empty / error cases per the Error Handling table below.
Core Commands
# Aligned table (default): name / creation date / region / storage class
python3 scripts/list_obs_buckets.py --region cn-north-4
# Structured JSON (raw bucket array) for downstream tooling
python3 scripts/list_obs_buckets.py --output json
# or the alias
python3 scripts/list_obs_buckets.py --json
# Compact bucket-name list only
python3 scripts/list_obs_buckets.py --names-only
# Custom endpoint / capped count
python3 scripts/list_obs_buckets.py --region cn-south-1 --page-size 50
Equivalent direct KooCLI command (the script wraps exactly this call):
hcloud OBS ls -limit=1000 -e=obs.cn-north-4.myhuaweicloud.com
Parameter Confirmation
| Parameter | Required | Description | Example |
|---|---|---|---|
--region / -r |
No | Huawei Cloud region (default cn-north-4); selects the OBS endpoint |
cn-south-1 |
--output / -o |
No | Output mode: table (default) / json / names |
--output json |
--json |
No | Alias for --output json |
— |
--names-only |
No | Alias for --output names (bucket names only) |
— |
--page-size |
No | Maximum number of buckets to return (default 1000) | 50 |
--endpoint |
No | Override the OBS endpoint (default obs.<region>.myhuaweicloud.com) |
obs.custom.example.com |
--operation |
No | hcloud OBS operation name; only the read-only ls is allowed |
ls |
Output-mode precedence: --names-only → --json → --output → table (default).
Write-Intent Guard
- The script scans all user arguments plus the
--operationvalue for mutating
Установить huawei-cloud-obs-list в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-obs-list?
1. List the OBS (Object Storage Service) buckets of a Huawei Cloud account through the KooCLI obsutil-backed OBS module (`hcloud OBS ls`, the read-only ListBuckets operation), with an automatic fallback to the official huaweicloudsdkobs v1 SDK (`ObsClient.list_buckets`) when hcloud is not installed. 2. Three output modes: aligned table (default, bucket name / creation date / region / storage class), `--output json` / `--json` (structured array for downstream tooling), and `--names-only` (compact bucket-name list). 3. Region-aware: `--region` (default cn-north-4) selects the OBS endpoint; optional `--endpoint` overrides it. `--page-size` caps the returned count. 4. Explicit error classification: missing AK/SK credentials (「缺少 AK/SK 凭证」), hcloud not installed (falls back to SDK, else a clear hint), invalid/insufficient credentials (403 / InvalidAccessKeyId → IAM hint), and generic API/network failures. 5. Built-in write-intent guard: any mutating intent (create / delete / upload / download / copy / remove / restore / sync / modify …) or any operation other than the read-only `ls` is rejected before execution — this skill is strictly read-only. 6. Triggers include: "list OBS buckets", "OBS bucket list", "OBS 桶列表", "查询OBS桶", "对象存储桶列表", "列出桶", "桶清单", "bucket inventory", "OBS inventory". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, parsing, empty lists, error classification, SDK fallback, and the write-intent guard.
Как установить скилл huawei-cloud-obs-list?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-obs-list запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic