huawei-cloud-obs-statistics
БесплатноЗапускает вложенные скриптыНе проверен1. Read-only aggregated statistics for Huawei Cloud OBS (Object Storage Service): for a target scope (all buckets, or one bucket, optionally narrowed by a key…
от wlc-dev312 установок в других каталогахОб этом скилле
Huawei Cloud OBS Statistics
Overview
Produce a one-shot read-only aggregated statistics report for Huawei Cloud OBS (Object Storage Service). Given a scope — the whole account, a single bucket, and/or a key prefix — the skill enumerates buckets and objects and aggregates the results locally, reporting:
- bucket count
- object count
- total capacity — the sum of object
Size(bytes), an estimate, not a billing figure - distribution by storage class (Standard / Warm / Cold / Deep Archive …)
- distribution by region
Primary execution path is the KooCLI obsutil-backed OBS module
(hcloud OBS ls — the read-only ListBuckets / ListObjects operations); when the
hcloud binary is absent the script falls back to the official
huaweicloudsdkobs v1 SDK (ObsClient.list_buckets / list_objects).
Architecture:
agent → python3 scripts/collect_obs_stats.py
→ hcloud OBS ls [-limit=N] [-e=obs.<region>.myhuaweicloud.com] (buckets)
→ hcloud OBS ls obs://<bucket>/[<prefix>/] [-limit=N] [-e=...] (objects)
→ local aggregation → table / json / md
(hcloud binary missing) → fallback: huaweicloudsdkobs v1
ObsClient.list_buckets / list_objects
Capability boundary: this skill aggregates objects/buckets into summary metrics. It does not export per-object inventories and does not count directories/folders. Capacity is estimated from object
Size, not a billing statement.
Out of scope: every mutating OBS action (bucket create/delete, object upload/download/copy/delete, ACL/policy/encryption/lifecycle changes) — these are blocked by the write-intent guard; a write-capable skill with explicit user confirmation would be required.
Prerequisites
- KooCLI (
hcloud) installed with the obsutil component — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkcore huaweicloudsdkobsto enable the SDK fallback path (or runscripts/ensure_env.py). - 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:ListBucket,obs:object: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 scope — a single
--bucket(recommended for large accounts) or the whole account; optionally a--prefixto limit the object scan. - Confirm hcloud/obsutil readiness (optional, read-only):
hcloud OBS ls -limit=1. - Run the script with the desired output mode:
python3 scripts/collect_obs_stats.py --bucket <bucket> --prefix <prefix>. - Read the result — table for humans,
--jsonfor downstream tooling,--output mdfor a Markdown report. - Handle errors per the Error Handling table below.
Core Commands
# Whole account: aggregate every bucket (table output)
python3 scripts/collect_obs_stats.py --region cn-north-4
# Single bucket, narrowed by prefix
python3 scripts/collect_obs_stats.py --bucket my-bucket --prefix logs/
# Structured JSON (for downstream automation)
python3 scripts/collect_obs_stats.py --bucket my-bucket --json
# Markdown report
python3 scripts/collect_obs_stats.py --bucket my-bucket --output md
# Force the SDK fallback path
python3 scripts/collect_obs_stats.py --bucket my-bucket --executor sdk
Equivalent direct KooCLI commands (the script wraps exactly these calls):
hcloud OBS ls -limit=1000 -e=obs.cn-north-4.myhuaweicloud.com
hcloud OBS ls obs://my-bucket/logs/ -limit=1000 -e=obs.cn-north-4.myhuaweicloud.com
Parameter Confirmation
| Parameter | Required | Description | Example |
|---|---|---|---|
--bucket / -b |
No | Statistics scope: one bucket (default: all account buckets) | my-bucket |
--prefix / -p |
No | Limit the object scan to a key prefix | logs/ |
--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 / md |
--output json |
--json |
No | Alias for --output json |
— |
--md |
No | Alias for --output md |
— |
--executor |
No | auto (default, CLI first) / cli / sdk |
--executor sdk |
--max-objects |
No | Per-bucket object cap (default 100000); results are marked truncated when reached | 50000 |
--endpoint |
No | Override the OBS endpoint (default obs.<region>.myhuaweicloud.com) |
obs.custom.example.com |
| `--ope |
Установить huawei-cloud-obs-statistics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-obs-statistics?
1. Read-only aggregated statistics for Huawei Cloud OBS (Object Storage Service): for a target scope (all buckets, or one bucket, optionally narrowed by a key prefix) it reports, in one shot, the bucket count, the object count, the total capacity (sum of object Size, bytes — an estimate, not a billing figure), the distribution by storage class, and the distribution by region. 2. Primary execution path is the KooCLI obsutil-backed OBS module (`hcloud OBS ls`), with an automatic fallback to the official `huaweicloudsdkobs` v1 SDK (`ObsClient.list_buckets` / `list_objects`) when hcloud is not installed. 3. Three output modes: an aligned table (default), structured JSON (`--json` / `--output json`) for downstream automation, and Markdown (`--output md`). 4. Scope controls: `--bucket` (single bucket), `--prefix` (limit the scan), `--region` (default cn-north-4), `--max-objects` (cap, truncated results are marked). 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: "OBS 统计", "OBS 聚合统计", "OBS 容量统计", "对象数量统计", "存储类别分布", "区域分布", "桶统计", "资源巡检", "容量盘点", "OBS statistics", "bucket usage stats", "obs statistics summary". 7. Offline unit tests (mocked hcloud subprocess and SDK) cover output modes, parsing, aggregation, empty scopes, error classification, SDK fallback and the write-intent guard.
Как установить скилл huawei-cloud-obs-statistics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-obs-statistics запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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