huaweicloud/huaweicloud-skills11 files
Huawei Cloud Obs Upload
|
Specification
- Skill ID
- huaweicloud/huaweicloud-skills/huawei-cloud-obs-upload
- Publisher
- huaweicloud
- Repository
- huaweicloud-skills
- Installs
- 302
- Files
- 11
- Synced
- Sep 16, 2026
How to use it
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
huaweicloud/huaweicloud-skills/huawei-cloud-obs-uploadInstalls these files- SKILL.md
- references/acceptance-criteria.md
- references/cli-installation-guide.md
- references/iam-policies.md
- references/obs-metrics.md
- references/related-apis.md
- references/task-list-buckets-with-stats.md
- references/task-scheduled-upload.md
- references/task-upload-file.md
- references/troubleshooting.md
- references/verification-method.md
What this skill tells the agent
Huawei Cloud OBS Upload Skill
Overview
Upload local files or directories to Huawei Cloud OBS buckets, list OBS buckets with capacity and object count, and schedule periodic uploads via crontab. Upload operations use obsutil; bucket listing/stats use `hcloud obs ls` + CES metrics.
Tool separation principle:
- obsutil — File/directory upload, scheduled upload sync (upload core tool; hcloud CLI has no PutObject support)
- hcloud CLI — Bucket listing via
hcloud obs ls(obsutil mode), bucket capacity/object count stats viahcloud CES ShowMetricData - crontab / Task Scheduler — OS-level scheduled task for periodic upload (no daemon process dependency)
Security architecture:
- AK/SK are never read, echoed, or printed in conversation
- obsutil credentials are configured by the user in their terminal (never asked in conversation)
- Delete operations are strictly forbidden (irreversible); out-of-scope operations are refused with guided alternatives
- For directory uploads, whether to preserve directory structure (
-flat) is decided by the customer's explicit answer, never assumed
⛔ Prohibited Operations (Security Constraints)
This skill strictly forbids the following operations, regardless of user requests:
| Prohibited Operation | 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 |
❌ Download object (GetObject / obsutil cp obs://... <LocalPath>) | This skill is upload-only; download is a separate workflow |
❌ Create bucket (CreateBucket / obsutil mb) | Bucket creation has a dedicated skill with full prerequisites |
❌ Copy object (CopyObject / hcloud OBS CopyObject) | Cross-bucket object copy is out of this skill's scope |
❌ Lifecycle configuration (SetBucketLifecycle) | Storage cost management is a separate bucket-level config task |
❌ Restore archived object (RestoreObject / obsutil restore) | Archive restore is a separate workflow with retrieval modes and TTL |
❌ Presigned URL (CreatePresignedUrl) | Temporary sharing requires SDK signing; not supported by CLI upload |
❌ Bucket ACL/Policy (SetBucketAcl / SetBucketPolicy) | Permission management is a separate security task |
| ❌ Ask user to provide AK/SK directly in conversation | Credentials must never appear in conversation |
| ❌ Extract AK/SK from hcloud config files | Credentials are encrypted and cannot be used directly |
| ❌ Skip obsutil credential check before OBS operations | Operations fail without configured credentials |
❌ Use -flat for directory uploads without asking the customer | -flat discards directory structure; must follow customer's explicit answer |
| ❌ Guess local path, bucket name, or target prefix | Required parameters must be provided by the user |
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."
If a user requests an out-of-scope operation, do not attempt to perform it. Inform the user with the recommended alternative from the table below:
| Operation | Recommended alternative |
|---|---|
| Download object | Use obsutil cp obs://<Bucket>/<Key> <LocalPath> manually, or the OBS console |
| Create bucket | Use the dedicated skill huawei-cloud-obs-bucket-create, or the OBS console |
| Copy object | Use hcloud OBS CopyObject manually, or the OBS console |
| Lifecycle configuration | Use the OBS console (Bucket > Lifecycle), or hcloud OBS SetBucketLifecycle |
| Restore archived object | Use obsutil restore obs://<Bucket>/<Key> manually, or the OBS console |
| Presigned URL | Use Huawei Cloud SDK (Java/Python/Go) to generate presigned URLs, or the OBS console |
| Bucket ACL/Policy | Use the OBS console (Bucket > Permissions), or hcloud OBS SetBucketAcl/SetBucketPolicy |
Architecture
Huawei Cloud OBS Upload Management
├── Task 1: ListBucketsWithStats (List buckets with capacity and object count)
│ ├── 1a. hcloud obs ls: list all buckets
│ ├── 1b. CES metrics / OBS API: query bucket capacity and object count
│ └── 1c. Report bucket stats table to user
├── Task 2: UploadFile (Upload local file or directory to target bucket)
│ ├── 2a. Confirm local path + bucket name + target prefix with user
│ ├── 2b. For directory: ask customer whether to preserve directory structure (decide -flat)
│ ├── 2c. obsutil cp: single file (-flat) or directory (-r, optional -flat by customer answer)
│ └── 2d. Verify upload result
└── Task 3: ScheduledUpload (Schedule periodic upload of local directory to target bucket)
├── 3a. Confirm local dir + bucket + prefix + schedule period with user
├── 3b. Ask customer whether to preserve directory structure (decide -flat)
├── 3c. Generate obsutil upload script (with/without -flat per customer answer)
├── 3d. Set crontab / Task Scheduler scheduled task
└── 3e. Verify scheduled task is setPrerequisites
Prerequisite check 1/3: Huawei Cloud CLI (hcloud / KooCLI) >= 3.2.0 required Run hcloud version to verify version >= 3.2.0. If not installed or version is too low, see references/cli-installation-guide.md for installation guide.hcloud versionPrerequisite check 2/3: obsutil >= 5.5.0 required (for upload features) File/directory upload requires the Huawei Cloud obsutil CLI tool. Run obsutil version to verify version >= 5.5.0. If not installed, see references/cli-installation-guide.md for installation guide.obsutil versionPrerequisite check 3/3: obsutil credential configuration required The hcloud obs module maps to obsutil under the hood, which requires separate AK/SK and Endpoint configuration. Before performing OBS operations, you must check whether obsutil credentials are configured: ``bash hcloud obs ls -limit=1`**If the response isPlease 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=<YourAK> -k=<YourSK> -e=obs.<Region>.myhuaweicloud.com Example (Guangzhou region): hcloud obs config -i=<YourAK> -k=<YourSK> -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.``
⚠️ hcloud parameter format requirements hcloud (KooCLI) cloud-service API commands (uppercase module, e.g.hcloud CES ShowMetricData) must use the `--param=value` format (connected with equals sign); space-separated format is not supported. ✅ Correct:hcloud CES ShowMetricData --region=cn-south-1 --namespace=SYS.OBS
