OSS (ossutil 2.0) CLI Skill
name: alicloud-storage-oss-ossutil
by cinience · published 2026-03-22
$ claw add gh:cinience/cinience-alicloud-storage-oss-ossutil---
name: alicloud-storage-oss-ossutil
description: Alibaba Cloud OSS CLI (ossutil 2.0) skill. Install, configure, and operate OSS from the command line based on the official ossutil overview.
version: 1.0.0
---
Category: tool
# OSS (ossutil 2.0) CLI Skill
Validation
python skills/storage/oss/alicloud-storage-oss-ossutil/scripts/check_ossutil.py --output output/alicloud-storage-oss-ossutil/validate.txtPass criteria: command exits 0 and `output/alicloud-storage-oss-ossutil/validate.txt` is generated.
Output And Evidence
Goals
Quick Start Flow
1. Install ossutil 2.0.
2. Configure AK/SK and default region (`ossutil config` or config file).
3. Run `ossutil ls` to list buckets, then list objects using the bucket region.
4. Execute upload/download/sync or API-level commands.
Install ossutil 2.0
Configure ossutil
ossutil config- Linux/macOS:`~/.ossutilconfig`
- Windows:`C:\Users\issuser\.ossutilconfig`
Main configuration fields include:
AccessKey configuration notes
Use RAM users/roles with least privilege and avoid passing AK in plain text on command line.
Recommended method (environment variables):
export ALICLOUD_ACCESS_KEY_ID="<your-ak>"
export ALICLOUD_ACCESS_KEY_SECRET="<your-sk>"
export ALICLOUD_REGION_ID="cn-beijing"`ALICLOUD_REGION_ID` can be used as default region; if unset choose the most reasonable region, ask user if unclear.
Or use the standard shared credentials file:
`~/.alibabacloud/credentials`
[default]
type = access_key
access_key_id = <your-ak>
access_key_secret = <your-sk>Command structure (2.0)
Common command examples
ossutil ls
ossutil ls oss://your-bucket -r --short-format --region cn-shanghai -e https://oss-cn-shanghai.aliyuncs.com
ossutil cp ./local.txt oss://your-bucket/path/local.txt
ossutil cp oss://your-bucket/path/remote.txt ./remote.txt
ossutil sync ./local-dir oss://your-bucket/path/ --deleteRecommended execution flow (list buckets first, then objects)
1) List all buckets
ossutil ls2) Get target bucket region from output (e.g. `oss-cn-shanghai`) and convert it to `--region` format (`cn-shanghai`).
3) When listing objects, explicitly set `--region` and `-e` to avoid cross-region signature/endpoint errors.
ossutil ls oss://your-bucket \
-r --short-format \
--region cn-shanghai \
-e https://oss-cn-shanghai.aliyuncs.com4) For very large buckets, limit output size first.
ossutil ls oss://your-bucket --limited-num 100
ossutil ls oss://your-bucket/some-prefix/ -r --short-format --region cn-shanghai -e https://oss-cn-shanghai.aliyuncs.comCommon errors and handling
- Cause: missing region configuration.
- Fix: add `region` in config file, or pass `--region cn-xxx`.
- Cause: request endpoint does not match bucket region.
- Fix: use endpoint of the bucket region, e.g. `-e https://oss-cn-hongkong.aliyuncs.com`.
- Cause: signature region does not match bucket region.
- Fix: correct both `--region` and `-e`; both must match bucket region.
Credential and security guidance
Clarifying questions (ask when uncertain)
1. Is your target a Bucket or an Object?
2. Do you need upload/download/sync, or management actions like ACL/lifecycle/CORS?
3. What are the target region and endpoint?
4. Are you accessing OSS from ECS in the same region (intranet endpoint may be preferred)?
References
- https://help.aliyun.com/zh/oss/developer-reference/ossutil-overview
Prerequisites
Workflow
1) Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
2) Run one minimal read-only query first to verify connectivity and permissions.
3) Execute the target operation with explicit parameters and bounded scope.
4) Verify results and save output/evidence files.
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...