TopRank Skills

Home / Claw Skills / 其他 / volcengine-storage-tos-test
Official OpenClaw rules 15%

volcengine-storage-tos-test

Minimal TOS smoke tests. Validate AK/SK config, list buckets, and upload/download with Volcengine TOS. Supports both tosutil CLI and tos_manage.py script.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 volcengine-storage-tos-test 技能。 若已安装,则直接安装 volcengine-storage-tos-test 技能。

Overview

Skill Key
day253/day253-volcengine-storage-tos-test
Author
day253
Source Repo
openclaw/skills
Version
-
Source Path
skills/day253/day253-volcengine-storage-tos-test
Latest Commit SHA
c6fea134d49f18fb97edca772e057edafcaf7224

Extracted Content

SKILL.md excerpt

Category: test

# TOS 对象存储最小可行性测试

## Goals

- 验证 AK/SK/Region/Endpoint 配置正确。
- 验证 TOS 访问(列桶、上传、下载)。

## Prerequisites

- 已配置 AK/SK(环境变量或 `.env`)。
- 已准备一个可读写的 TOS Bucket。

---

## 方式一:使用 tos_manage.py 脚本(推荐)

依赖:`pip install tos`

### 1) 列出 Bucket

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py list-buckets --print-json
```

### 2) 列出对象

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py list-objects \
  --bucket <bucket> --prefix "" --max-keys 20 --print-json
```

### 3) 上传小文件

```bash
echo "tos-manage-test-$(date +%s)" > /tmp/tos-test.txt
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py upload \
  --bucket <bucket> --key tests/tos-test.txt --file /tmp/tos-test.txt --print-json
```

### 4) 获取元数据

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py head \
  --bucket <bucket> --key tests/tos-test.txt --print-json
```

### 5) 下载并校验

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py download \
  --bucket <bucket> --key tests/tos-test.txt --file /tmp/tos-test-down.txt
diff /tmp/tos-test.txt /tmp/tos-test-down.txt && echo "PASS: content matches" || echo "FAIL: content mismatch"
```

### 6) 生成预签名 URL

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py presign \
  --bucket <bucket> --key tests/tos-test.txt --expires 300 --print-json
```

### 7) 清理测试文件

```bash
python skills/storage/tos/volcengine-storage-tos/scripts/tos_manage.py delete \
  --bucket <bucket> --key tests/tos-test.txt --confirm
```

---

## 方式二:使用 tosutil CLI

tosutil 是火山引擎官方 TOS 命令行工具,需单独下载安装。
参考:https://www.volcengine.com/docs/6349/148772

### 1) 查看配置

```bash
tosutil config
```

### 2) 列出 Bucket

```bash
tosutil ls
```

### 3) 列出对象(指定 bucket)

```bash
tosutil ls tos://<bucket> -s --limited-num 20
```...

Related Claw Skills