Queries the total storage size of Huawei Cloud OBS (Object Storage Service) buckets and returns ONLY the size value — a single number, in bytes by default. Supports querying the total size of one bucket or the combined total across all buckets under the account. Uses the KooCLI obsutil-backed hcloud OBS ls ... -du -bf=raw command (primary) or the huaweicloudsdkobs Python SDK (fallback). Read-only — never creates, modifies or deletes any resource. Use this skill whenever the user wants to know the total size of an OBS bucket or the overall OBS storage usage, e.g. for capacity review, cost estimation or storage planning. Triggers include: OBS total size, OBS bucket size, total storage usage, bucket capacity, OBS大小, OBS总大小, OBS容量, 桶大小, 查询OBS大小, 存储占用, OBS存储量.
This skill queries the total size of Huawei Cloud OBS buckets and returns only the size value (a single number). It is a read-only statistics skill: it never creates, modifies, or deletes buckets, directories, or objects.
Combined total size across all buckets under the account
--all → 9533151096
Applicable Scenarios:
Capacity review: "how much storage does this bucket / my OBS account use?"
Cost estimation: estimate OBS storage billing based on total bytes
Storage planning: compare usage before migration or quota changes
Compliance auditing: track total storage growth
Prerequisites
hcloud CLI (KooCLI) installed and authenticated — See references/cli-installation-guide.md
obsutil installed — required by the hcloud OBS ls command (bundled with KooCLI or standalone)
OBS credentials configured for obsutil — hcloud OBS ls reads AK/SK/endpoint from the obsutil config file
(.obsutilconfig in the user home directory), which is separate from the KooCLI account credentials
OBS credentials are separate. Before running, check whether obsutil credentials are configured:
bash
hcloud OBS ls -s -limit=1
If the output is Please set ak, sk and endpoint in the configuration file! or an InvalidAccessKeyId error,
obsutil credentials are not configured. Ask the user to configure them in their own terminal (never ask the user
to paste AK/SK into the conversation). Provide the following example command:
Returns the combined total size of all buckets under the account, in bytes.
Buckets in regions other than the configured endpoint are queried with their
own regional endpoint automatically; a single inaccessible bucket is skipped
with a warning instead of aborting the whole sum:
The underlying obsutil command the script uses for a single bucket is
hcloud OBS ls obs://<bucket_name>/ -du -bf=raw, which prints
[DU] Total bucket size: N. Prefer the script commands above; use the raw
obsutil command only for manual inspection.
Parameter Confirmation
Parameter
Required
Description
Example
--bucket
No*
OBS bucket name to measure
my-bucket
--all
No*
Total size across all buckets (default)
--all
--unit
No
Output unit: bytes, kb, mb, gb
--unit mb
--human
No
Human readable size (e.g. 4.77MB)
--human
--region
No
Huawei Cloud region (SDK fallback only)
cn-north-4
--executor
No
auto (default), cli, or sdk
--executor sdk
* Either --bucket or --all must be chosen; --all is the default when neither is given.