Lists the Huawei Cloud OBS (Object Storage Service) buckets of the current tenant and returns the FOLDER names inside a bucket — both the top-level folders of a bucket and the sub-folders under a given prefix. Uses the KooCLI obsutil-backed command `hcloud OBS ls` (primary, parses the "Folder list" section of obsutil output) or the huaweicloudsdkobs Python SDK (fallback, ListObjects with delimiter=/). Read-only — never creates, modifies or deletes any bucket, folder or object. Use this skill whenever the user wants to see which OBS buckets exist or which folders a bucket (or a folder inside it) contains, e.g. for daily inspection, inventory, data organization review or troubleshooting. Triggers include: "list OBS buckets", "OBS bucket list", "list folders in bucket", "OBS folder names", "查询OBS列表", "OBS桶列表", "OBS文件夹名称", "桶里有哪些文件夹", "查询obs列表", "返回obs列表中文件夹名称", "OBS目录列表".
Memory
huawei-cloud-obs-upload
Try itUpload local files or directories to Huawei Cloud OBS (Object Storage Service) buckets, list OBS buckets with capacity and object count, and schedule periodic uploads via crontab. Use this skill when the user wants to: (1) upload a local file or directory to an OBS bucket, (2) list OBS buckets and check their storage capacity and object count, (3) set up a scheduled/periodic upload task to automatically sync a local directory to an OBS bucket. Trigger: user mentions "OBS", "object storage", "bucket list", "bucket capacity", "upload to OBS", "upload file", "upload directory", "scheduled upload", "periodic upload", "sync to bucket", "对象存储", "桶列表", "桶容量", "上传文件", "上传目录", "定时上传", "OBS管理"
What it does
Upload local files or directories to Huawei Cloud OBS (Object Storage Service) buckets, list OBS buckets with capacity and object count, and schedule periodic uploads via crontab. Use this skill when the user wants to: (1) upload a local file or directory to an OBS bucket, (2) list OBS buckets and check their storage capacity and object count, (3) set up a scheduled/periodic upload task to automatically sync a local directory to an OBS bucket. Trigger: user mentions "OBS", "object storage", "bucket list", "bucket capacity", "upload to OBS", "upload file", "upload directory", "scheduled upload", "periodic upload", "sync to bucket", "对象存储", "桶列表", "桶容量", "上传文件", "上传目录", "定时上传", "OBS管理"
The skill document
Huawei Cloud OBS Upload
Upload local files or directories to Huawei Cloud OBS buckets, list OBS buckets with capacity and object count, and schedule periodic uploads via crontab.
⛔ Prohibited Operations (Security Constraints)
This skill strictly forbids the following delete operations, regardless of user requests:
| Prohibited Operation | API/Command | Reason |
|---|---|---|
| ❌ Delete bucket | DeleteBucket / obsutil rm -bucket | Irreversible; destroys the entire bucket and all objects |
| ❌ Delete object | DeleteObject / obsutil rm | Irreversible; deleted objects cannot be recovered (unless versioning is enabled) |
| ❌ Batch delete objects | DeleteObjects / obsutil rm -r | Irreversible; batch deletion has a wide impact |
| ❌ Empty bucket | obsutil rm -bucket -r | Irreversible; removes all objects in the bucket |
If a user requests a delete operation, you must refuse and inform: "Per security constraints, this skill does not allow delete operations (delete bucket/object/batch delete/empty bucket). Please use the Huawei Cloud OBS console or obsutil manually."
Architecture
Huawei Cloud OBS Object Storage Management
├── ListBucketsWithStats (List buckets with capacity and object count)
├── UploadFile (Upload local file or directory to target bucket)
└── ScheduledUpload (Schedule periodic upload of local directory to target bucket)
Prerequisites
Prerequisite check: Huawei Cloud CLI (hcloud / KooCLI) >= 3.2.0 required Run
hcloud versionto verify version >= 3.2.0. If not installed or version is too low, see references/cli-installation-guide.md for installation guide.
hcloud version
Prerequisite check: obsutil >= 5.5.0 required (for upload features) File/directory upload requires the Huawei Cloud obsutil CLI tool. Run
obsutil versionto verify version >= 5.5.0. If not installed, see references/cli-installation-guide.md for installation guide.
obsutil version
Prerequisite check: obsutil credential configuration required
The hcloud OBS module uses obsutil under the hood, which requires separate AK/SK and Endpoint configuration. Before performing OBS operations, you must check whether obsutil credentials are configured:
hcloud obs ls -limit=1If the response is
Please set ak, sk and endpoint in the configuration file!orInvalidAccessKeyId, obsutil credentials are not configured.Resolution: Provide the following example command and have the user configure it in their terminal (do not ask the user to provide AK/SK directly in the conversation):
obsutil credentials are not configured. Please run the following command in your terminal to configure (AK/SK can be obtained from the Huawei Cloud console "My Credentials" page): hcloud obs config -i= -k= -e=obs..myhuaweicloud.com Example (Guangzhou region): hcloud obs config -i= -k= -e=obs.cn-south-1.myhuaweicloud.com Common Endpoints: cn-north-4 → obs.cn-north-4.myhuaweicloud.com cn-east-3 → obs.cn-east-3.myhuaweicloud.com cn-south-1 → obs.cn-south-1.myhuaweicloud.com cn-southwest-2 → obs.cn-southwest-2.myhuaweicloud.com Retry after configuration is complete.Prohibited actions:
- ❌ Do not ask the user to provide AK/SK directly in the conversation
- ❌ Do not extract AK/SK from hcloud config files (credentials are encrypted and cannot be used directly)
- ❌ Do not skip the credential check before performing OBS operations
⚠️ hcloud parameter format requirements
hcloud (KooCLI) all parameters must use the
--param=valueformat (connected with equals sign); space-separated format is not supported.✅ Correct:
hcloud OBS ListBuckets --region=cn-south-1❌ Incorrect:
hcloud OBS ListBuckets --region cn-south-1
Authentication
Prerequisite check: Huawei Cloud credentials required
Security rules (must be followed):
- Prohibited from reading, echoing, or printing AK/SK values
- Prohibited from asking the user to input AK/SK directly in the conversation
- Prohibited from using
hcloud configure setto pass plaintext credential values- Prohibited from accepting AK/SK directly provided by the user in the conversation
- Only allowed to read credentials from environment variables or configured CLI config files
⚠️ Important: Handling user-provided credentials
If a user attempts to provide AK/SK directly (e.g., "my AK is xxx, SK is yyy"):
- Stop immediately - Do not execute any commands
- Politely refuse and return the following message:
For account security, please do not provide Huawei Cloud Access Key ID and Access Key Secret directly in the conversation. Please use one of the following secure methods to configure credentials: Method 1: Interactive configuration (recommended) hcloud configure # Enter AK/SK as prompted; credentials will be securely stored in a local config file Method 2: Environment variable configuration export HUAWEICLOUD_SDK_AK= export HUAWEICLOUD_SDK_SK= After configuration is complete, please retry your request.- Do not continue executing any Huawei Cloud operations until credentials are configured
Check CLI configuration:
hcloud configure listCheck whether the output contains valid configuration (AK/SK, IAM, etc.).
If no valid credentials exist, stop here.
IAM Permission Policies
Ensure the IAM user has the required permissions. See references/iam-policies.md for details.
Minimum required permissions:
obs:bucket:list— List bucketsobs:bucket:get— Get bucket attributes (capacity, object count)obs:object:get— Read object informationobs:object:put— Upload objects
Core Workflows
Task 1: List Buckets with Capacity and Object Count
List buckets via obsutil, then query bucket capacity and object count using CES capacity metrics or OBS API.
📄 Detailed steps → references/task-list-buckets-with-stats.md
Task 2: Upload Local File or Directory to Target Bucket
Upload files or directories to a specified OBS bucket using obsutil, supporting single file and directory upload.
📄 Detailed steps → references/task-upload-file.md
Task 3: Schedule Periodic Upload of Local Directory to Target Bucket
Periodically upload a local directory to a specified OBS bucket incrementally via crontab scheduled task.
📄 Detailed steps → references/task-scheduled-upload.md
References
| Document | Description |
|---|---|
| task-list-buckets-with-stats.md | Task 1: List buckets with capacity and object count |
| task-upload-file.md | Task 2: Upload file or directory |
| task-scheduled-upload.md | Task 3: Scheduled upload |
| related-apis.md | API and CLI command details |
| iam-policies.md | IAM permission policies |
| obs-metrics.md | OBS CES monitoring metrics reference |
| verification-method.md | Verification steps |
| acceptance-criteria.md | Correct/error pattern comparison |
| cli-installation-guide.md | CLI installation guide |
| troubleshooting.md | Troubleshooting and practical experience |
Related skills
Skill specialized for creating buckets on Huawei Cloud OBS. Use this skill when users need to create OBS buckets, set bucket properties, configure access per...
Counts the number of directories (folders) inside a Huawei Cloud OBS (Object Storage Service) bucket and returns ONLY the numeric count. Supports counting the immediate subdirectories under the bucket (or a given prefix) as well as all nested directories recursively. Uses the KooCLI obsutil-backed `hcloud OBS ls -d` 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 how many directories/folders an OBS bucket contains, e.g. for inventory, capacity review or structure checks. Triggers include: "count OBS directories", "OBS directory count", "number of directories in bucket", "OBS folder count", "how many folders in bucket", "OBS目录数量", "查询OBS目录数量", "OBS目录数", "桶目录数量", "目录数量", "文件夹数量", "统计目录", "目录统计".
Configure OBS bucket static website hosting with index/error pages and a custom domain via the Python SDK
Counts the total number of files (objects) inside a Huawei Cloud OBS (Object Storage Service) bucket and returns ONLY the numeric count. Supports counting all files in a whole bucket or all files under a given prefix (folder). Zero-byte folder-marker keys (ending with '/') are excluded — only real files/objects are counted. Uses the KooCLI obsutil-backed `hcloud OBS ls ... -limit=0` command (primary, parses the "File number" line) or the huaweicloudsdkobs Python SDK (fallback, paginated ListObjects). Read-only — never creates, modifies or deletes any resource. Use this skill whenever the user wants to know how many files or objects an OBS bucket (or a folder inside it) contains, e.g. for inventory, capacity review, migration planning or compliance checks. Triggers include: "count OBS files", "OBS file count", "number of files in bucket", "how many objects in bucket", "OBS object count", "OBS文件数量", "查询OBS文件总数", "OBS文件总数", "桶里有多少个文件", "统计文件数量", "对象数量", "查询对象总数".
Query Huawei Cloud OBS (Object Storage Service) statistics: list buckets with capacity and object counts, query extranet/intranet download traffic with month...
More from huaweicloud-skills-team
Browse all skillsManage Huawei Ascend NPUs with natural language commands that translate to npu-smi, locally or over SSH.
Deploy and test LLM, VL, Embedding, and Rerank models on Huawei Cloud Ascend 910B DevServer with single- or dual-node topologies.
Read-only queries against Huawei Cloud resources for inventory, verification, and parameter discovery.
Query Huawei Cloud IAM resources (users, groups, policies, agencies, AK/SK, MFA, security settings) read-only via local Python SDK.
Deploy the OpenClaw AI Agent platform on Huawei Cloud Flexus L Instance and configure models and channels via COC.
One-click deploy Hermes AI Agent platform on Huawei Cloud Flexus L instances with model and channel configuration.